Re: [HACKERS] (Debian Bug#41223) cascaded updates with refint insert bogus data
В списке pgsql-hackers по дате отправления:
| От | Vadim Mikheev |
|---|---|
| Тема | Re: [HACKERS] (Debian Bug#41223) cascaded updates with refint insert bogus data |
| Дата | |
| Msg-id | 3793EACE.444630D3@krs.ru обсуждение исходный текст |
| Ответ на | (Debian Bug#41223) cascaded updates with refint insert bogus data (Carlos Fonseca <cmfonsec@ualg.pt>) |
| Список | 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.lambertini@everex.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
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера