Search Postgresql Archives

Re: Audit trail ?

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

 



On 5/29/05, Zlatko Matic <zlatko.matic1@xxxxxxxxxxx> wrote:
> Hello.
> 
> I must have audit trail of all insert/update/delete on several table. I have
> several questions regarding that:
> 
> 1. Is it better to have one audit trail table that collects
> insert/update/delete of all audited tables, or it is better to have separate
> audit trail table for every audited table ?
> 2. To use triggers or rules ? Example for both ?
> 3. Could someone give me an example of a successfull audit trail solution ?
> 
> I'm running on lack of time, so any help would be precious...

We use the "audit table per real table" approach.  The SQL script to
create the audit trail functions and triggers is attached.  There are
three example audit trail table creation calls right before the
COMMIT.

Hope that helps!

-- 
Mike Rylander
mrylander@xxxxxxxxx
GPLS -- PINES Development
Database Developer
http://open-ils.org

Attachment: 900.audit-tables.sql
Description: Binary data

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

[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