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!