plpython issues

From: Rod K <pggen(at)23net(dot)net>
To: pgeu-general(at)postgresql(dot)org
Subject: plpython issues
Date: 2013-05-22 15:37:47
Message-ID: 519CE64B.1040609@23net.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgeu-general

FreeBSD 8.2
Postgres 9.1
Python 2.7

I'm having a problem with a plpython function. Upon execution an
exception is thrown:

ERROR: ImportError: cannot import name SSLError
CONTEXT: Traceback (most recent call last):
PL/Python function "policyd_rcpt_inbound", line 2, in <module>
from socket import gethostbyname
PL/Python function "policyd_rcpt_inbound", line 66, in <module>
PL/Python function "policyd_rcpt_inbound"

Line 66 of the socket module is:

from _ssl import SSLError as sslerror

Any module that attempts to import anything from _ssl in plpython fails.
The thing is, all these import commands work from the python interpreter
or scripts running on the same machine.

I've hit a dead end trying to figure this out so I'm hoping someone can
give me a path to go down.

Browse pgeu-general by date

  From Date Subject
Next Message Markus Wanner 2013-05-22 19:06:04 Call for Papers for PGConf.DE 2013
Previous Message TJ 2013-05-22 14:23:42 Replication failover