Skip site navigation (1) Skip section navigation (2)

Bug #457: foreign keys are broken

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #457: foreign keys are broken
Date: 2001-09-19 18:47:48
Message-ID: 200109191847.f8JIlm529985@hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Robert Forsman (thoth(at)incanta(dot)net) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
foreign keys are broken

Long Description
I'm performing a transaction that has temporary violations of a referential integrity constraint which are repaired later in the transaction.  However, I still get a constraint failure when I set constraints all immediate, even thought the tables have been adjusted to a consistent state.

  The following code snippet demonstrates the malfunction in postgres 7.1.3 :


Sample Code
create table x(foo int primary key); create table y(foo int references x deferrable);

begin; set constraints all deferred; insert into y values(2); insert into x values(2); set constraints all immediate; commit;

begin; set constraints all deferred; delete from x; delete from y; insert into y values(2); insert into x values(2); select * from x; select * from y;set constraints all immediate;


No file was uploaded with this report


pgsql-bugs by date

Next:From: Florian BaumertDate: 2001-09-20 09:37:44
Subject: Re: Bug #456: postgres dumps core in initlocalbuffer
Previous:From: Tom LaneDate: 2001-09-19 18:03:47
Subject: Re: Bug #456: postgres dumps core in initlocalbuffer

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group