Re: Recursive calls to functions that return sets

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Recursive calls to functions that return sets
Дата
Msg-id 17459.1143047128@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Recursive calls to functions that return sets  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Recursive calls to functions that return sets  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> I think you're running into a small limitation of set functions here.
> If you look at nodeFunctionScan.c that handles this, you can see that
> the code is written in such a way as to collect all the tuples first
> before returning anything.

I don't think Thomas intended to go through nodeFunctionScan, so this
needn't apply to him.

> Not sure why it does that,

plpgsql and similar languages will return a tuplestore anyway, so it has
to handle that case, and it was convenient to make all the cases look
alike for starters.  Nobody's yet gone back to improve it for the case
of languages that return a tuple per call.
        regards, tom lane


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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: How to put back??
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Recursive calls to functions that return sets