Thom Brown <thom(at)linux(dot)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