Re: python modul pre-import to avoid importing each time - Mailing list pgsql-general

From Tom Lane
Subject Re: python modul pre-import to avoid importing each time
Date
Msg-id 42670.1403806639@sss.pgh.pa.us
Whole thread Raw
In response to Re: python modul pre-import to avoid importing each time  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 06/26/2014 02:14 AM, Rémi Cura wrote:
>> On another internet page (can't find it anymore) somebody mentioned this
>> module loading at server startup, one way or another, but gave no
>> precision. It seems that the "plpy" python module get loaded by default,
>> would'nt it be possible to hack this module to add other import inside it?

> In a sense that is what is being suggested above.

IIRC, plperl has a GUC you can set to tell it to do things at the time
it's loaded (which of course you use in combination with having listed
plperl in shared_preload_libraries).  There's no reason except lack of
round tuits why plpython couldn't have a similar feature.

            regards, tom lane


pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: python modul pre-import to avoid importing each time
Next
From: "Anand Kumar, Karthik"
Date:
Subject: Repeated semop calls