Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4JCYcA92060 for ; Sat, 19 May 2001 08:34:38 -0400 (EDT) (envelope-from dev@archonet.com) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-32.mail.demon.net with esmtp (Exim 2.12 #1) id 1515Sz-0004L0-0W; Sat, 19 May 2001 13:04:17 +0100 Received: from archonet.com (ibook.archonet.com [192.168.1.32]) by mainbox.archonet.com (Postfix) with ESMTP id 73AE01345D; Sat, 19 May 2001 13:00:23 +0100 (BST) Message-ID: <3B066036.9A823B8E@archonet.com> Date: Sat, 19 May 2001 12:59:49 +0100 From: Richard Huxton X-Mailer: Mozilla 4.7C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; I; PPC) X-Accept-Language: en MIME-Version: 1.0 To: "Edwin S. Ramirez" Cc: pgsql-sql@postgresql.org Subject: Re: Help! Record logging References: <3B02B940.B00267E7@lwbeyond.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200105/207 X-Sequence-Number: 3024 "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