Re: Behavior of ON DELETE CASCADE in CTEs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Behavior of ON DELETE CASCADE in CTEs
Дата
Msg-id 1729420.1725499661@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Behavior of ON DELETE CASCADE in CTEs  (Kirk Parker <khp@equatoria.us>)
Список pgsql-docs
Kirk Parker <khp@equatoria.us> writes:
> It appears that in With-queries (CTE) the ON CASCADE DELETE deletions
> happen at the very end of the entire statement. I have two questions about
> this:

> (1) Is this a correct observation?
> (2) Is this intentional behavior, or only an accident of the implementation?

I believe it's required by SQL spec.  Or more accurately, the spec
says that constraint-triggered actions happen either at the end of the
statement or the end of the transaction, depending on whether you set
them as "deferred".

            regards, tom lane



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