Re: Problem (bug?) with deferred foreign key checks? - Mailing list pgsql-general

From Joshua b. Jore
Subject Re: Problem (bug?) with deferred foreign key checks?
Date
Msg-id Pine.BSO.4.44.0206100751200.20691-100000@kitten.greentechnologist.org
Whole thread Raw
In response to Problem (bug?) with deferred foreign key checks?  (Adrian 'Dagurashibanipal' von Bidder <avbidder@fortytwo.ch>)
Responses Re: Problem (bug?) with deferred foreign key checks?  (Diana Senn <diana@fortytwo.ch>)
List pgsql-general
I seem to recall that there is something in 7.1.x where you cannot update
the same row more than once per transaction. Consider altering your code
to not require that or upgrading to 7.2 where that is supposed to be
allowed.

Joshua b. Jore ; http://www.greentechnologist.org ; 1121 1233 1311 200
1201 1302 1211 200 1201 1303 200 1300 1233 1313 1211 1302 1212 1311 1230
200 1201 1303 200 1321 1233 1311 1302 200 1211 1232 1211 1231 1321 200
1310 1220 1221 1232 1223 1303 200 1321 1233 1311 200 1201 1302 1211 232
200 1112 1233 1310 1211 200 1013 1302 1211 1211 1232 201 22

On 10 Jun 2002, Adrian 'Dagurashibanipal' von Bidder wrote:

> Yo!
>
> Why is it not possible to temporarily have illegal values in a table,
> and update them during the transaction to point to real entries in the
> 'super' table?
>
> =====
> avbidder=> create table super (id integer unique);
> NOTICE:  [...]
> CREATE
> avbidder=> create table sub (sid integer references super(id) deferrable
> initially deferred);
> NOTICE:  [...]
> CREATE
> avbidder=> begin;
> BEGIN
> avbidder=> insert into sub values (2);
> INSERT 53513 1
> avbidder=> insert into super values (1);
> INSERT 53514 1
> avbidder=> update sub set sid = 1 where sid = 2;
> UPDATE 1
> avbidder=> commit;
> ERROR:  <unnamed> referential integrity violation - key referenced from
> sub not found in super
> =====
>
> (This is Debian package 7.1.3-7, but I'm told it's there with other
> versions, too)
>
> cheers
> -- vbi
>
>
> --
> secure email with gpg            avbidder@fortytwo.ch: key id 0x92082481
>                                  avbidder@acter.ch:    key id 0x5E4B731F
>
>


pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Non-linear Performance
Next
From: "Sander Steffann"
Date:
Subject: Re: Is this a bug, possible security hole, or wrong assumption?