Re: BUG #5987: Rows created by WITH (INSERT ... RETURNING) are not visible to the rest of the query
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #5987: Rows created by WITH (INSERT ... RETURNING) are not visible to the rest of the query |
| Дата | |
| Msg-id | 7850.1303241387@sss.pgh.pa.us обсуждение |
| Ответ на | BUG #5987: Rows created by WITH (INSERT ... RETURNING) are not visible to the rest of the query ("Daniel Grace" <dgrace@wingsnw.com>) |
| Список | pgsql-bugs |
"Daniel Grace" <dgrace@wingsnw.com> writes: > Description: Rows created by WITH (INSERT ... RETURNING) are not > visible to the rest of the query This is not a bug but the designed behavior. See http://developer.postgresql.org/pgdocs/postgres/queries-with.html particularly this bit: The sub-statements in WITH are executed concurrently with each other and with the main query. Therefore, when using data-modifying statements in WITH, the order in which the specified updates actually happen is unpredictable. All the statements are executed with the same snapshot (see Chapter 13), so they cannot "see" each others' effects on the target tables. This alleviates the effects of the unpredictability of the actual order of row updates, and means that RETURNING data is the only way to communicate changes between different WITH sub-statements and the main query. regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера