Re: BUG #13465: multi update query use CTE, result & plan not equal, BUG?

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: BUG #13465: multi update query use CTE, result & plan not equal, BUG?
Дата
Msg-id 558BFCAB.6050505@joh.to
обсуждение исходный текст
Ответ на Re: BUG #13465: multi update query use CTE, result & plan not equal, BUG?  (德哥 <digoal@126.com>)
Список pgsql-bugs
On 6/25/15 2:27 AM, µÂ¸ç wrote:
> But Why, The same SQL has two diff result?
> It's not a BUG?

This test case is still really difficult to follow, but I believe what
you're seeing is documented here:
http://www.postgresql.org/docs/current/static/queries-with.html

"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 row that was already updated in the same
statement: only the update is performed. Therefore you should generally
avoid trying to modify a single row twice in a single statement. In
particular avoid writing WITH sub-statements that could affect the same
rows changed by the main statement or a sibling sub-statement. The
effects of such a statement will not be predictable."


.m

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

Предыдущее
От: hunkaverage@gmail.com
Дата:
Сообщение: BUG #13468: System hijacked by PostgreSQL user
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug in docs - modifiers for to_char()