Re: WIP patch: convert SQL-language functions to return tuplestores

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WIP patch: convert SQL-language functions to return tuplestores
Дата
Msg-id 13894.1225108943@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: WIP patch: convert SQL-language functions to return tuplestores  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: WIP patch: convert SQL-language functions to return tuplestores  ("Robert Haas" <robertmhaas@gmail.com>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Sun, Oct 26, 2008 at 09:49:49PM -0400, Tom Lane wrote:
>> So I'm concluding that we can easily afford to switch to tuplestore-always
>> operation, especially if we are willing to put any effort into tuplestore
>> optimization.

> I thought that the bad case for a tuplestore was if the set returning
> function was expensive and the user used it with a LIMIT clause. In the
> tuplestore case you evaluate everything then throw it away.

I'm not terribly excited by that example --- but in any case, the real
solution to any problem that involves communication between function and
calling query is to make sure that the function can get inlined into the
query.  That was an option we didn't have back in 8.2; but it's there
now.  My test case deliberately disables that optimization ...
        regards, tom lane


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Parsing errors in pg_hba.conf
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Visibility map, partial vacuums