Re: plpython is broken for recursive use

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: plpython is broken for recursive use
Date: 2015-10-15 22:15:55
Message-ID: 5620259B.5000404@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/15/2015 02:16 PM, Josh Berkus wrote:
> On 10/15/2015 01:10 PM, Tom Lane wrote:
>> I think this means that we should get rid of proc->globals and instead
>> manufacture a new globals dict locally in each call to PLy_exec_function
>> or PLy_exec_trigger. For SETOF functions it would be necessary to keep
>> the globals dict reference somewhere in the FunctionCallInfo struct,
>> probably. Not sure about cleaning up after an error that occurs between
>> SETOF callbacks --- we might need plpython to grow an at-abort callback to
>> do decref's on unreleased dicts.
>
> Don't people currently specifically treat the state of the globals dict
> as a feature? That is, make use of the fact that you can store
> session-persistent data in it?

Yes, just like the plperl feature.

jD

>

--
Command Prompt, Inc. - http://www.commandprompt.com/ 503-667-4564
PostgreSQL Centered full stack support, consulting and development.
New rule for social situations: "If you think to yourself not even
JD would say this..." Stop and shut your mouth. It's going to be bad.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2015-10-16 00:03:49 Re: Fix unclear comments in tablecmds.c
Previous Message Kevin Grittner 2015-10-15 21:47:19 Re: snapshot too old, configured by time