Skip site navigation (1) Skip section navigation (2)

plpython module loading errors

From: "email lists" <lists(at)darrenmackay(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: plpython module loading errors
Date: 2003-04-14 09:23:10
Message-ID: 035C9F7CE28601428BBB5B051C9F77F201329E@orion.mackay.local (view raw or flat)
Thread:
Lists: 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

	make
	make install

tia,

Darren Mackay


pgsql-interfaces by date

Next:From: Peter EisentrautDate: 2003-04-14 16:40:01
Subject: Re: [GENERAL] Problem about pgsql's column alias
Previous:From: Tom LaneDate: 2003-04-14 05:44:05
Subject: Re: Problem about pgsql's column alias

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group