From: | Alex Hunsaker <badalex(at)gmail(dot)com> |
---|---|
To: | Toby Corkindale <toby(dot)corkindale(at)strategicdata(dot)com(dot)au> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: pl/perl and recent perl versions - failing to load internal modules |
Date: | 2014-07-02 01:31:10 |
Message-ID: | CAFaPBrSvM_hsNVWRezucJMCCaJzAQg2f-TfzYh8VacihqrgFHQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jul 1, 2014 at 6:39 PM, Toby Corkindale
<toby(dot)corkindale(at)strategicdata(dot)com(dot)au> wrote:
> Hi Alex,
> your example (chr(0x100) =~ /\\xa9/) works on my instance (pg 9.3.4, plperl 5.18)
> However the following code fails:
> => do $$ "\N{U+263A}" =~ /[[:punct:]]/$$ language plperl;
> ERROR: Unable to load utf8.pm into plperl at line 1.
> BEGIN failed--compilation aborted.
> CONTEXT: PL/Perl anonymous code block
>
> Oddly, even if I add utf8 to plperl.oninit, I then get an error about being unable to load the 're' (regex) module. I don't understand how the example you gave does manage to work!
Strange, seems to works for me with 5.20:
=> do $$ "\N{U+263A}" =~ /[[:punct:]]/$$ language plperl;
DO
Time: 12.928 ms
=> show plperl.on_init;
plperl.on_init
────────────────
(1 row)
Time: 0.786 ms
=> show plperl.on_plperl_init;
plperl.on_plperl_init
───────────────────────
(1 row)
One thing you might try is plperl.on_plperl_init = "require
'utf8_heavy.pl'; require unicore/Heavy.pl'; or maybe just
plperl.on_plperl_init = 'use Unicode::UCD;'
If that still fails, You might find the attached useful, it tires to
preload all the unicore files. You should be able to stick it
somewhere and plperl.on_plperl_init = '/path/to/unicore_preload.pm'.
However, hopefully one of the first suggestions will work..
Attachment | Content-Type | Size |
---|---|---|
unicore_preload.pm.gz | application/x-gzip | 1.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alex Hunsaker | 2014-07-02 02:05:21 | Re: pl/perl and recent perl versions - failing to load internal modules |
Previous Message | Toby Corkindale | 2014-07-02 01:10:27 | Re: Two-way encryption |