Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 596546329C0 for ; Fri, 3 Sep 2010 13:23:40 -0300 (ADT) 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 57197-09 for ; Fri, 3 Sep 2010 16:23:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id E27336329D8 for ; Fri, 3 Sep 2010 13:23:31 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Fri, 03 Sep 2010 11:23:30 -0500 Message-Id: <4C80DAAB02000025000351AA@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Fri, 03 Sep 2010 11:23:23 -0500 From: "Kevin Grittner" To: "Michael Monnerie" Cc: Subject: Re: fail-safe sql update triggers References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/37 X-Sequence-Number: 35581 Michael Monnerie wrote: > But that is error prone, because when the "filter" table is > changed to have a new column, the UPDATE statement would not > contain it. Is there a fail-proof shortcut? You might draw inspiration for a C-based solution from Andrew Dunstan's "minimal update" code. A quick search turned up this, but you might want to read the whole thread and look for possible later versions of the code: http://archives.postgresql.org/pgsql-hackers/2008-10/msg01111.php -Kevin