X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 39E9330EF5E for ; Mon, 16 Jun 2003 22:45:52 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 38697-03 for ; Mon, 16 Jun 2003 19:45:41 -0300 (ADT) Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84]) by svr1.postgresql.org (Postfix) with ESMTP id 907DE30EF73 for ; Mon, 16 Jun 2003 19:45:41 -0300 (ADT) Received: from user-0cev7lj.cable.mindspring.com ([24.239.158.179]) by gull.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 19S2jK-00001v-00 for pgsql-interfaces@postgresql.org; Mon, 16 Jun 2003 15:45:38 -0700 Subject: Re: PL/Python import _sre module error From: Glenn R Williams Reply-To: gloonie@earthlink.net To: pgsql-interfaces@postgresql.org In-Reply-To: <3EEE2B19.5070007@ghaering.de> References: <000a01c331d8$edd28680$0df4623e@79> <200306161357.20600.JLT@WVInter.Net> <1055795688.1529.19.camel@gwpogo.localdomain> <3EEE2B19.5070007@ghaering.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Y5RjFWPBDUpybrYJKnx3" Message-Id: <1055803534.4601.4.camel@gwpogo.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 16 Jun 2003 18:45:35 -0400 X-Archive-Number: 200306/55 X-Sequence-Number: 4266 --=-Y5RjFWPBDUpybrYJKnx3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks, Gerhard. Now that rexec and friends are disabled in Python > 2.2.3, what is the future of PL/Python? Will it wither away? I don't know how many other modules are impacted by the same problem, but will pursue the matter on the Python list. Thanks for your help, though! Best Regards, Glenn On Mon, 2003-06-16 at 16:39, Gerhard H=E4ring wrote: > Glenn R Williams wrote: > > Hi All, > >=20 > > Does anyone else have a problem with importing the re package=20 > > I am using: > >=20 > > Redhat 9.0 > > PostgreSQL 7.3.3 > > Python 2.2.2.26 > >=20 > > When I create a function: > >=20 > > import re > > o =3D args[0] > > b =3D re.match(r"^t.*",o) > > if b: > > return "fits the bill" > > return "failed the test" > >=20 > > PostgreSQL fails, and returns the error message: > >=20 > > exceptions.ImportError: No module named _sre > >=20 > > 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. >=20 > Correct. re is not enabled, because you can create arbitrary cpu (and=20 > perhaps also memory) utilization with it. Thus it's unsafe. >=20 > > Any suggestions on how to pinpoint the problem? [...] >=20 > Fork pl/python and create an unsafe version without any restrictions?=20 > That's what I once did just for fun. I think that'll be necessary=20 > anyway, because with Python >=3D 2.2.3, rexec and friends are disabled an= yway. >=20 > -- Gerhard >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings --=20 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. --=-Y5RjFWPBDUpybrYJKnx3 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA+7kiOQ0pkIU7d8owRArRmAJ0ZrwgFFvoJZfCu9dwaevAu2AcfaQCeMz1b xD2Q1OC1Ld5ykJnamcKSVKM= =fUoI -----END PGP SIGNATURE----- --=-Y5RjFWPBDUpybrYJKnx3--