X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6689CD1CCAE for ; Tue, 20 Jan 2004 05:26:07 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 32227-04 for ; Tue, 20 Jan 2004 01:25:36 -0400 (AST) Received: from ndl1mr1-a-fixed.sancharnet.in (ndl1mr1-a-fixed.sancharnet.in [61.0.0.45]) by svr1.postgresql.org (Postfix) with ESMTP id 337F3D1D12E for ; Tue, 20 Jan 2004 01:25:31 -0400 (AST) Received: from conversion-daemon.ndl1mr1-a-fixed.sancharnet.in by ndl1mr1-a-fixed.sancharnet.in (iPlanet Messaging Server 5.2 HotFix 1.17 (built Jun 23 2003)) id <0HRR00F01W1BVS@ndl1mr1-a-fixed.sancharnet.in> for pgsql-sql@postgresql.org; Tue, 20 Jan 2004 10:50:39 +0530 (IST) Received: from sancharnet.in ([61.0.95.106]) by ndl1mr1-a-fixed.sancharnet.in (iPlanet Messaging Server 5.2 HotFix 1.17 (built Jun 23 2003)) with ESMTPA id <0HRR00FM5W6COB@ndl1mr1-a-fixed.sancharnet.in>; Tue, 20 Jan 2004 10:50:39 +0530 (IST) Date: Tue, 20 Jan 2004 10:57:23 +0530 From: "V i s h a l Kashyap @ [Sai Hertz And Control Systems]" Subject: Re: Trigger to identify which column(s) updated In-reply-to: To: Jack Kerkhof Cc: pgsql-sql@postgresql.org Reply-To: aspire420@hotpop.com Message-id: <400CBC3B.9030902@sancharnet.in> Organization: Sai Hertz And Control Systems MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 References: X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.4 tagged_above=0.0 required=5.0 tests=FROM_ENDS_IN_NUMS, IN_REP_TO, QUOTED_EMAIL_TEXT, RCVD_IN_RFCI, REFERENCES, REPLY_WITH_QUOTES, SIGNATURE_LONG_SPARSE, USER_AGENT_MOZILLA_UA X-Spam-Level: X-Archive-Number: 200401/171 X-Sequence-Number: 16564 Dear Jack , >for each column in new: > if (new.column(1) != old.column(1)) ... > > ...and then some snippet of code to determine the primary key column >of new (or old) > > Check the following link http://gborg.postgresql.org/project/tablelog/projdisplay.php Hope this helps -- Regards, Vishal Kashyap ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~* I Know you believe my words so logon to Jabber.org and add vishalkashyap@jabber.org to your roster. ~*~*~*~*~*~*~*~* I am usually called as Vishal Kashyap but my Girl friend calls me as Vishal CASH UP. This is because others know me because of my generosity and my Girlfriend knows me because of my CASH. ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*