mirror of https://github.com/postgres/postgres
"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.
REL9_1_STABLE
parent
1e5588cfd9
commit
89bd9fe5fd
@ -1,14 +1,14 @@ |
||||
-- test plperl.on_plperl_init errors are fatal |
||||
-- Avoid need for custom_variable_classes = 'plperl' |
||||
LOAD 'plperl'; |
||||
SET SESSION plperl.on_plperl_init = ' system("/nonesuch") '; |
||||
SET SESSION plperl.on_plperl_init = ' system("/nonesuch"); '; |
||||
SHOW plperl.on_plperl_init; |
||||
plperl.on_plperl_init |
||||
----------------------- |
||||
system("/nonesuch") |
||||
plperl.on_plperl_init |
||||
------------------------ |
||||
system("/nonesuch"); |
||||
(1 row) |
||||
|
||||
DO $$ warn 42 $$ language plperl; |
||||
ERROR: 'system' trapped by operation mask at line 2. |
||||
ERROR: 'system' trapped by operation mask at line 1. |
||||
CONTEXT: while executing plperl.on_plperl_init |
||||
PL/Perl anonymous code block |
||||
|
||||
Loading…
Reference in new issue