Re: why is there no TRIGGER ON SELECT ?

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: Melvin Davidson <melvin6925(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: why is there no TRIGGER ON SELECT ?
Date: 2011-02-22 08:27:18
Message-ID: AANLkTi=MQ6GJYzDM8577bCjz8WcE+d0+FotnA1w-omne@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hey Melvin,

2011/2/22 Melvin Davidson <melvin6925(at)yahoo(dot)com>

>
> Other than "It's currently not available", can anyone provide a logical
> explanation of why triggers cannot be implemented for SELECT statements, or
> rules for SELECT must be DO INSTEAD SELECT?
>
> PostgreSQL was derived from Ingres, and Ingres had a nice auditing feature
> that also handled SELECT. It would be simple enough to write a RULE or
> TRIGGER on a SELECT to just log access, but for some unexplainable reason
> (at least to my knowledge) this has been greatly restricted in PostgreSQL. I
> am sure many DBA's and developers would greatly appreciate the addition of a
> TRIGGER or RULE on SELECT, and it should be simple enough to change the
> code, so I am curious as to why this has never been done.
>
> Thanks in advance.
>
Why not use function which returns table and wrap the
logging (auditing) code in it ?

>
>
>
> Melvin Davidson
>
>
>

--
// Dmitriy.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message zab08 2011-02-22 08:51:45 multiple column to onec column
Previous Message Pavel Stehule 2011-02-22 07:38:23 Re: string_agg hanging?