X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 027C1D1B18F for ; Wed, 7 Jul 2004 08:03:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13505-01 for ; Wed, 7 Jul 2004 11:03:49 +0000 (GMT) Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by svr1.postgresql.org (Postfix) with ESMTP id 585A0D1B1AB for ; Wed, 7 Jul 2004 08:03:45 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-32.mail.demon.net with esmtp (Exim 3.35 #1) id 1BiADL-0000Ej-0W; Wed, 07 Jul 2004 12:03:47 +0100 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 86C5616357; Wed, 7 Jul 2004 12:03:46 +0100 (BST) Message-ID: <40EBD891.3050205@archonet.com> Date: Wed, 07 Jul 2004 12:03:45 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Pradeepkumar, Pyatalo (IE10)" Cc: Tomasz Myrta , pgsql-sql@postgresql.org Subject: Re: Triggers - need help !!! References: <77ED2BF75D59D1439F90412CC5B109740E8A2E38@ie10-sahara.hiso.honeywell.com> In-Reply-To: <77ED2BF75D59D1439F90412CC5B109740E8A2E38@ie10-sahara.hiso.honeywell.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.3 tagged_above=0.0 required=5.0 tests=PLING_PLING X-Spam-Level: * X-Archive-Number: 200407/31 X-Sequence-Number: 18283 Pradeepkumar, Pyatalo (IE10) wrote: > Thanks a lot for ur help. > In the trigger, I am checking if a field is updated or not. The syntax I > use is > > IF UPDATE(CreateTime) THEN > .... > .... > END IF; > > Is this syntax correct. No, and I don't recall seeing anything like it in the manuals. IF OLD.CreateTime <> NEW.CreateTime THEN ... -- Richard Huxton Archonet Ltd