Re: Audit trail ?

From: "Zlatko Matic" <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr>
To: "Mike Rylander" <mrylander(at)gmail(dot)com>
Cc: "Postgresql-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Audit trail ?
Date: 2005-05-30 09:15:27
Message-ID: 000f01c564f8$1f26f140$a6301dc3@zlatkovyfkpgz6
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello, Mike!
Your solution for audit trail is wonderfull! Easy and elegant !
It helped me a lot and I successfully implemented it, with small
modifications.

Thanky you very much!

----- Original Message -----
From: "Mike Rylander" <mrylander(at)gmail(dot)com>
To: "Zlatko Matic" <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr>
Cc: "Postgresql-General" <pgsql-general(at)postgresql(dot)org>
Sent: Sunday, May 29, 2005 6:21 PM
Subject: Re: [GENERAL] Audit trail ?

On 5/29/05, Zlatko Matic <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr> 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(at)gmail(dot)com
GPLS -- PINES Development
Database Developer
http://open-ils.org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Philip Rhoades 2005-05-30 09:33:04 Subselects - recursion problem
Previous Message Ets ROLLAND 2005-05-30 08:19:10 Carriage return in text fields