Re: Common Table Expressions (WITH RECURSIVE) patch

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Common Table Expressions (WITH RECURSIVE) patch
Дата
Msg-id 603c8f070809082201t21a80b2aqb195e0e7b425776e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Common Table Expressions (WITH RECURSIVE) patch  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Список pgsql-hackers
>> * Single Evaluation:
>>
>>   with
>>     foo(i) as (select random() as i)
>>   select * from foo union all select * from foo;
>>            i
>>   -------------------
>>    0.233165248762816
>>     0.62126633618027
>>   (2 rows)
>>
>>   The standard specifies that non-recursive WITH should be evaluated
>>   once.
>
> What shall we do? I don't think there's a easy way to fix this. Maybe
> we should not allow WITH clause without RECURISVE?

ISTM that kind of misses the point.  Even if it's WITH RECURSIVE
rather than simply WITH, one wouldn't expect multiple evaluations of
any non-recursive portion of the query.

...Robert


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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Common Table Expressions (WITH RECURSIVE) patch
Следующее
От: Greg Smith
Дата:
Сообщение: Re: [gsmith@gregsmith.com: Re: [patch] GUC source file and line number]