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

PL/Python import _sre module error

From: Glenn R Williams <gloonie(at)earthlink(dot)net>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: PL/Python import _sre module error
Date: 2003-06-16 20:34:49
Message-ID: 1055795688.1529.19.camel@gwpogo.localdomain (view raw or whole thread)
Lists: pgsql-interfaces
Hi All,

Does anyone else have a problem with importing the re package 
I am using:

Redhat 9.0
PostgreSQL 7.3.3

When I create a function:

import re
o = args[0]
b = re.match(r"^t.*",o)
if b:
   return "fits the bill"
return "failed the test"

PostgreSQL fails, and returns the error message:

exceptions.ImportError: No module named _sre

If I go into python, this is not a problem, so I suppose it is somehow
due to the restricted execution environment and/or PostgreSQL. But
that's as far as I get.

Any suggestions on how to pinpoint the problem? Surely someone else is
using re (sre), since the other modules (pcre, pre) don't handle



Glenn R Williams
Software for the International Community
Mathematical theories are the part of science you could continue to do
if you woke up tomorrow and discovered the universe was gone.

In response to

  • Re: Info at 2003-06-16 17:57:20 from JL


pgsql-interfaces by date

Next:From: Gerhard HäringDate: 2003-06-16 20:39:53
Subject: Re: PL/Python import _sre module error
Previous:From: JLDate: 2003-06-16 17:57:20
Subject: Re: Info

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