Re: wCTE behaviour - Mailing list pgsql-hackers

From Tom Lane
Subject Re: wCTE behaviour
Date
Msg-id 17326.1289496551@sss.pgh.pa.us
Whole thread Raw
In response to Re: wCTE behaviour  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: wCTE behaviour
List pgsql-hackers
"David E. Wheeler" <david@kineticode.com> writes:
> I can see that, but if one can't see the result of the write, or can't determine whether or not it will be visible in
advance,what's the point of writeable CTEs?
 

The writeable CTE returns a RETURNING set, which you can and should use
in the outer query.  The thing that is being argued about here is what
you see if you look "directly" at the target table rather than making
use of RETURNING.  Essentially, I'm arguing that we shouldn't promise
any particular behavior at that level, just as we don't promise that
UPDATE updates different rows in any determinate order.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: MULTISET and additional functions for ARRAY
Next
From: Tom Lane
Date:
Subject: Re: wCTE behaviour