Re: Use of perl modules in plperl ?

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: stan <stanb(at)panix(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Use of perl modules in plperl ?
Date: 2020-03-04 11:15:50
Message-ID: 20200304111550.GA5582@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Mar 04, 2020 at 06:03:22AM -0500, stan wrote:
> I am trying to examine the values of $_TD->{new}. I thought the easiest way
> to see what this structure looked like was to use the Dumper functionality.
> To do so I need to include the appropriate Perl module, which I would think
> would be done like this:
> use Data::Dumper qw(Dumper);

plperl is trusted, and you can't use "use" in it.

More on this:
https://www.postgresql.org/docs/current/plperl-trusted.html

You have two options:
1. Switch to pl/PerlU
2. set plperl.on_init to whatever "use" you need, examples:
https://www.postgresql.org/docs/current/plperl-under-the-hood.html#PLPERL-CONFIG

Best regards,

depesz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message stan 2020-03-04 13:05:06 Calling a function from a rule?
Previous Message stan 2020-03-04 11:15:44 Re: Use of perl modules in plperl ?