Re: pl/perl and recent perl versions - failing to load internal modules - Mailing list pgsql-general

From Alex Hunsaker
Subject Re: pl/perl and recent perl versions - failing to load internal modules
Date
Msg-id CAFaPBrSLS=A-FNubkiMObAZX=nEuTeDkttDR7w48yxuAtbBRKg@mail.gmail.com
Whole thread Raw
In response to pl/perl and recent perl versions - failing to load internal modules  (Toby Corkindale <toby.corkindale@strategicdata.com.au>)
Responses Re: pl/perl and recent perl versions - failing to load internal modules  (Toby Corkindale <toby.corkindale@strategicdata.com.au>)
Re: pl/perl and recent perl versions - failing to load internal modules  (Toby Corkindale <toby.corkindale@strategicdata.com.au>)
List pgsql-general
On Mon, Jun 30, 2014 at 7:47 PM, Toby Corkindale
<toby.corkindale@strategicdata.com.au> wrote:
> Hi,
> I've been trying out PostgreSQL 9.3 with pl/perl built against Ubuntu 14.04 LTS' Perl 5.18
> (Sourced from apt.postgresql.org)
>
> Maybe I'm doing something wrong, but it appears that plperl has become completely useless, as it can't load any new
modules,but modern Perl versions have refactored the language into lots of small modules that are automatically loaded
asrequired. Except they can't be loaded as required.
 
>
> For instance, a fairly simple regex will try to load the modules: utf8, utf8_heavy & re
> Since it is forbidden from loading anything, it will fail.

pl/perl should be preloading those modules via "my $a=chr(0x100);
return $a =~ /\\xa9/i". Do you have some example pl/perl code that is
broke? It seems to work for me (I only have 5.20 installed, on this
machine, but I've used 5.18 on 9.2 and 9.3):

$ perl -v

This is perl 5, version 20, subversion 0 (v5.20.0) built for
x86_64-linux-thread-multi
...

$ psql ...
baroque=> select version();
                                                 version
─────────────────────────────────────────────────────────────────────────────────────────────────────────
 PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC)
4.9.0 20140604 (prerelease), 64-bit
(1 row)

Time: 1.033 ms

baroque=> do $$my $a=chr(0x100); return $a =~ /\\xa9/i$$ language plperl;
DO
Time: 1.161 ms

pgsql-general by date:

Previous
From: Paul Jungwirth
Date:
Subject: hstore to json and back again
Next
From: Paul Jungwirth
Date:
Subject: Re: hstore to json and back again