1-- 2-- Test start_proc execution 3-- 4SET pltcl.start_proc = 'no_such_function'; 5select tcl_int4add(1, 2); 6ERROR: function no_such_function() does not exist 7CONTEXT: processing pltcl.start_proc parameter 8select tcl_int4add(1, 2); 9ERROR: function no_such_function() does not exist 10CONTEXT: processing pltcl.start_proc parameter 11create function tcl_initialize() returns void as 12$$ elog NOTICE "in tcl_initialize" $$ language pltcl SECURITY DEFINER; 13SET pltcl.start_proc = 'public.tcl_initialize'; 14select tcl_int4add(1, 2); -- fail 15ERROR: function "public.tcl_initialize" must not be SECURITY DEFINER 16CONTEXT: processing pltcl.start_proc parameter 17create or replace function tcl_initialize() returns void as 18$$ elog NOTICE "in tcl_initialize" $$ language pltcl; 19select tcl_int4add(1, 2); 20NOTICE: in tcl_initialize 21 tcl_int4add 22------------- 23 3 24(1 row) 25 26select tcl_int4add(1, 2); 27 tcl_int4add 28------------- 29 3 30(1 row) 31 32