Re: Howto create a plperlu function as user (not superuser)?? - Mailing list pgsql-general

From David Fetter
Subject Re: Howto create a plperlu function as user (not superuser)??
Date
Msg-id 20050915194643.GB5936@fetter.org
Whole thread Raw
In response to Howto create a plperlu function as user (not superuser)??  (Brent Wood <b.wood@niwa.co.nz>)
List 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 by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Deadlock
Next
From: Emi Lu
Date:
Subject: Questions about "varchar" NOT NULL default = char(1) ?