Re: [INTERFACES] Python modules for PL/Python? - Mailing list pgsql-novice

From Michael Fuhr
Subject Re: [INTERFACES] Python modules for PL/Python?
Date
Msg-id 20050307073316.GA23982@winnie.fuhr.org
Whole thread Raw
In response to Re: Python modules for PL/Python?  (Wolfgang Keller <wolfgang.keller.nospam@gmx.de>)
List pgsql-novice
On Mon, Mar 07, 2005 at 07:39:53AM +0100, Wolfgang Keller wrote:
> >> potentially dumb question: if I want to use non-standard Python modules
> >> within PL/Python, I guess I have to recompile something (plpython.dll in
> >> the /lib folder)?
> >
> > Are you having trouble using a module from a PL/Python function?
>
> Oops, I didn't even try to use anything non-standard...

So try something :-)  If you have problems then please report what
you did and what happened.

> I stupidly assumed that Postgres comes with its own Python interpreter
> compiled-in...?

No, at least not on Unix-like platforms.  PL/Python is a shared
object (plpython.so) that's linked against libpython, which is the
Python runtime library for whatever version of Python you have
installed.  That library should be able to find modules in the same
module search path (sys.path) that an ordinary Python program uses.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-novice by date:

Previous
From: Wolfgang Keller
Date:
Subject: Re: Python modules for PL/Python?
Next
From: "Sean Davis"
Date:
Subject: Re: Getting started - Interfacing questions