Help! Record logging

From: "Edwin S(dot) Ramirez" <ramirez(at)lwbeyond(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Help! Record logging
Date: 2001-05-16 17:30:40
Message-ID: 3B02B940.B00267E7@lwbeyond.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

I would like to setup a trigger to keep track of all changes done
onto the records of paticular tables. Basically, there would be two
identical tables such as, 'medications' and 'medications_log', when a
user inserts, updates or deletes a record I would like a copy to be
inserted into the log table. I already have audit information in the
medications table, so I only need to be able to copy the record over to
the log table.

The only other difficulty is how do I let the trigger know the ID of
the user deleting the record?

Thanks,
Edwin S. Ramirez

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephen Patterson 2001-05-16 19:21:22 case insensitive sort for output from SELECT
Previous Message Stephan Szabo 2001-05-16 17:19:04 Re: [Fwd: [Gborg-bugs] BUG: reference error when using inherited tables (ID: 269) (new)]