Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 2A863476F37 for ; Wed, 13 Mar 2002 14:50:15 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id A2433D5F7; Wed, 13 Mar 2002 11:50:12 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 97C845BFD; Wed, 13 Mar 2002 11:50:12 -0800 (PST) Date: Wed, 13 Mar 2002 11:50:12 -0800 (PST) From: Stephan Szabo To: msn Cc: Subject: Re: Referential integrity implementation - bug or user error? In-Reply-To: <20020310.231934.654887343.1425@post.tele.dk> Message-ID: <20020313114721.M85167-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200203/172 X-Sequence-Number: 7052 On Sun, 10 Mar 2002, msn wrote: > But then when I try to delete one id from t1 I get this error message. > > msn=# delete from t1 where id=1; > ERROR: referential integrity violation - key referenced from t2 > not found in t1 > > Why this fails to set columns t1_aid and t1_bid in table t2 to null? Known problem with checking intermediate states of the table. It happens here because there are two references to the same table. I sent a message in response to a similar problem on -bugs that contained part of a patch that may fix this problem for you.