Re: Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

From: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Wishlist of PL/Perl Enhancements for PostgreSQL 8.5
Date: 2009-10-06 20:34:00
Message-ID: 20091006203400.GA9357@timac.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 06, 2009 at 09:18:22AM -0700, David Fetter wrote:
> On Tue, Oct 06, 2009 at 09:34:52AM -0400, Alvaro Herrera wrote:
> > David Fetter wrote:
> > > On Tue, Oct 06, 2009 at 09:57:39AM +0100, Tim Bunce wrote:
> >
> > > > * Enable configuration of perl at initialization
> > > >
> > > > Add ability to specify in postgresql.conf some code to be run
> > > > when a perl interpreter is initialized. For example:
> > > >
> > > > plperl.at_init_do = 'use lib qw(/path/to/mylib); use
> > > > MyPlPerlUtils; use List::Util qw(sum);'
> > >
> > > Would there be some way to integrate this with the per-ROLE,
> > > per-database GUC infrastructure?
> >
> > I don't have that patch installed right now but I don't think it
> > would change the current behavior, which is that it should work just
> > fine (and if it doesn't, that's a bug).
> >
> > One thing that's not clear to me is how would this work for
> > non-superusers. Wouldn't this violate the Safe containment? If it
> > does then it should be superuser-only, no?

It must be superuser-only as it executes at interpreter initialization
before the Safe compartment is created.

> Setting it, sure. I was thinking it could be handy for different
> roles in different DBs to be able to have different PL/Perls :)

It would be handy, so I'll add a separate plperl.at_safe_init_do
to specify code to execute inside the safe compartment when it's first
created. Thanks.

Tim.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Postgres User 2009-10-06 20:43:55 Composite types and tables - when to use?
Previous Message Andrew Bartley 2009-10-06 20:23:22 Re: Fatal error on start