X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 4E3CA9FA2D5 for ; Mon, 31 Jul 2006 13:17:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 04763-01-4 for ; Mon, 31 Jul 2006 13:16:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from pd6mo4no.prod.shaw.ca (idcmail-mo2no.cg.shawcable.net [64.59.134.9]) by postgresql.org (Postfix) with ESMTP id 89B609FB336 for ; Mon, 31 Jul 2006 13:16:34 -0300 (ADT) Received: from pd8mr3no.prod.shaw.ca (pd8mr3no-qfe2.prod.shaw.ca [10.0.144.160]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0J3900D8XZVL8S30@l-daemon> for pgsql-sql@postgresql.org; Mon, 31 Jul 2006 10:16:33 -0600 (MDT) Received: from pn7ml4no.prod.shaw.ca ([10.0.149.113]) by pd8mr3no.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0J3900L1XZVL1HA0@pd8mr3no.prod.shaw.ca> for pgsql-sql@postgresql.org; Mon, 31 Jul 2006 10:16:33 -0600 (MDT) Received: from Dell4500 ([24.77.157.242]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with SMTP id <0J3900J0XZV5SB20@l-daemon> for pgsql-sql@postgresql.org; Mon, 31 Jul 2006 10:16:33 -0600 (MDT) Date: Mon, 31 Jul 2006 11:16:42 -0500 From: George Weaver Subject: Re: Triggers using PL/pgSQL To: Aaron Bono , John DeSoi Cc: Thusitha Kodikara , pgsql-sql@postgresql.org Message-id: <006601c6b4bc$b74f0ba0$6400a8c0@Dell4500> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-Mailer: Microsoft Outlook Express 6.00.2900.2869 Content-type: text/plain; format=flowed; charset=iso-8859-1; reply-type=original Content-transfer-encoding: 7bit X-Priority: 3 X-MSMail-priority: Normal References: <20060731041644.32247.qmail@web56610.mail.re3.yahoo.com> <7F7548C8-249E-44E2-8205-6C055671DA19@pgedit.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.666 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, SPF_PASS X-Spam-Level: X-Archive-Number: 200607/382 X-Sequence-Number: 25956 ----- Original Message ----- From: Aaron Bono To: John DeSoi >I don't think so but there was some discussion a week or two ago about >mixing variables and using execute. I am curious, does anyone >know what >the "best" approach is? >Also, I did not address deletions. If you still need to delete from the >table, you will need to get rid of the foreign key on the history table. > >You will also need to decide how the history table will reflect the >recording of those deletions. You may want to refer to: http://www.varlena.com/GeneralBits/104.php (Logging Audit Changes with Composite Typed Columns). It provides a very concise way of tracking all changes, possible qualifying as a "best approach"? Regards, George