From: | "Joshua b(dot) Jore" <josh(at)greentechnologist(dot)org> |
---|---|
To: | Adrian 'Dagurashibanipal' von Bidder <avbidder(at)fortytwo(dot)ch> |
Cc: | pgsql-general(at)postgresql(dot)org, Diana Senn <diana(at)fortytwo(dot)ch> |
Subject: | Re: Problem (bug?) with deferred foreign key checks? |
Date: | 2002-06-10 12:52:25 |
Message-ID: | Pine.BSO.4.44.0206100751200.20691-100000@kitten.greentechnologist.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)fortytwo(dot)ch: key id 0x92082481
> avbidder(at)acter(dot)ch: key id 0x5E4B731F
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | molinet | 2002-06-10 13:51:10 | error on index - HELP |
Previous Message | Diana Senn | 2002-06-10 12:36:29 | Re: Problem (bug?) with deferred foreign key checks? |