Index: src/pl/plperl/sql/plperl.sql =================================================================== RCS file: /projects/cvsroot/pgsql/src/pl/plperl/sql/plperl.sql,v retrieving revision 1.4 diff -c -r1.4 plperl.sql *** src/pl/plperl/sql/plperl.sql 12 Jul 2005 01:16:22 -0000 1.4 --- src/pl/plperl/sql/plperl.sql 20 Aug 2005 19:38:39 -0000 *************** *** 240,246 **** -- CREATE OR REPLACE FUNCTION perl_srf_rn() RETURNS SETOF RECORD AS $$ ! $i = 0; for ("World", "PostgreSQL", "PL/Perl") { return_next({f1=>++$i, f2=>'Hello', f3=>$_}); } --- 240,246 ---- -- CREATE OR REPLACE FUNCTION perl_srf_rn() RETURNS SETOF RECORD AS $$ ! my $i = 0; for ("World", "PostgreSQL", "PL/Perl") { return_next({f1=>++$i, f2=>'Hello', f3=>$_}); } *************** *** 253,260 **** -- CREATE OR REPLACE FUNCTION perl_spi_func() RETURNS SETOF INTEGER AS $$ ! $x = spi_query("select 1 as a union select 2 as a"); ! while (defined ($y = spi_fetchrow($x))) { return_next($y->{a}); } return; --- 253,260 ---- -- CREATE OR REPLACE FUNCTION perl_spi_func() RETURNS SETOF INTEGER AS $$ ! my $x = spi_query("select 1 as a union select 2 as a"); ! while (defined (my $y = spi_fetchrow($x))) { return_next($y->{a}); } return; Index: src/pl/plperl/expected/plperl.out =================================================================== RCS file: /projects/cvsroot/pgsql/src/pl/plperl/expected/plperl.out,v retrieving revision 1.4 diff -c -r1.4 plperl.out *** src/pl/plperl/expected/plperl.out 12 Jul 2005 01:16:22 -0000 1.4 --- src/pl/plperl/expected/plperl.out 20 Aug 2005 19:38:39 -0000 *************** *** 336,342 **** -- Test return_next -- CREATE OR REPLACE FUNCTION perl_srf_rn() RETURNS SETOF RECORD AS $$ ! $i = 0; for ("World", "PostgreSQL", "PL/Perl") { return_next({f1=>++$i, f2=>'Hello', f3=>$_}); } --- 336,342 ---- -- Test return_next -- CREATE OR REPLACE FUNCTION perl_srf_rn() RETURNS SETOF RECORD AS $$ ! my $i = 0; for ("World", "PostgreSQL", "PL/Perl") { return_next({f1=>++$i, f2=>'Hello', f3=>$_}); } *************** *** 354,361 **** -- Test spi_query/spi_fetchrow -- CREATE OR REPLACE FUNCTION perl_spi_func() RETURNS SETOF INTEGER AS $$ ! $x = spi_query("select 1 as a union select 2 as a"); ! while (defined ($y = spi_fetchrow($x))) { return_next($y->{a}); } return; --- 354,361 ---- -- Test spi_query/spi_fetchrow -- CREATE OR REPLACE FUNCTION perl_spi_func() RETURNS SETOF INTEGER AS $$ ! my $x = spi_query("select 1 as a union select 2 as a"); ! while (defined (my $y = spi_fetchrow($x))) { return_next($y->{a}); } return;