From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: plpython is broken for recursive use |
Date: | 2015-10-17 16:17:59 |
Message-ID: | 562274B7.5070709@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 10/16/2015 10:03 PM, Tom Lane wrote:
> I wrote:
>> This seems like a very Rube-Goldbergian way of setting up a local
>> namespace for the user-defined code. I think perhaps what we should do
>> is:
>> 1. Compile the user-supplied code directly into a code object, without
>> wrapping it in a "def". (Hence, PLy_procedure_munge_source goes away
>> entirely, which would be nice.) Forget about generating a code object
>> containing a call, too.
> After further study, it appears this approach won't work because it
> breaks "yield" --- AFAICT, Python only allows "yield" inside a "def".
>
> At this point I think what we need is to find a way of passing the
> function parameters honestly, that is, as actual parameters in the
> manufactured call. I've not looked into how that might be done.
+1 if it can be done
I haven't looked very closely at plpython for a long time, but anything
else seems ugly.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2015-10-17 16:26:15 | Re: buildfarm failures on crake and sittella |
Previous Message | Jim Nasby | 2015-10-17 16:15:34 | Re: Proposal: SET ROLE hook |