Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 1B57D9FB256 for ; Sun, 15 Apr 2007 12:22:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 26292-08 for ; Sun, 15 Apr 2007 12:22:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 5130B9FB1E5 for ; Sun, 15 Apr 2007 12:22:44 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l3FFMh7e000103; Sun, 15 Apr 2007 11:22:43 -0400 (EDT) To: andrew@supernews.com cc: pgsql-performance@postgresql.org Subject: Re: FK triggers misused? In-reply-to: References: <26399.1176614941@sss.pgh.pa.us> Comments: In-reply-to Andrew - Supernews message dated "Sun, 15 Apr 2007 05:42:49 -0000" Date: Sun, 15 Apr 2007 11:22:43 -0400 Message-ID: <102.1176650563@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/313 X-Sequence-Number: 24190 Andrew - Supernews writes: > Looking at current CVS code the RI check seems to be skipped on update of > the _referred to_ table if the old and new values match, but not on update > of the _referring_ table. No, both sides are supposed to be tested, see lines 3350-3395 in src/backend/commands/trigger.c. Or do you see something broken there? It works for me in a quick test. regards, tom lane