Re: generate_series

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: generate_series
Дата
Msg-id 9245.1297784855@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: generate_series  (Thom Brown <thom@linux.com>)
Список pgsql-novice
Thom Brown <thom@linux.com> writes:
> On 15 February 2011 02:06, YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> wrote:
>> the following behaviour of multiple generate_series in a select seems
>> a little counter-intuitive to me.

> The output of such queries will keep producing output until all
> generate_series functions are at their end simultaneously.

Right, so the actual number of result rows is the least common multiple
of their periods.  This is undocumented because nobody is very happy
with it and we don't want users relying on it.  Eventually we may
deprecate set-returning functions in SELECT's targetlist altogether,
but that won't happen until there's an adequate replacement (possibly
LATERAL).  In the meantime it's best to avoid having more than one per
SELECT.

            regards, tom lane

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

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: generate_series
Следующее
От: Chetan Suttraway
Дата:
Сообщение: Re: failed commit question