Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 315A7475B47 for ; Thu, 26 Dec 2002 15:22:18 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id AFE844753A1 for ; Thu, 26 Dec 2002 15:22:17 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 96FC043AFDC; Thu, 26 Dec 2002 15:22:17 -0500 (EST) From: CoL X-Newsgroups: comp.databases.postgresql.admin Subject: Re: Is there any eqvivalent or alternative to UPDATE(column) or COLUMNS_UPDATED() Date: Thu, 26 Dec 2002 21:29:48 +0100 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 31 Message-ID: References: <000601c1cc18$97f37200$1201a8c0@a4005> Reply-To: col@mportal.hu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20021220 X-Accept-Language: hu, en-us, en In-Reply-To: <000601c1cc18$97f37200$1201a8c0@a4005> To: pgsql-admin@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/331 X-Sequence-Number: 6826 http://www.postgresql.org/idocs/index.php?trigger-manager.html http://www.postgresql.org/idocs/index.php?plpgsql-trigger.html TG_OP ? C. shreedhar wrote, On 12/26/2002 12:57 PM: > Is there any eqvivalent or alternative to the following IF UPDATE(column) or > IF(COLUMNS_UPDATED()) of SQLServer2000. > > IF UPDATE (column) > > Tests for an INSERT or UPDATE action to a specified column and is not used > with DELETE operations. More than one column can be specified. Because the > table name is specified in the ON clause, do not include the table name > before the column name in an IF UPDATE clause. To test for an INSERT or > UPDATE action for more than one column, specify a separate UPDATE(column) > clause following the first one. IF UPDATE will return the TRUE value in > INSERT actions because the columns have either explicit values or implicit > (NULL) values inserted. > > IF (COLUMNS_UPDATED()) > > Tests, in an INSERT or UPDATE trigger only, whether the mentioned column or > columns were inserted or updated. COLUMNS_UPDATED returns a varbinary bit > pattern that indicates which columns in the table were inserted or updated. > > Thanks And Regards, > > Sreedhar