Re: modifying the tbale function

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: modifying the tbale function
Дата
Msg-id 20070318201506.GF5722@svana.org
обсуждение исходный текст
Ответ на modifying the tbale function  ("Islam Hegazy" <islheg@hotmail.com>)
Ответы Re: modifying the tbale function  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On Sun, Mar 18, 2007 at 01:54:55PM -0600, Islam Hegazy wrote:
> I am trying to modify the execution of the table function to work in
> iterator fashion instead of materializing the output. I have been
> digging the Postgresql code source for about a month now and I can
> figure out where the execution of the table function works. I will be
> very grateful if anyone tell where to begin as my project due is
> after 10 days only.

I've been thinking recently about why it's so difficult. It occurs to
me that the problem is because the language interpreters don't lend
themselves to being an iterator.

What you want is that when you call a perl tablefunction that as soon
as the perl function returns a row to return that to the caller. That
means the perl interpreter has to be able to save all its state,
return to the caller and when next called resume where it left off.
I don't know if it can do that, but it would have to be implemented for
each language (or use threads).

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: "Islam Hegazy"
Дата:
Сообщение: modifying the tbale function
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Bug in UTF8-Validation Code?