Re: postgresql server crash on windows 7 when using plpython

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: postgresql server crash on windows 7 when using plpython
Дата
Msg-id 201108240641.51863.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на Re: postgresql server crash on windows 7 when using plpython  (c k <shreeseva.learning@gmail.com>)
Ответы Re: postgresql server crash on windows 7 when using plpython
Список pgsql-general
On Tuesday, August 23, 2011 11:10:19 pm c k wrote:
> Yes,

> ImportError: No module named site
> ImportError: No module named site
> ImportError: No module named site
>
> This last line is added every time I call any plpython function. Here is
> the simple plpython function.
>
> CREATE OR REPLACE FUNCTION software.pyver()
>   RETURNS text AS
> $BODY$
> import sys
> #return sys.version
> return sys.path
> $BODY$
>   LANGUAGE plpythonu VOLATILE
>   COST 100;
>
> What is the problem?

plpythonu cannot find the Python installation. site is a module imported by
default by the Python interpreter. When you removed 2.7 you probably also
removed the PATH entries for Python. So to recap, previously you where running
plpythonu compiled with 2.6 using a PATH leading to 2.7, hence the crashes. Now
you have 2.7 out of the way, but no PATH to 2.6.

>
>
> Chaitany Kulkarni
>

--
Adrian Klaver
adrian.klaver@gmail.com

В списке pgsql-general по дате отправления:

Предыдущее
От: dexdyne
Дата:
Сообщение: Re: date_trunc - not sure what is wrong, but it confuses me.
Следующее
От: MirrorX
Дата:
Сообщение: strange exclusive lock in relation --- ideas