Re: wCTE behaviour

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: wCTE behaviour
Дата
Msg-id 4CDC1EC5.9050206@cs.helsinki.fi
обсуждение исходный текст
Ответ на Re: wCTE behaviour  (David Fetter <david@fetter.org>)
Ответы Re: wCTE behaviour  (Thom Brown <thom@linux.com>)
Re: wCTE behaviour  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: wCTE behaviour  (Yeb Havinga <yebhavinga@gmail.com>)
Список pgsql-hackers
On 2010-11-11 6:41 PM +0200, David Fetter wrote:
> On Thu, Nov 11, 2010 at 04:15:34AM +0200, Marko Tiikkaja wrote:
>> The discussion around wCTE during the last week or so has brought to
>> my attention that we don't actually have a consensus on how exactly
>> wCTEs should behave.  The question seems to be whether or not a
>> statement should see the modifications of statements ran before it.
>> While I think making the modifications visible would be a lot more
>> intuitive, it's not clear how we'd optimize the execution in the
>> future without changing the behaviour (triggers are a big concern).
>
> +1 for letting writeable CTEs see the results of previous CTEs, just
> as current non-writeable ones do.  A lot of the useful cases for this
> feature depend on this visibility.

Just to be clear, the main point is whether they see the data 
modifications or not.  The simplest case to point out this behaviour is:

WITH t AS (DELETE FROM foo)
SELECT * FROM foo;

And the big question is: what state of "foo" should the SELECT statement 
see?


Regards,
Marko Tiikkaja


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

Предыдущее
От: Mark Cave-Ayland
Дата:
Сообщение: Re: improved parallel make support
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: improved parallel make support