From: Edwin S. Ramirez <ramirez@lwbeyond.net>
To: pgsql-sql@postgresql.org
Subject: Help! Record logging
Date: Wed, 16 May 2001 13:30:40 -0400
Message-ID: <3B02B940.B00267E7@lwbeyond.net> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ramirez@lwbeyond.net
Subject: Re: Help! Record logging
In-Reply-To: <3B02B940.B00267E7@lwbeyond.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox