Re: [HACKERS] session persistent data for plperl

2004-02-09 Thread Andrew Dunstan
Josh Berkus wrote: Adnrew, Jsoh :-) You want to really make PL/Perl more useful? Add an SPI interface, and work out the kinks in error-trapping via eval{}. This would be far more useful that session variables. Just a thought. I don't intend to stop there. I admit that the gain in valu

Re: [HACKERS] session persistent data for plperl

2004-02-09 Thread Josh Berkus
Adnrew, > The attached tiny patch (not intended for application yet) provides a > space for plperl functions to create and share session persistent data, > which I should think would increase the utility of plperl. You want to really make PL/Perl more useful? Add an SPI interface, and work out

Re: [HACKERS] session persistent data for plperl

2004-02-08 Thread Thomas Hallgren
I'm not insisting anything. I merely suggest something that all pl implementations would have a potential benefit from. But perhaps I should insist. Both with respect to plperl, pltcl, or any other pl where session data is possible. IMHO, session data spanning more than one transcation is dangero

Re: [HACKERS] session persistent data for plperl

2004-02-08 Thread Andrew Dunstan
As Tom Lane noted, pltcl already allows this. In fact, it appears that plperl already allows functions to create their own session-persistent data, but doesn't share data between functions. I guess there's a philosophical question: should we apply transactional safety to (transient) data not st

Re: [HACKERS] session persistent data for plperl

2004-02-08 Thread Tom Lane
"Thomas Hallgren" <[EMAIL PROTECTED]> writes: > "Andrew Dunstan" <[EMAIL PROTECTED]> wrote: >> The attached tiny patch (not intended for application yet) provides a >> space for plperl functions to create and share session persistent data, > What about transactions? AFAICS, Andrew is just emulati

Re: [HACKERS] session persistent data for plperl

2004-02-08 Thread Thomas Hallgren
What about transactions? Let's say the first call was in a transaction that's been rolled back. Semantically, that means the call never happened. If you maintain the session data in a table, everything is fine of course. But if it's in memory the solution has some rather nasty implications to it.

Re: [HACKERS] session persistent data for plperl

2004-02-08 Thread Andrew Dunstan
I wrote: The attached tiny patch (not intended for application yet) provides a space for plperl functions to create and share session persistent data, which I should think would increase the utility of plperl. Essentially it creates a hash called %session_globals which it then injects into t

[HACKERS] session persistent data for plperl

2004-02-08 Thread Andrew Dunstan
The attached tiny patch (not intended for application yet) provides a space for plperl functions to create and share session persistent data, which I should think would increase the utility of plperl. Essentially it creates a hash called %session_globals which it then injects into the safe cont