Re: Bug? Function with side effects not evaluated in CTE
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Bug? Function with side effects not evaluated in CTE |
| Дата | |
| Msg-id | 7748.1381958812@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Bug? Function with side effects not evaluated in CTE (Moshe Jacobson <moshe@neadwerx.com>) |
| Ответы |
Re: Bug? Function with side effects not evaluated in CTE
|
| Список | pgsql-general |
Moshe Jacobson <moshe@neadwerx.com> writes:
> However, It behaves as one would expect if the first CTE is built with INSERT
> ... RETURNING.
CTEs containing INSERT/UPDATE/DELETE are guaranteed to be executed exactly
once. CTEs containing SELECTs are guaranteed to be executed at most once
(the documentation phrases that as "execution can stop early if the outer
query doesn't read all the rows" --- in this case, it read none of them,
since the outer query never had to evaluate the NOT IN).
I see no bug here.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера