pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Edwin S. Ramirez <ramirez@lwbeyond.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Help! Record logging
Date: Sat, 19 May 2001 12:59:49 +0100
Message-ID: <3B066036.9A823B8E@archonet.com> (raw)
References: <3B02B940.B00267E7@lwbeyond.net>

"Edwin S. Ramirez" wrote:
> 
> Hello,
> 
>     I would like to setup a trigger to keep track of all changes done
> onto the records of paticular tables.

Check my PostgreSQL Notes on techdocs.postgresql.org - there's an
example in there. Might be worth checking Roberto Mello's postgresql
cookbook too (same place).
 
>     The only other difficulty is how do I let the trigger know the ID of
> the user deleting the record?

SELECT CURRENT_USER sounds like what you want.

- Richard Huxton



view thread (2+ messages)

Message-ID: <3B066036.9A823B8E@archonet.com>
Permalink:  ../3B066036.9A823B8E@archonet.com/
Also on:    postgresql.org/message-id/3B066036.9A823B8E@archonet.com

 · 

reply

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: dev@archonet.com, ramirez@lwbeyond.net
  Subject: Re: Help! Record logging
  In-Reply-To: <3B066036.9A823B8E@archonet.com>

* 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