Received: from oberon.dnai.com (oberon.dnai.com [207.181.194.97]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA24180 for ; Tue, 15 Jun 1999 01:24:11 -0400 (EDT) (envelope-from mo@local2me.com) Received: from local2me.com (dnai-216-15-121-56.dialup.dnai.com [216.15.121.56]) by oberon.dnai.com (8.9.3/8.9.3) with ESMTP id WAA25454 for ; Mon, 14 Jun 1999 22:23:35 -0700 (PDT) Sender: michael@oberon.dnai.com Message-ID: <3765E361.3570C6EA@local2me.com> Date: Tue, 15 Jun 1999 05:23:45 +0000 From: Michael Olivier X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.36 i686) X-Accept-Language: en MIME-Version: 1.0 To: "pgsql-sql@postgreSQL.org" Subject: example of trigger to track DB changes Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I've looked through the trigger examples in the html doc and the src tree but didn't find the one I was looking for. I want to set up a trigger to track changes (add/update/delete) to rows in two tables. This can be through inserting OID's or acctname's (acctname of web users) into a "changed_rows" table that keeps track of changed rows. Would someone provide some source code that does this? I'm assuming a lot of people have done this... I'm using 6.3.2 ... thanks! Michael