summaryrefslogtreecommitdiff
path: root/src/pl/plperl/sql/plperl.sql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-06-03 14:19:44 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2013-06-03 14:19:44 -0400
commitbb5a21746bf0f764c5af9245bc845443d51f4a94 (patch)
treee2bd88a0c373394e9dbf32d162271b685ad856fc /src/pl/plperl/sql/plperl.sql
parent805730d0604519facaffaa0d899e6884d0542fc0 (diff)
Add semicolons to eval'd strings to hide a minor Perl behavioral change.
"eval q{foo}" used to complain that the error was on line 2 of the eval'd string, because eval internally tacked on "\n;" so that the end of the erroneous command was indeed on line 2. But as of Perl 5.18 it more sanely says that the error is on line 1. To avoid Perl-version-dependent regression test results, use "eval q{foo;}" instead in the two places where this matters. Per buildfarm. Since people might try to use newer Perl versions with older PG releases, back-patch as far as 9.0 where these test cases were added.
Diffstat (limited to 'src/pl/plperl/sql/plperl.sql')
-rw-r--r--src/pl/plperl/sql/plperl.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pl/plperl/sql/plperl.sql b/src/pl/plperl/sql/plperl.sql
index 7f02b2fe225..dace848e838 100644
--- a/src/pl/plperl/sql/plperl.sql
+++ b/src/pl/plperl/sql/plperl.sql
@@ -373,7 +373,7 @@ DO $$ qx("/nonesuch"); $$ LANGUAGE plperl;
DO $$ open my $fh, "</nonesuch"; $$ LANGUAGE plperl;
-- check that eval is allowed and eval'd restricted ops are caught
-DO $$ eval q{chdir '.'}; warn "Caught: $@"; $$ LANGUAGE plperl;
+DO $$ eval q{chdir '.';}; warn "Caught: $@"; $$ LANGUAGE plperl;
-- check that compiling do (dofile opcode) is allowed
-- but that executing it for a file not already loaded (via require) dies