Re: BUG #17689: Two UPDATE operators in common table expressions (CTE) perform not as expected
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #17689: Two UPDATE operators in common table expressions (CTE) perform not as expected |
| Дата | |
| Msg-id | 2251431.1668797594@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: BUG #17689: Two UPDATE operators in common table expressions (CTE) perform not as expected (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
| Ответы |
Re: BUG #17689: Two UPDATE operators in common table expressions (CTE) perform not as expected
|
| Список | pgsql-bugs |
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2022-Nov-18, Marko Tiikkaja wrote:
>> This is a documented limitation:
>>> Trying to update the same row twice in a single statement is not
>>> supported.
> I wonder if we should try to detect the case, and raise an error instead
> of it resulting in undefined behavior.
My recollection is that that is really fallout from an ancient and
intentional executor behavior, that we have to ignore multiple updates
in order to not get into infinite loops. See comment about the
"Halloween problem" in nodeLockRows.c. (I'm pretty sure there were once
more comments about that, somewhere closer to ExecUpdate/ExecDelete ---
this all dates back to Berkeley.)
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера