problem with pl/python in 7.2.2

Поиск
Список
Период
Сортировка
От junk@ns1.tcu-inc.com
Тема problem with pl/python in 7.2.2
Дата
Msg-id 200209070621.g876Lcw18146@ns1.tcu-inc.com
обсуждение исходный текст
Список pgsql-bugs
Hello!

I am having a problem with PostgreSQL 7.2.2 which does not happen with
7.2.

Basically, I have Python 2.2.1 and PG 7.2.2installed on a RedHat 7.3 box where
importing the re module into a python procedure doesn't work.

When I try the same thing on a RedHat 7.1 with PG 7.2 iwht Python 2.2.1,
 it works.

Below if the error code I get. What is really weird, is that I can import
other modules like sys, os, and string and they work fine.
Here is the error code I get.


drop function replace_e_to_a(text);
DROP
postgres=# CREATE FUNCTION replace_e_to_a(text) RETURNS text AS
postgres-# '
postgres'#
postgres'# import re
postgres'# return ''this is a test''
postgres'# '
postgres-# LANGUAGE 'plpython';
CREATE
postgres=#
postgres=# select replace_e_to_a('text');
ERROR:  plpython: Call of function `__plpython_procedure_replace_e_to_a_16596' failed.
exceptions.ImportError: No module named _sre

Thanks!
Mark

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

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #760: to_date
Следующее
От: Christopher Nias
Дата:
Сообщение: GCC3.2 and Postgres 7.2.2