Commit 06f4a539 authored by Tom Lane's avatar Tom Lane

Make the plperl regression tests pass in 'use_strict' mode, by adding

'my' where appropriate.  Michael Fuhr
parent 9a4fd8f4
......@@ -336,7 +336,7 @@ SELECT perl_get_field((11,12), 'z');
-- Test return_next
--
CREATE OR REPLACE FUNCTION perl_srf_rn() RETURNS SETOF RECORD AS $$
$i = 0;
my $i = 0;
for ("World", "PostgreSQL", "PL/Perl") {
return_next({f1=>++$i, f2=>'Hello', f3=>$_});
}
......@@ -354,8 +354,8 @@ SELECT * from perl_srf_rn() AS (f1 INTEGER, f2 TEXT, f3 TEXT);
-- 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))) {
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;
......
......@@ -240,7 +240,7 @@ SELECT perl_get_field((11,12), 'z');
--
CREATE OR REPLACE FUNCTION perl_srf_rn() RETURNS SETOF RECORD AS $$
$i = 0;
my $i = 0;
for ("World", "PostgreSQL", "PL/Perl") {
return_next({f1=>++$i, f2=>'Hello', f3=>$_});
}
......@@ -253,8 +253,8 @@ SELECT * from perl_srf_rn() AS (f1 INTEGER, f2 TEXT, f3 TEXT);
--
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))) {
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment