X-Original-To: pgsql-sql@postgresql.org Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id 5CB4D476472 for ; Fri, 7 Mar 2003 12:42:49 -0500 (EST) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2884937; Fri, 07 Mar 2003 09:42:34 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: Andreas Pflug , pgsql-sql@postgresql.org Subject: Re: How to notice column changes in trigger Date: Fri, 7 Mar 2003 09:41:41 -0800 User-Agent: KMail/1.4.3 References: <3E6874CD.4090501@web.de> In-Reply-To: <3E6874CD.4090501@web.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200303070941.41276.josh@agliodbs.com> X-Archive-Number: 200303/204 X-Sequence-Number: 12244 Andreas, > 1) update test set a=0 -> trigger does its work > 2) update test set a=0, b=1, c=2 -> trigger does nothing > 3) update test set a=0, b=b, c=c -> trigger does nothing, but content of > a and b dont change either although touched > IF OLD.b=NEW.b will not work, case 3) will falsely execute the trigger > code. I still don't get why you'd want to do this. Can you provide are real-world example where there is a difference between setting B=B and not updating B? -- Josh Berkus Aglio Database Solutions San Francisco