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

From: Brent Wood <b(dot)wood(at)niwa(dot)co(dot)nz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Brent Wood <b(dot)wood(at)niwa(dot)co(dot)nz>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Howto create a plperlu function as user (not superuser)??
Date: 2005-09-15 03:57:50
Message-ID: 20050915154809.J23993@storm-user.niwa.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 14 Sep 2005, Tom Lane wrote:

> Brent Wood <b(dot)wood(at)niwa(dot)co(dot)nz> writes:
> > 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?
>
> If you could, it would be a security hole, which we would fix with
> utmost alacrity. Untrusted-language functions may only be created
> by superusers.

Pretty much what I expected but figured I'd ask :-)

>
> Can you compartmentalize the depth-accessing function as a small
> plperlu function, and do all the interesting stuff in plain plperl
> atop that?
>

Much of the preprocessing required is in plpgsql using PostGIS functions.

The whole Perl thing is only about 10 lines long so not worth splitting if
avoidable. The depth accessing command is a one line system call with
coords as parameters. The rest just builds a bounding box for the point
location so that the call to GMT restricts it's access to the terrain
model to a few square degrees worth of data and not the entire few Gb :-)
A bit faster that way!

One option is another system with Postgres/PostGIS where I am superuser &
can develop, then get the superuser of the working database to run the
SQL's for me to create the functions. Or see if the situation can justify
me getting superuser status. Working with code can be easier than
wrestling with beauracracy :-)

Thanks,

Brent

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tino Wildenhain 2005-09-15 05:16:25 Re: MS SQL - PostgreSQL
Previous Message Tom Lane 2005-09-15 02:57:45 Re: Howto create a plperlu function as user (not superuser)??