plpython module loading errors - Mailing list pgsql-interfaces

From Darren Mackay
Subject plpython module loading errors
Date
Msg-id 035C9F7CE28601428BBB5B051C9F77F20177D1@orion.mackay.local
Whole thread Raw
List pgsql-interfaces
Hi All,

your thoughts on "exceptions.ImportError: No module named _sre" below:


syslog_test=# CREATE OR REPLACE FUNCTION test (text) RETURNS TEXT AS'
syslog_test'# import re syslog_test'# syslog_test'# tmp_msg = args[0]
syslog_test'# syslog_test'# tmp_msg=re.sub(".+\%", "", tmp_msg)
syslog_test'# return tmp_msg syslog_test'# syslog_test'# ' LANGUAGE
'plpython'; CREATE FUNCTION syslog_test=# syslog_test=# select
test('test1 % test2');
ERROR:  plpython: Call of function `test' failed.
exceptions.ImportError: No module named _sre
syslog_test=#


the following works:

syslog_test=# CREATE OR REPLACE FUNCTION test (text) RETURNS TEXT AS'
syslog_test'# syslog_test'# tmp_msg = args[0] syslog_test'#
syslog_test'# return tmp_msg syslog_test'# syslog_test'# ' LANGUAGE
'plpython'; CREATE FUNCTION syslog_test=# syslog_test=# select
test('test1 % test2');    test
---------------test1 % test2
(1 row)

I am runnging pgsql 7.3.2 rh8, pg was compiled using:
./configure \--with-python
makemake install

tia,

Darren Mackay



pgsql-interfaces by date:

Previous
From: Min_Bee_Ng@pengroup.com.my
Date:
Subject: Problem in installing the PgAdminII in Window XP
Next
From: Dave Cramer
Date:
Subject: qualified column names