Re: wCTE behaviour

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: wCTE behaviour
Дата
Msg-id 9D024E93-80D2-42FC-952F-9D5F15ECFB9B@cs.helsinki.fi
обсуждение исходный текст
Ответ на Re: wCTE behaviour  (David Fetter <david@fetter.org>)
Ответы Re: wCTE behaviour  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 13 Nov 2010, at 15:41, David Fetter <david@fetter.org> wrote:

> On Sat, Nov 13, 2010 at 02:28:35PM +0100, Yeb Havinga wrote:
>> On 2010-11-12 16:51, David Fetter wrote:
>>> On Fri, Nov 12, 2010 at 10:25:51AM -0500, Tom Lane wrote:
>>>>
>>>> Yeah, that's another interesting question: should we somehow force
>>>> unreferenced CTEs to be evaluated anyhow?
>>> Yes.
>> After a night's sleep I'm still thinking no. Arguments:
>> 1) the name "Common Table Expression" suggests that t must be
>> regarded as an expression, hence syntactically / proof theoretic and
>> not as a table, set of rows / model theoretic. I.e. it is not a
>> "Common Table".
>
> Disagree.  A table never referred to in a query still exists.
> Similarly, if a normal CTE called a data-changing function but was
> nevertheless not referred to, it would still run.

Actually, it wouldn't.

But if we make the behaviour of wCTEs hard(er) to predict, we are  
going to have a pretty bad feature in our hands.  Let's not repeat our  
mistakes, please.


Regards,
Marko Tiikkaja


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

Предыдущее
От: Yeb Havinga
Дата:
Сообщение: Re: wCTE behaviour
Следующее
От: Tom Lane
Дата:
Сообщение: Re: max_wal_senders must die