Re: BUG #17689: Two UPDATE operators in common table expressions (CTE) perform not as expected

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: BUG #17689: Two UPDATE operators in common table expressions (CTE) perform not as expected
Дата
Msg-id CAL9smLDd7kvT9xCpOUFwNcvEaz_zsmua8XpuR5Pd6wBdaP33bA@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #17689: Two UPDATE operators in common table expressions (CTE) perform not as expected  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17689: Two UPDATE operators in common table expressions (CTE) perform not as expected
Список pgsql-bugs
This is a documented limitation:

> Trying to update the same row twice in a single statement is not supported. Only one of the modifications takes
place,but it is not easy (and sometimes not possible) to reliably predict which one. This also applies to deleting a
rowthat was already updated in the same statement: only the update is performed. Therefore you should generally avoid
tryingto modify a single row twice in a single statement. In particular avoid writing WITH sub-statements that could
affectthe same rows changed by the main statement or a sibling sub-statement. The effects of such a statement will not
bepredictable. 

https://www.postgresql.org/docs/current/queries-with.html


.m



В списке pgsql-bugs по дате отправления:

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #17689: Two UPDATE operators in common table expressions (CTE) perform not as expected