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 200209070618.g876IUi18094@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 #761: Date format ambiguity while insertion!!!!
Next
From: "Tim Knowles"
Date:
Subject: Re: Bug #759: 7.3beta1 DROP COLUMN DEPENDENCY PROBLEM