Re: PlPython

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kevin Jacobs <jacobs(at)penguin(dot)theopalgroup(dot)com>
Cc: elein(at)varlena(dot)com, joconnor(at)cybermesa(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: PlPython
Date: 2003-07-01 13:46:32
Message-ID: 2555.1057067192@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Kevin Jacobs <jacobs(at)penguin(dot)theopalgroup(dot)com> writes:
> On Mon, 30 Jun 2003, Tom Lane wrote:
>> I've also commented out the paragraph about global data and function
>> arguments pending resolution of the question. Given the reference to
>> restricted execution objects in the original text, I would think that
>> the removal of rexec usage means that plpython functions can now get at
>> any global data. But I'm not a Python user and might be
>> misunderstanding the point.

> The scope of each function is still private, so global data are not shared
> unless explicitly stored in the "GD" dictionary. This is still the case
> with my updated code.

Okay, but surely the reference to restricted execution objects is now
wrong? Can you give me corrected text for the para in question?

Each function gets its own restricted execution object in the
Python interpreter, so that global data and function arguments from
<function>myfunc</function> are not available to
<function>myfunc2</function>. The exception is the data in the
<varname>GD</varname> dictionary, as mentioned above.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-07-01 13:53:30 Re: PlPython
Previous Message Henrik Steffen 2003-07-01 13:40:59 Re: Cannot create unique index

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-07-01 13:53:30 Re: PlPython
Previous Message Rod Taylor 2003-07-01 13:26:40 Re: dblink for Oracle - question ...