Re: PlPython

Поиск
Список
Период
Сортировка
От elein
Тема Re: PlPython
Дата
Msg-id 200306301334.34047.elein@varlena.com
обсуждение исходный текст
Ответ на Re: PlPython  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: PlPython  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
According to my testing that statement about dictionaries
is still valid.

Did you see my other note about which imports
were allowed?

I have only been able to do a tiny bit  of further
testing and found that my test for zlib was wrong, it does
load and my test for module mpz was
inconclusive--there is some unidentified symbol.

I am only sure that codecs kicks out
as an untrusted module.

ERROR:  plpython: Call of function `__plpython_procedure_import_test_1849240' failed.
exceptions.SystemError: Failed to load the builtin codecs: untrusted dynamic module: _codecs

I don't think this is a bug until we decide how it is supposed to work
but the documentation text does say that the whole set is
not supposed to work so that must change somehow.

elein

>Just for general knowledge, with python 2.1.1, I was able to
>import the following documented as "forbidden" modules.
>I have only used "string" so I do NOT assume that enabling
>import means that they all work.  (more testing...)

>        array bisect binascii calendar cmath errno
>        marshal math md5 operator pcre pickle
>        random re regex sha StringIO struct
>        time whrandom string
>
>The following modules from the forbidden
>list caused import errors as expected:
>        zlib, codecs, mpz


On Monday 30 June 2003 11:11, Tom Lane wrote:
> Kevin Jacobs <jacobs@penguin.theopalgroup.com> writes:
> > Attached is a patch that removes all of the RExec code from plpython from
> > the current PostgreSQL CVS.  In addition, plpython needs to be changed to an
> > untrusted language in createlang.
>
> I'm working on the latter and cleaning up the documentation.  How does
> your patch affect this statement in the plpython documentation?
>
>    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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
>

--
=============================================================
elein@varlena.com     Database Consulting     www.varlena.com
PostgreSQL General Bits    http:/www.varlena.com/GeneralBits/
   "Free your mind the rest will follow" -- en vogue


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PlPython
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PlPython