X-Original-To: pgsql-performance@postgresql.org Received: from smtp.web.de (smtp03.web.de [217.72.192.158]) by postgresql.org (Postfix) with ESMTP id 83DA9476517 for ; Thu, 6 Mar 2003 11:09:28 -0500 (EST) Received: from p508184f7.dip0.t-ipconnect.de ([80.129.132.247] helo=web.de) by smtp.web.de with asmtp (TLSv1:RC4-MD5:128) (WEB.DE(Exim) 4.97 #53) id 18qxw4-00072E-00 for pgsql-performance@postgresql.org; Thu, 06 Mar 2003 17:09:32 +0100 Message-ID: <3E6772C4.5010005@web.de> Date: Thu, 06 Mar 2003 17:09:40 +0100 From: Andreas Pflug User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: How to notice column changes in trigger References: <3E6762AA.8070206@web.de> <1046966484.20270.94.camel@linda.lfix.co.uk> In-Reply-To: <1046966484.20270.94.camel@linda.lfix.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200303/40 X-Sequence-Number: 1338 Oliver Elphick wrote: > IF NEW.b = OLD.b OR (NEW.b IS NULL AND OLD.b IS NULL) THEN > -- b has not changed > ... > END IF; > > This doesn't cover case 3, since UPDATE ... SET b=b will lead to NEW.b=OLD.b