Re: pl/perl and recent perl versions - failing to load internal modules

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: pl/perl and recent perl versions - failing to load internal modules
Дата
Msg-id CAFaPBrSvM_hsNVWRezucJMCCaJzAQg2f-TfzYh8VacihqrgFHQ@mail.gmail.com
обсуждение исходный текст
Ответ на 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  (Alex Hunsaker <badalex@gmail.com>)
Список pgsql-general
On Tue, Jul 1, 2014 at 6:39 PM, Toby Corkindale
<toby.corkindale@strategicdata.com.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'tunderstand 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..

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Toby Corkindale
Дата:
Сообщение: Re: Two-way encryption
Следующее
От: Alex Hunsaker
Дата:
Сообщение: Re: pl/perl and recent perl versions - failing to load internal modules