Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de [53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id GAA37244 for ; Wed, 16 Jun 1999 06:56:32 -0400 (EDT) (envelope-from wieck@debis.com) Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-sql@postgreSQL.org id m10uDM1-0003kkC; Wed, 16 Jun 99 12:55 MET DST Message-Id: From: wieck@debis.com (Jan Wieck) Subject: Re: [SQL] example of trigger to track DB changes To: brook@trillium.NMSU.Edu (Brook Milligan) Date: Wed, 16 Jun 1999 12:55:37 +0200 (MET DST) Cc: mo@local2me.com, pgsql-sql@postgreSQL.org Reply-To: jwieck@debis.com (Jan Wieck) In-Reply-To: <199906151911.NAA28058@trillium.nmsu.edu> from "Brook Milligan" at Jun 15, 99 01:11:52 pm X-Mailer: ELM [version 2.4 PL25] Content-Type: text > > 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. > > Look in the rules docs instead. > > 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 ... > > The rules docs describe how to do exactly this and give an example. But all those examples are based on v6.4. In fact the rule system of v6.3.2 cannot handle them because it's broken! Please upgrade to v6.5 (just released) before playing with the rule system. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #========================================= wieck@debis.com (Jan Wieck) #