From: | Kaare Rasmussen <kaare(at)jasonic(dot)dk> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Unexpected plperl difference between 8.4 and 9.1 |
Date: | 2012-08-21 07:35:09 |
Message-ID: | 50333A2D.8010407@jasonic.dk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2012-08-20 18:36, Tom Lane wrote:
> Alvaro Herrera<alvherre(at)2ndquadrant(dot)com> writes:
>> Excerpts from Alex Hunsaker's message of lun ago 20 12:03:11 -0400 2012:
>>> Hrm seems to work for me. What version of perl is this?
>>> $ perl -V
>>> Summary of my perl5 (revision 5 version 16 subversion 0) configuration:
>> I can reproduce the failure with 5.14.2
> Smells like a Perl bug to me. Has anybody attempted to reproduce this
> just in Perl itself, not PL/Perl?
>
> regards, tom lane
>
>
I can't reproduce it in perl, but it's in PL/perl from 9.2 beta built
with perl 5.14.2. Currently I don't have another perl with libperl
installed.
This produces the error:
CREATE OR REPLACE FUNCTION test1() RETURNS SETOF NUMERIC AS $BODY$
use strict;
use warnings;
for (0..9) {
my $rand = rand();
$rand =~ m/(.*)/;
return_next($1);
}
return;
$BODY$ LANGUAGE plperl;
Adding 'elog(NOTICE, "rand:$rand, :$1");' after the capture maked the
error go away. Do does changining the return_next statemtnt to 'my
$retvalue=$1;return_next($retvalue);'
From | Date | Subject | |
---|---|---|---|
Next Message | Vlad Arkhipov | 2012-08-21 08:08:12 | Re: temporal support patch |
Previous Message | Darren Duncan | 2012-08-21 06:46:00 | Re: Raise a WARNING if a REVOKE affects nothing? |