Re: [INTERFACES] Python modules for PL/Python?
От | Michael Fuhr |
---|---|
Тема | Re: [INTERFACES] Python modules for PL/Python? |
Дата | |
Msg-id | 20050307073316.GA23982@winnie.fuhr.org обсуждение исходный текст |
Ответ на | Re: Python modules for PL/Python? (Wolfgang Keller <wolfgang.keller.nospam@gmx.de>) |
Список | 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 по дате отправления: