plpython and trusted modules - Mailing list pgsql-general

From Steven D. Arnold
Subject plpython and trusted modules
Date
Msg-id 7725108383.20010607222300@neosynapse.net
Whole thread Raw
Responses Re: plpython and trusted modules  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
Hi,

From a plpython function, I'm trying to call a function in a module
that imports _pg (pygresql).  When I do this, I get the following
error:

psql:/home/thoth/dev/data_model/tqse_test.sql:18: ERROR: plpython:
Call of function `__plpython_procedure_test_tqse_198863' failed.
exceptions.ImportError: untrusted dynamic module: _pg

I have added the plpython handler function to the database from which
the call is made with the following command:

    create function plpython_call_handler() returns opaque as
    '$libdir/plpython' language 'C';

I then added the plpython procedural language as UNTRUSTED, with the
command:

    create procedural language 'plpython' handler
    plpython_call_handler lancompiler 'PL/Python';

Why can't I get the stored procedure to execute this function?  From
what I understand of the documentation, I'm doing everything right.
Any ideas?  This is actually a very important problem for me, so any
help would be greatly appreciated.

----------------------------------------------------------------------
Steven D. Arnold                                  stevena@neosynapse.net
AIM: abraxan                                               ICQ: 73804392
~~~~~~~~~~~~~~~~~~~~~~~~   There is no spoon.   ~~~~~~~~~~~~~~~~~~~~~~~~


pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: REPOST: redefining location of the socket file /tmp/.s.PGSQL.5432
Next
From: Namrata
Date:
Subject: Maximum Limit of the database for no. of records.