Re: Howto create a plperlu function as user (not superuser)??

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Howto create a plperlu function as user (not superuser)??
Дата
Msg-id 20050915194643.GB5936@fetter.org
обсуждение исходный текст
Ответ на Howto create a plperlu function as user (not superuser)??  (Brent Wood <b.wood@niwa.co.nz>)
Список pgsql-general
On Wed, Sep 14, 2005 at 04:11:25PM +1200, Brent Wood wrote:
> Hi,
>
> My problem is that the language needs to be plperlu (the unsecured
> implementation of plperl) to be allowed to execute the system call
> to get the depth at the specified location. To work, the plperlu
> function must be created by the superuser, who I assume is postgres.

The reason that only the superuser can do this is that a procedure in
any untrusted PL can do things like 'rm -rf $PGDATA' and have it
obeyed.

> That is not me.  Sigh.  Is there any way I can develop (with the
> various "create or replace function" iterations this wiil probably
> require) this plperlu function as a non superuser?

Nope.  Assuming you can't get access as db superuser, you might want
to look into LISTEN/NOTIFY system

    http://blackhawk.supernews.net/listen.pl.txt
    http://www.postgresql.org/docs/current/static/libpq-notify.html
    http://www.postgresql.org/docs/current/static/sql-listen.html

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Deadlock
Следующее
От: Emi Lu
Дата:
Сообщение: Questions about "varchar" NOT NULL default = char(1) ?