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? "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #13465: multi update query use CTE, result & plan
not equal, BUG? 德哥 <digoal@126.com>
Re: BUG #13465: multi update query use CTE, result & plan
not equal, BUG? Marko Tiikkaja <marko@joh.to>
Re: BUG #13465: multi update query use CTE, result & plan
not equal, BUG? "David G. Johnston" <david.g.johnston@gmail.com>
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 по дате отправления