Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 356479FB667 for ; Mon, 16 Apr 2007 20:55:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 70384-06 for ; Mon, 16 Apr 2007 20:55:08 -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 B4BE59FB5D2 for ; Mon, 16 Apr 2007 20:55:08 -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 l3GNt6WO012252; Mon, 16 Apr 2007 19:55:06 -0400 (EDT) To: cluster cc: pgsql-performance@postgresql.org Subject: Re: FK triggers misused? In-reply-to: References: <26399.1176614941@sss.pgh.pa.us> <102.1176650563@sss.pgh.pa.us> Comments: In-reply-to cluster message dated "Tue, 17 Apr 2007 01:12:28 +0200" Date: Mon, 16 Apr 2007 19:55:06 -0400 Message-ID: <12251.1176767706@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/321 X-Sequence-Number: 24198 Idly thumbing through the code, I came across something that might possibly explain your results. Do the rows being updated contain NULLs in the foreign-key columns? I see that ri_KeysEqual() treats two null values as not equal, which might be overzealous respect for SQL null semantics in this context. regards, tom lane