Re: modifying the tbale function - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: modifying the tbale function
Date
Msg-id 45FDAE87.2090503@dunslane.net
Whole thread Raw
In response to Re: modifying the tbale function  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: modifying the tbale function  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers

Martijn van Oosterhout wrote:
> 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).
>
>
>   

We haven't even worked out how to do that cleanly for plpgsql, which we 
control, let alone for any third party interpreter.

I'm not convinced it would be a huge gain anyway. Switching madly in and 
out of the perl interpreter at least is a known performance problem, 
IIRC - Perl XML objects have, or used to have, problems with that (and 
they still don't perform terribly well).

cheers

andrew


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Bug in UTF8-Validation Code?
Next
From: Neil Conway
Date:
Subject: Re: modifying the tbale function