Referential integrity problem postgresql 7.2 ? - Mailing list pgsql-bugs

From srb@cuci.nl (Stephen R. van den Berg)
Subject Referential integrity problem postgresql 7.2 ?
Date
Msg-id 20020610215833.GA1782@cuci.nl
Whole thread Raw
Responses Re: Referential integrity problem postgresql 7.2 ?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-bugs
Should the following piece of code cause an:
ERROR:  <unnamed> referential integrity violation - key referenced
 from b not found in a
Or should it work because the check is deferred and in the
end no violations are present?

create table a(ia int primary key);
create table b(ia int references a initially deferred);
insert into a values (7);
begin;
insert into b values (-7);
update b set ia=-ia where ia<0;
commit;
drop table a;
drop table b;

--
Sincerely,                                                          srb@cuci.nl
           Stephen R. van den Berg (AKA BuGless).

"-- hit any user to continue"

pgsql-bugs by date:

Previous
From: "vikas p verma"
Date:
Subject: PostGres Doubt
Next
From: Matej Hollý
Date:
Subject: referential integrity error