/
githubmirror
/
postgres
Обзор
Документация
Войти
/
githubmirror
/
postgres
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/pl/tcl/expected/pltcl_start_proc.out
30 строк
942 B
Tom Lane
Invent start_proc parameters for PL/Tcl.
07 мар 2017, 20:40
07 мар 2017, 20:40
0d2b1f3
Код
Авторство
О чём код?
-- -- Test start_proc execution -- SET pltcl.start_proc = 'no_such_function'; select tcl_int4add(1, 2); ERROR: function no_such_function() does not exist CONTEXT: processing pltcl.start_proc parameter select tcl_int4add(1, 2); ERROR: function no_such_function() does not exist CONTEXT: processing pltcl.start_proc parameter create function tcl_initialize() returns void as $$ elog NOTICE "in tcl_initialize" $$ language pltcl SECURITY DEFINER; SET pltcl.start_proc = 'public.tcl_initialize'; select tcl_int4add(1, 2); -- fail ERROR: function "public.tcl_initialize" must not be SECURITY DEFINER CONTEXT: processing pltcl.start_proc parameter create or replace function tcl_initialize() returns void as $$ elog NOTICE "in tcl_initialize" $$ language pltcl; select tcl_int4add(1, 2); NOTICE: in tcl_initialize tcl_int4add ------------- 3 (1 row) select tcl_int4add(1, 2); tcl_int4add ------------- 3 (1 row)