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