Re: Behavior of ON DELETE CASCADE in CTEs

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Behavior of ON DELETE CASCADE in CTEs
Дата
Msg-id CAKFQuwbr=xhxaDYekUSbpCcyTe_Xak2BTw9TpoaW6S95n+iO_g@mail.gmail.com
обсуждение исходный текст
Ответ на Behavior of ON DELETE CASCADE in CTEs  (Kirk Parker <khp@equatoria.us>)
Ответы Re: Behavior of ON DELETE CASCADE in CTEs
Список pgsql-docs
On Wednesday, September 4, 2024, Kirk Parker <khp@equatoria.us> wrote:

And the relevance to this current list is: if it IS intended behavior, can it be documented somewhere?

It’s follows from this paragraph:


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 one another's 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.

David J.

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