Re: plperl exception catching

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: plperl exception catching
Дата
Msg-id 20061213221059.GH15546@svana.org
обсуждение исходный текст
Ответ на Re: plperl exception catching  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: plperl exception catching  (Marc Evans <Marc@SoftwareHackery.Com>)
Список pgsql-general
On Wed, Dec 13, 2006 at 05:04:42PM -0500, Tom Lane wrote:
> Bricklen Anderson <banderson@presinet.com> writes:
> > Marc Evans wrote:
> >> OK, I must be missing something obvious:
> >> ERROR:  creation of Perl function failed: 'eval "string"' trapped by
> >> operation mask at line 2.
>
> > Try as plperlu
>
> This brings up the question of whether it'd be safe to allow eval in
> plperl functions.  I'm not sure why it's excluded now ... does it allow
> access to untrusted operations?

ISTM there being something about the Safe module in perl not being able
to enable eval while staying "safe", so to speak.

Looking at the safe module it looks like you can exclude certain
functions from restrictions. The manpage has an example, so a simple
try/catch mechanism could be created if enabling "eval" directly isn't
ok.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: a question for the way-back machine
Следующее
От: Ben
Дата:
Сообщение: Re: a question for the way-back machine