On 2012-08-20 18:36, Tom Lane wrote:
Alvaro Herrera<alvhe...@2ndquadrant.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);'
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers