problem with pl/python in 7.2.2 - Mailing list pgsql-bugs

From junk@ns1.tcu-inc.com
Subject problem with pl/python in 7.2.2
Date
Msg-id 200209070621.g876Lcw18146@ns1.tcu-inc.com
Whole thread Raw
List 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 by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #760: to_date
Next
From: Christopher Nias
Date:
Subject: GCC3.2 and Postgres 7.2.2