diff options
Diffstat (limited to 'src/pl/plperl/expected/plperl_init.out')
-rw-r--r-- | src/pl/plperl/expected/plperl_init.out | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/pl/plperl/expected/plperl_init.out b/src/pl/plperl/expected/plperl_init.out new file mode 100644 index 0000000..4b7e925 --- /dev/null +++ b/src/pl/plperl/expected/plperl_init.out @@ -0,0 +1,40 @@ +-- test plperl.on_plperl_init +-- This test tests setting on_plperl_init after loading plperl +LOAD 'plperl'; +SET SESSION plperl.on_plperl_init = ' system("/nonesuch"); '; +SHOW plperl.on_plperl_init; + plperl.on_plperl_init +------------------------ + system("/nonesuch"); +(1 row) + +DO $$ warn 42 $$ language plperl; +ERROR: 'system' trapped by operation mask at line 1. +CONTEXT: while executing plperl.on_plperl_init +PL/Perl anonymous code block +-- +-- Reconnect (to unload plperl), then test setting on_plperl_init +-- as an unprivileged user +-- +\c - +CREATE ROLE regress_plperl_user; +SET ROLE regress_plperl_user; +-- this succeeds, since the GUC isn't known yet +SET SESSION plperl.on_plperl_init = 'test'; +RESET ROLE; +LOAD 'plperl'; +WARNING: permission denied to set parameter "plperl.on_plperl_init" +SHOW plperl.on_plperl_init; + plperl.on_plperl_init +----------------------- + +(1 row) + +DO $$ warn 42 $$ language plperl; +WARNING: 42 at line 1. +-- now we won't be allowed to set it in the first place +SET ROLE regress_plperl_user; +SET SESSION plperl.on_plperl_init = 'test'; +ERROR: permission denied to set parameter "plperl.on_plperl_init" +RESET ROLE; +DROP ROLE regress_plperl_user; |