Thom Brown <t...@linux.com> writes:
> WITH t AS (UPDATE foo SET col = true)
> SELECT * FROM foo WHERE col = false;

> ... Wouldn't this be more practical to have foo's UPDATEs applied prior to
> SELECT?  Otherwise what would the usecase be?

If that's what you want, you might as well just issue two separate
statements.  There is no use-case for this at all unless the WITH
produces some RETURNING data that the SELECT makes use of.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to