Re: Audit trail - Mailing list pgsql-general

From Joe Conway
Subject Re: Audit trail
Date
Msg-id 3E700BC5.7030500@joeconway.com
Whole thread Raw
In response to Re: Audit trail  (James Gregory <james@anchor.net.au>)
List pgsql-general
James Gregory wrote:
> I considered that. Trouble is that I'd have to write this code in 5 or 6
> different languages, one of which is pl/pgsql. Likewise I'd need to test
> all those different implementations (and it would be impractical to
> retrofit this to the pl/pgsql stuff).
>
> So yeah, I really need the database to do it itself.
>

There is no "native" audit feature built in to Postgres, but it is easy
enough to implement using audit tables and plpgsql function triggers on
the application tables. See:

http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/triggers.html
http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/plpgsql-trigger.html

Joe


pgsql-general by date:

Previous
From: James Gregory
Date:
Subject: Re: Audit trail
Next
From: "jose antonio leo"
Date:
Subject: unlock rows