Thread: Trouble loading Perl modules from postgresql.conf

Trouble loading Perl modules from postgresql.conf

From
"Chris Greenhill"
Date:

Hello,

 

I’m having difficulty pre-loading Perl modules and my own libraries. When I edit something like this into the postgresql.conf:

 

custom_variable_classes = 'plperl'

plperl.on_init = 'use MyModule;'

 

and restart the server it doesn’t seem to load the modules (they don’t appear in %INC and my functions error out). Is there something else I need to do? I’m using server 9.0.4 on a WinXP system with Perl 5.10.

 

Thanks for any help

-Chris

 

 

Re: Trouble loading Perl modules from postgresql.conf

From
"Chris Greenhill"
Date:

Just an update for those interested. I found an insecure work around for pre-loading any modules I may need by editing the “sitecustomize.pl” file, essentially adding any use’s and requires I need. As I said, probably not secure since I hear there’s been issues with sitecustomize.pl

 

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Chris Greenhill
Sent: Wednesday, April 20, 2011 12:09 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Trouble loading Perl modules from postgresql.conf

 

Hello,

 

I’m having difficulty pre-loading Perl modules and my own libraries. When I edit something like this into the postgresql.conf:

 

custom_variable_classes = 'plperl'

plperl.on_init = 'use MyModule;'

 

and restart the server it doesn’t seem to load the modules (they don’t appear in %INC and my functions error out). Is there something else I need to do? I’m using server 9.0.4 on a WinXP system with Perl 5.10.

 

Thanks for any help

-Chris