From: Andrew Dunstan Date: Fri, 12 Feb 2010 19:38:14 +0000 (+0000) Subject: Add regression test files inadvertantly omitted in plperl.on_plperl{u}_init patch X-Git-Tag: REL9_0_ALPHA4~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b3a437a1993e1a155a91f511ac6f31b3879986b;p=postgresql Add regression test files inadvertantly omitted in plperl.on_plperl{u}_init patch --- diff --git a/src/pl/plperl/expected/plperl_init.out b/src/pl/plperl/expected/plperl_init.out new file mode 100644 index 0000000000..a2d4e18d2a --- /dev/null +++ b/src/pl/plperl/expected/plperl_init.out @@ -0,0 +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 = ' eval "1+1" '; +SHOW plperl.on_plperl_init; + plperl.on_plperl_init +----------------------- + eval "1+1" +(1 row) + +DO $$ warn 42 $$ language plperl; +ERROR: while executing plperl.on_plperl_init +DETAIL: 'eval "string"' trapped by operation mask at line 2. +CONTEXT: PL/Perl anonymous code block diff --git a/src/pl/plperl/sql/plperl_init.sql b/src/pl/plperl/sql/plperl_init.sql new file mode 100644 index 0000000000..69b12e9d25 --- /dev/null +++ b/src/pl/plperl/sql/plperl_init.sql @@ -0,0 +1,10 @@ +-- test plperl.on_plperl_init errors are fatal + +-- Avoid need for custom_variable_classes = 'plperl' +LOAD 'plperl'; + +SET SESSION plperl.on_plperl_init = ' eval "1+1" '; + +SHOW plperl.on_plperl_init; + +DO $$ warn 42 $$ language plperl;