Re: recursive query crash

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: recursive query crash
Дата
Msg-id 2351.1223778104@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: recursive query crash  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: recursive query crash  ("Robert Haas" <robertmhaas@gmail.com>)
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> I'm inclined to prevent this case by forbidding recursive references
>> inside nested WITH clauses.  Thoughts?

> I'm a bit puzzled where the root of the problem lies here. Surely the nested
> with clause is just equivalent to a plain "select * from z" after all.

If we were to flatten it to a plain "select * from z" then maybe things
would work all right, but the present implementation treats both WITH
clauses as equally requiring single evaluation.

I don't find the flattening argument to be especially compelling
anyway.  Suppose that the query containing the nested WITH refers
to the WITH query more than once (or more than twice, or whatever
your threshold of pain is before you agree that single evaluation is
required).  Should the query suddenly become invalid at that point?
        regards, tom lane


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

Предыдущее
От: "Vladimir Sitnikov"
Дата:
Сообщение: Re: Buffer pool statistics in Explain Analyze
Следующее
От: Ron Mayer
Дата:
Сообщение: Re: The Axe list