Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3A7ED1336971 for ; Fri, 12 Nov 2010 13:50:00 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 46007-05 for ; Fri, 12 Nov 2010 17:49:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-17937.dedibox.fr (sd-17937.dedibox.fr [88.191.100.74]) by mail.postgresql.org (Postfix) with ESMTP id B26551337B39 for ; Fri, 12 Nov 2010 13:49:52 -0400 (AST) Received: from [192.168.10.2] (ASte-Genev-Bois-153-1-42-67.w83-200.abo.wanadoo.fr [83.200.92.67]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id BA29B3B8F5; Fri, 12 Nov 2010 18:49:51 +0100 (CET) Message-ID: <4CDD7E40.2020401@lelarge.info> Date: Fri, 12 Nov 2010 18:49:52 +0100 From: Guillaume Lelarge User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Ricardo Bayley CC: pgsql-admin@postgresql.org Subject: Re: Trigger: Column Update References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201011/100 X-Sequence-Number: 36066 Le 12/11/2010 18:37, Ricardo Bayley a écrit : > Hi, > > I am wondering if there is a way to identify which columns have been > modified. Is there some sort of TG_TABLE_NAME, which states the > modified columns ? Nope. You should check yourself. > Or should we check this ourselves doing something like OLD.columnA != > NEW.columnA ? Use IS DISTINCT OF instead of = to deal with NULL values. -- Guillaume http://www.postgresql.fr http://dalibo.com