problem with pl/python in 7.2.2

From: junk(at)ns1(dot)tcu-inc(dot)com
To: pgsql-bugs(at)postgresql(dot)org (pgsql-bugs)
Subject: problem with pl/python in 7.2.2
Date: 2002-09-07 06:21:38
Message-ID: 200209070621.g876Lcw18146@ns1.tcu-inc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-bugs by date

  From Date Subject
Next Message Christopher Nias 2002-09-07 12:52:13 GCC3.2 and Postgres 7.2.2
Previous Message junk 2002-09-07 06:18:30 problem with pl/python in 7.2.2