Re: Understanding behavior of SELECT with multiple unnested columns

Поиск
Список
Период
Сортировка
От Ian Lawrence Barwick
Тема Re: Understanding behavior of SELECT with multiple unnested columns
Дата
Msg-id CAB8KJ=jXtnVB5peGm04rtJ848-pHq_-rcYaFEyySPZK+TGDtNA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Understanding behavior of SELECT with multiple unnested columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
2013/3/27 Tom Lane <tgl@sss.pgh.pa.us>:
> Gavin Flower <GavinFlower@archidevsys.co.nz> writes:
>> The rule appears to be,
>> where N_x & N_y are the number of entries returned for x & y:
>> N_result = is the smallest positive integer that has N_x & N_y as factors.
>
> Right: if there are multiple set-returning functions in a SELECT list,
> the number of rows you get is the least common multiple of their
> periods.  (See the logic in ExecTargetList that cycles the SRFs until
> they all report "done" at the same time.)  I guess there's some value
> in this for the case where they all have the same period, but otherwise
> it's kind of bizarre.  It's been like that since Berkeley days though,
> so I doubt we'll consider changing it now.  Rather, it'll just be
> quietly deprecated in favor of putting SRFs into FROM (with LATERAL
> where needed).

Thanks for the clarification, I was half-worried there was some fundamental
set theory or something which had passed me by.

Regards

Ian Barwick


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

Предыдущее
От: CR Lender
Дата:
Сообщение: Re: pg_stat_get_last_vacuum_time(): why non-FULL?
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: Why does Postgres allow duplicate (FK) constraints