pg.ddx.io pgsql-interfaces@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Python modules for PL/Python? 4+ messages / 2 participants [nested] [flat]
* Python modules for PL/Python? @ 2005-03-06 18:56 Wolfgang Keller <wolfgang.keller.nospam@gmx.de> 2005-03-06 19:26 ` Re: [NOVICE] Python modules for PL/Python? Michael Fuhr <mike@fuhr.org> 0 siblings, 1 reply; 4+ messages in thread From: Wolfgang Keller @ 2005-03-06 18:56 UTC (permalink / raw) To: pgsql-novice@postgresql.org; pgsql-interfaces Hello, 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)? If I would like to avoid re-doing this over and over again in the future, is there a way to make postgresql use the "standard" installation of Python which I already have on my system? TIA, Best regards Wolfgang Keller ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [NOVICE] Python modules for PL/Python? 2005-03-06 18:56 Python modules for PL/Python? Wolfgang Keller <wolfgang.keller.nospam@gmx.de> @ 2005-03-06 19:26 ` Michael Fuhr <mike@fuhr.org> 2005-03-07 06:39 ` Re: [NOVICE] Python modules for PL/Python? Wolfgang Keller <wolfgang.keller.nospam@gmx.de> 0 siblings, 1 reply; 4+ messages in thread From: Michael Fuhr @ 2005-03-06 19:26 UTC (permalink / raw) To: Wolfgang Keller <wolfgang.keller.nospam@gmx.de>; +Cc: pgsql-novice@postgresql.org; pgsql-interfaces On Sun, Mar 06, 2005 at 07:56:46PM +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? If so, then please post a simple function and the error you get when you try to use it, or describe what happens if there's no error. > If I would like to avoid re-doing this over and over again in the future, > is there a way to make postgresql use the "standard" installation of Python > which I already have on my system? What OS and versions of PostgreSQL and Python are you using? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [NOVICE] Python modules for PL/Python? 2005-03-06 18:56 Python modules for PL/Python? Wolfgang Keller <wolfgang.keller.nospam@gmx.de> 2005-03-06 19:26 ` Re: [NOVICE] Python modules for PL/Python? Michael Fuhr <mike@fuhr.org> @ 2005-03-07 06:39 ` Wolfgang Keller <wolfgang.keller.nospam@gmx.de> 2005-03-07 07:33 ` Re: [NOVICE] Python modules for PL/Python? Michael Fuhr <mike@fuhr.org> 0 siblings, 1 reply; 4+ messages in thread From: Wolfgang Keller @ 2005-03-07 06:39 UTC (permalink / raw) To: pgsql-novice@postgresql.org; pgsql-interfaces >> 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... I stupidly assumed that Postgres comes with its own Python interpreter compiled-in...? > What OS and versions of PostgreSQL and Python are you using? Right now: Windows XP, Postgres 8.0.1, Python 2.3 Soon: MacOS X, Postgres 8.X, Python 2.4 Best regards Wolfgang Keller ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [NOVICE] Python modules for PL/Python? 2005-03-06 18:56 Python modules for PL/Python? Wolfgang Keller <wolfgang.keller.nospam@gmx.de> 2005-03-06 19:26 ` Re: [NOVICE] Python modules for PL/Python? Michael Fuhr <mike@fuhr.org> 2005-03-07 06:39 ` Re: [NOVICE] Python modules for PL/Python? Wolfgang Keller <wolfgang.keller.nospam@gmx.de> @ 2005-03-07 07:33 ` Michael Fuhr <mike@fuhr.org> 0 siblings, 0 replies; 4+ messages in thread From: Michael Fuhr @ 2005-03-07 07:33 UTC (permalink / raw) To: Wolfgang Keller <wolfgang.keller.nospam@gmx.de>; +Cc: pgsql-novice@postgresql.org; pgsql-interfaces 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/ ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-03-07 07:33 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2005-03-06 18:56 Python modules for PL/Python? Wolfgang Keller <wolfgang.keller.nospam@gmx.de> 2005-03-06 19:26 ` Michael Fuhr <mike@fuhr.org> 2005-03-07 06:39 ` Wolfgang Keller <wolfgang.keller.nospam@gmx.de> 2005-03-07 07:33 ` Michael Fuhr <mike@fuhr.org>
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