From: | Vadim Mikheev <vadim(at)krs(dot)ru> |
---|---|
To: | Carlos Fonseca <cmfonsec(at)ualg(dot)pt> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] (Debian Bug#41223) cascaded updates with refint insert bogus data |
Date: | 1999-07-20 03:19:42 |
Message-ID: | 3793EACE.444630D3@krs.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Carlos Fonseca wrote:
>
> I have sent this message to pgsql-general and so far received no reply.
> This bug seems to be 100% reproducible on Linux (i386 and sparc). If this
> problem is specific to Debian, then it would help me to know that, too.
>
> Cascaded updates tend to write old data on top of new, as the following
> minimal example shows:
Unfortunately, when I wrote refint.c ~ 2.5 years ago I used
DELETE for both cascade UPDATE and DELETE. I don't remember why.
Massimo Lambertini (massimo(dot)lambertini(at)everex(dot)it) changed
refint.c to performe UPDATE of foreign keys on UPDATE of primary
ones, but he did error: he uses 1st update new primary key value
in UPDATE _foreign_table_ SET and so execution plan is prepared,
saved, used with this value. Paramater ($1...$n) should be used there.
I have no time to fix it, sorry. Ask him or learn PL/pgSQL and write
trigger youself.
Vadim
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-07-20 03:33:06 | Re: [SQL] Re: [HACKERS] Counting bool flags in a complex query |
Previous Message | Bruce Momjian | 1999-07-20 03:01:37 | Lots of things happening |