Re: Multiple SRF right after SELECT

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Multiple SRF right after SELECT
Дата
Msg-id 1620.1205939426@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Multiple SRF right after SELECT  ("Nikolay Samokhvalov" <samokhvalov@gmail.com>)
Список pgsql-hackers
"Nikolay Samokhvalov" <samokhvalov@gmail.com> writes:
>  1. Is it correct at all to use SRF in select list, w/o explicit FROM?

You can read about the current behavior in ExecTargetList, but basically
the idea is to cycle all the SRFs until they all say "done" at the same
time.  So the number of result rows is the least common multiple of the
sizes of the SRF outputs.

This behavior is pretty random, I agree, but we inherited it from
Berkeley ... and even if we didn't care about breaking existing
applications that might rely on it, it's not exactly clear what it
should be instead.

The fact that there isn't any obviously right behavior is why I'd
prefer to deprecate SRFs in targetlists ...
        regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: stored procedure stats in collector
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Final Thoughts for 8.3 on LWLocking and Scalability