pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Wolfgang Keller <wolfgang.keller.nospam@gmx.de>
Cc: pgsql-novice@postgresql.org
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [NOVICE] Python modules for PL/Python?
Date: Mon, 7 Mar 2005 00:33:16 -0700
Message-ID: <20050307073316.GA23982@winnie.fuhr.org> (raw)
In-Reply-To: <81wj7n129ysu$.1sn8d1un8kgdx$.dlg@40tude.net>
References: <a20i2qxoum5k$.dltedwv7mym9.dlg@40tude.net>
	<20050306192632.GB8834@winnie.fuhr.org>
	<81wj7n129ysu$.1sn8d1un8kgdx$.dlg@40tude.net>

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/



view thread (4+ messages)

Message-ID: <20050307073316.GA23982@winnie.fuhr.org>
Permalink:  ../20050307073316.GA23982@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050307073316.GA23982@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: mike@fuhr.org, wolfgang.keller.nospam@gmx.de, pgsql-novice@postgresql.org
  Subject: Re: [NOVICE] Python modules for PL/Python?
  In-Reply-To: <20050307073316.GA23982@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox