Re: PL/Python import _sre module error

Поиск
Список
Период
Сортировка
От Glenn R Williams
Тема Re: PL/Python import _sre module error
Дата
Msg-id 1055803534.4601.4.camel@gwpogo.localdomain
обсуждение исходный текст
Ответ на Re: PL/Python import _sre module error  (Gerhard Häring <lists@ghaering.de>)
Ответы Re: PL/Python import _sre module error  (Gerhard Häring <lists@ghaering.de>)
Список pgsql-interfaces
Thanks, Gerhard.

Now that rexec and friends are disabled in Python > 2.2.3, what is the
future of PL/Python? Will it wither away? I don't know how many other
modules are impacted by the same problem, but will pursue the matter on
the Python list. Thanks for your help, though!

Best Regards,
Glenn

On Mon, 2003-06-16 at 16:39, Gerhard Häring wrote:
> Glenn R Williams wrote:
> > Hi All,
> >
> > Does anyone else have a problem with importing the re package
> > I am using:
> >
> > Redhat 9.0
> > PostgreSQL 7.3.3
> > Python 2.2.2.26
> >
> > When I create a function:
> >
> > import re
> > o = args[0]
> > b = re.match(r"^t.*",o)
> > if b:
> >    return "fits the bill"
> > return "failed the test"
> >
> > PostgreSQL fails, and returns the error message:
> >
> > exceptions.ImportError: No module named _sre
> >
> > If I go into python, this is not a problem, so I suppose it is somehow
> > due to the restricted execution environment and/or PostgreSQL. But
> > that's as far as I get.
>
> Correct. re is not enabled, because you can create arbitrary cpu (and
> perhaps also memory) utilization with it. Thus it's unsafe.
>
> > Any suggestions on how to pinpoint the problem? [...]
>
> Fork pl/python and create an unsafe version without any restrictions?
> That's what I once did just for fun. I think that'll be necessary
> anyway, because with Python >= 2.2.3, rexec and friends are disabled anyway.
>
> -- Gerhard
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
--
Glenn R Williams
Software for the International Community
----------------------------------------------------------------------
Mathematical theories are the part of science you could continue to do
if you woke up tomorrow and discovered the universe was gone.

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

Предыдущее
От: Gerhard Häring
Дата:
Сообщение: Re: PL/Python import _sre module error
Следующее
От: Gerhard Häring
Дата:
Сообщение: Re: PL/Python import _sre module error