Re: BUG #5334: Version 2.22 of Perl Safe module breaks UTF8 PostgreSQL 8.4

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: BUG #5334: Version 2.22 of Perl Safe module breaks UTF8 PostgreSQL 8.4
Дата
Msg-id 34d269d41002181032j72d362f1va2c5aac9ecf89948@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #5334: Version 2.22 of Perl Safe module breaks UTF8 PostgreSQL 8.4  (Tim Bunce <Tim.Bunce@pobox.com>)
Ответы Re: BUG #5334: Version 2.22 of Perl Safe module breaks UTF8 PostgreSQL 8.4
Список pgsql-bugs
On Thu, Feb 18, 2010 at 11:09, Tim Bunce <Tim.Bunce@pobox.com> wrote:
> The key line is:
>
> =C2=A0 =C2=A0*PLPerl::utf8::SWASHNEW =3D \&utf8::SWASHNEW;

Hrm... It seems to work for me in HEAD and AFAICS we dont have that
line.  Did I just miss it?  Or did you happen to fix it in another way
with your refactoring?

Another Idea that comes to mind would be instead of (in ::mksafefunc):
my $subref =3D ->reval(sub {} );
$subref->();

do:
my $subref =3D ->reval(sub {});
return sub { ->reval("$subreb->();"); }

or something...

I did a few quick tests but it failed miserably for me...  Im also not
fond of adding yet another closure. :)

> This allows the perl regex logic to call the SWASHNEW method that's
> called when information from the Unicode character database is needed.
> (The lack of that method was causing the regex logic to think that the
> utf8 module wasn't loaded, so it would try to 'require' it but fail due
> to the restrictions of the Safe compartment.)

Makes me think we might just be able to share some of utf8 package in the s=
afe?

> The rest of the patch is updates the surrounding code to the same
> simplified 'utf8fix' logic used in PostgreSQL 9.0, and the same Safe
> version checks.

=46rom a quick look it looks ok.

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

Предыдущее
От: Alex Hunsaker
Дата:
Сообщение: Re: BUG #5333: psql returns 0 on error
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #5250: Tutorial examples(pre-compiled) not present with precompiled binary version of PostgreSQL.