Re: Anyone tried PG with Perl 5.10?

Lists: pgsql-hackers
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Anyone tried PG with Perl 5.10?
Date: 2008-01-21 04:06:19
Message-ID: 20445.1200888379@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I read that Perl 5.10 is about to hit Fedora rawhide. Anyone know if
it will work with plperl and/or DBD::Pg? If there are fixes needed
in plperl, it'd sure be nice if they were in 8.3 ...

regards, tom lane


From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Anyone tried PG with Perl 5.10?
Date: 2008-01-21 15:00:37
Message-ID: 11d5bdebe8be0e41d270b1b86c555179@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

> I read that Perl 5.10 is about to hit Fedora rawhide. Anyone know if
> it will work with plperl and/or DBD::Pg? If there are fixes needed
> in plperl, it'd sure be nice if they were in 8.3 ...

I've tested 5.10 against both and they seem to work fine. My plperl tests
are not necessarily thorough, but it compiled smoothly and ran a bunch of
plperlu code without a problem. DBD::Pg worked fine, all its tests passed.

-----BEGIN PGP SIGNATURE-----

iD8DBQFHlLMevJuQZxSWSsgRA4neAJoCJtcPusA86PBpZHsmnSWyeKroQACg1CcS
jVgOjqD8ousq5jxIJq3+Sbc=
=XzXA
-----END PGP SIGNATURE-----


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Anyone tried PG with Perl 5.10?
Date: 2008-01-21 15:05:04
Message-ID: 4794B4A0.6000509@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Greg Sabino Mullane wrote:
>> I read that Perl 5.10 is about to hit Fedora rawhide. Anyone know if
>> it will work with plperl and/or DBD::Pg? If there are fixes needed
>> in plperl, it'd sure be nice if they were in 8.3 ...
>>
>
> I've tested 5.10 against both and they seem to work fine. My plperl tests
> are not necessarily thorough, but it compiled smoothly and ran a bunch of
> plperlu code without a problem. DBD::Pg worked fine, all its tests passed.
>
>
>

For plperl, we need to test at least:

* standard plperl regression tests
* the UTF8 problem we recently fixed

I can check this out later today.

cheers

andrew


From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Anyone tried PG with Perl 5.10?
Date: 2008-01-21 15:58:53
Message-ID: 87odbf5fwi.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


>>> I read that Perl 5.10 is about to hit Fedora rawhide. Anyone know if
>>> it will work with plperl and/or DBD::Pg? If there are fixes needed
>>> in plperl, it'd sure be nice if they were in 8.3 ...

I tried and couldn't get the Debian perl 5.10 package installed without having
apt tell me it wanted to uninstall all 700+ other packages.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's Slony Replication support!


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Anyone tried PG with Perl 5.10?
Date: 2008-01-21 17:36:43
Message-ID: 4794D82B.3070904@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan wrote:
>
>
> Greg Sabino Mullane wrote:
>>> I read that Perl 5.10 is about to hit Fedora rawhide. Anyone know if
>>> it will work with plperl and/or DBD::Pg? If there are fixes needed
>>> in plperl, it'd sure be nice if they were in 8.3 ...
>>>
>>
>> I've tested 5.10 against both and they seem to work fine. My plperl
>> tests
>> are not necessarily thorough, but it compiled smoothly and ran a
>> bunch of
>> plperlu code without a problem. DBD::Pg worked fine, all its tests
>> passed.
>>
>>
>>
>
> For plperl, we need to test at least:
>
> * standard plperl regression tests
> * the UTF8 problem we recently fixed
>
>

First news is not good. On my test we have failed one of the regression
tests - the "use strict" processing seems to be backwards. I will try to
get to the bottom of it.

cheers

andrew


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Anyone tried PG with Perl 5.10?
Date: 2008-01-22 02:33:26
Message-ID: 479555F6.3070001@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan wrote:
>
>
> Andrew Dunstan wrote:
>>
>>
>> Greg Sabino Mullane wrote:
>>>> I read that Perl 5.10 is about to hit Fedora rawhide. Anyone know if
>>>> it will work with plperl and/or DBD::Pg? If there are fixes needed
>>>> in plperl, it'd sure be nice if they were in 8.3 ...
>>>>
>>>
>>> I've tested 5.10 against both and they seem to work fine. My plperl
>>> tests
>>> are not necessarily thorough, but it compiled smoothly and ran a
>>> bunch of
>>> plperlu code without a problem. DBD::Pg worked fine, all its tests
>>> passed.
>>>
>>>
>>>
>>
>> For plperl, we need to test at least:
>>
>> * standard plperl regression tests
>> * the UTF8 problem we recently fixed
>>
>>
>
> First news is not good. On my test we have failed one of the
> regression tests - the "use strict" processing seems to be backwards.
> I will try to get to the bottom of it.
>
>

This problem has been identified by Simon Cozens as a bug in perl 5.10
(in that it is an undocumented change in Safe.pm). he will file a perl
bug report on it. The small patch below (also his suggestion, more or
less) fixes the problem. We turn on access to the caller opcode just
while we load the strict module. This should be perfectly safe. I intend
to apply it shortly and to backpatch it, unless there's an objection.

The UTF8 code appears to be still working, which was the other concern I
had.

cheers

andrew

Index: plperl.c
===================================================================
RCS file: /cvsroot/pgsql/src/pl/plperl/plperl.c,v
retrieving revision 1.134
diff -c -u -r1.134 plperl.c
cvs diff: conflicting specifications of output style
--- plperl.c 1 Dec 2007 17:58:42 -0000 1.134
+++ plperl.c 22 Jan 2008 02:31:08 -0000
@@ -272,8 +272,8 @@
"sub ::mksafefunc {" \
" my $ret = $PLContainer->reval(qq[sub { $_[0] $_[1] }]); " \
" $@ =~ s/\\(eval \\d+\\) //g if $@; return $ret; }" \
- "$PLContainer->permit('require'); $PLContainer->reval('use
strict;');" \
- "$PLContainer->deny('require');" \
+ "$PLContainer->permit(qw[require caller]);
$PLContainer->reval('use strict;');" \
+ "$PLContainer->deny(qw[require caller]); " \
"sub ::mk_strict_safefunc {" \
" my $ret = $PLContainer->reval(qq[sub { BEGIN {
strict->import(); } $_[0] $_[1] }]); " \
" $@ =~ s/\\(eval \\d+\\) //g if $@; return $ret; }"