Search Postgresql Archives

Re: Select Column Auditing/Logging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-07-22 at 14:41 -0700, Jeff Davis wrote:
> On Wed, 2009-07-22 at 12:04 -0700, Jeremy Brown wrote:
> > It seems that PostgreSQL can audit INSERT, UPDATE, DELETE, and
> > TRUNCATE through the use of triggers.  But SELECT triggers are
> > unsupported (it does suggest perhaps using RULES).
> 
> One thing you can do is use a set-returning function that, as a side
> effect, records what happened. 

I should warn you not to record it in a transactional way: it must go
out to an external service, or go back to postgresql using something
like dblink. Otherwise, someone could do:

BEGIN;
SELECT ...;
ROLLBACK;

and whatever you logged would be gone.

Regards,
	Jeff Davis


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux