From: | "Peter Schueller" <peter(dot)schueller(at)solution-x(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | deferred constraint trigger problem |
Date: | 2003-04-01 15:55:38 |
Message-ID: | 035101c2f867$241633f0$0805640a@future |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello !
I have the following script, which (in my opinion) should not generate an
error at the final commit.
---
create table aaa_test ( id1 varchar(10), id2 int8, d date, t text, primary
key (id1, id2));
create table aab_test (idrep int8, primary key(idrep));
alter table aaa_test
add foreign key (id2)
references aab_test(idrep) match full
on delete no action on update no action deferrable;
insert into aab_test values (1);
insert into aaa_test values ('a',1);
begin work;
set constraints all deferred;
delete from aab_test where idrep=1;
insert into aab_test (idrep) values (1);
commit;
---
The deferred constraint trigger fires even if I insert the 'missing' value 1
immediately back again into the table.
Does someone know about a workaround in the Version 7.2.1-2 I am using ?
I tried to install 7.3 on an uncritical system and there this error did not
occur - or is this behaviour a matter of configuration ?
Thanks,
Peter Schüller
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-04-01 15:57:44 | Re: dropping a table with dependencies |
Previous Message | Peter Csaba | 2003-04-01 15:54:06 | Rules, Triggers something more challenging |