Re: Set returning functions in select column list

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Set returning functions in select column list
Дата
Msg-id 26377.1329492647@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Set returning functions in select column list  (David Johnston <polobo@yahoo.com>)
Список pgsql-general
David Johnston <polobo@yahoo.com> writes:
> On Feb 16, 2012, at 14:19, Jack Christensen <jackc@hylesanderson.edu> wrote:
>> Can someone explain how set returning functions in a select clause work?

> You apparently just did...it CROSS JOINs except in the special case where multiple functions each return the same
numberof records (generally due to them all operating on the same sized input - like unnest(array) - in which case it
synchronizesthe generated rows. 

I believe the number of rows you get is the least common multiple of the
lengths of the SRF results.  This behavior is widely disliked, but we're
unlikely to change it for fear of breaking working apps.  The long-term
plan is to implement LATERAL in FROM and then deprecate using SRFs in
target lists altogether.

            regards, tom lane

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: MySQL search query is not executing in Postgres DB
Следующее
От: David W Noon
Дата:
Сообщение: Re: Set returning functions in select column list