Re: wCTE behaviour

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: wCTE behaviour
Дата
Msg-id 17467.1289496895@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: wCTE behaviour  (Thom Brown <thom@linux.com>)
Ответы Re: wCTE behaviour  (David Fetter <david@fetter.org>)
Список pgsql-hackers
Thom Brown <thom@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


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: wCTE behaviour
Следующее
От: Marko Tiikkaja
Дата:
Сообщение: Re: wCTE behaviour