Slythe & Database PL initialization

Adrian Klaver aklaver at comcast.net
Mon May 29 23:23:36 UTC 2006


On Monday 29 May 2006 03:39 pm, James William Pye wrote:
> On Mon, May 29, 2006 at 11:53:37AM -0700, Adrian Klaver wrote:
> > On Sunday 28 May 2006 01:06 pm, James William Pye wrote:
> > > For Slythe 0.2(the remote console), I'm thinking about implementing a
> > > convenient way to initialize the PL inside a database. Much like what
> > > createlang does for the standard PLs. I've been wanting to do something
> > > like this, but I never wanted to spawn a completely new script that
> > > hangs around for that sole purpose, which is why I want to spin this
> > > capability into the 'pg_python' command as it seems like it might fit.
> >
> > If I understand correctly this means you would use pg_python to do the
> > job of createlang  python dbname.
>
> Right. It would simply be an extra option to the pg_python command, -IL and
> --install-language(or should it be -CL and --create-language?). So:
>
> pg_python -h localhost -U pgsql -d foo -L plpython -IL python24-teop
>
> Where -IL is specifying the path to the extension(immediately relative to
> the $libdir). Unfortunately, I don't think we'll be able to get more
> advanced than that; ie, being able to select the language's library based
> on a directory listing of $libdir seems out of reach AFAICT.
I think  -CL --create-language would be a more obvious link to the Postgres 
way of doing things.

-- 
Adrian Klaver	
aklaver at comcast.net


More information about the Python-general mailing list