Re: Behavior of ON DELETE CASCADE in CTEs - Mailing list pgsql-docs

From Kirk Parker
Subject Re: Behavior of ON DELETE CASCADE in CTEs
Date
Msg-id CANwZ8rmVM4GzJFGW866TR34qtaKmQqFRnHdzN3E02bG2ta89kw@mail.gmail.com
Whole thread Raw
In response to Re: Behavior of ON DELETE CASCADE in CTEs  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-docs
>   The sub-statements in WITH are executed concurrently

That much I did get from the docs.  Given each sub-statement is qualified by the RETURNING results of the previous one, that should at least guarantee the completeness of each query regardless of the order in which individual rows are affected.

Thanks, this has been helpful -- as I reread the page you pointed to, this jumped out at me:

>    All the statements are executed with the same snapshot (see Chapter 13), so they cannot see one another's effects on the target tables. 

That I think specifically covers my question, and Tom Lane's note about end-of-statement was also helpful.  

pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Behavior of ON DELETE CASCADE in CTEs
Next
From: Alain Bourgeois
Date:
Subject: RE: pg_upgrade -c cannot be run if old cluster is running