Re: grant permissions to set variable?
От
Tom Lane
Тема
Re: grant permissions to set variable?
Дата
Msg-id
27155.1173900446@sss.pgh.pa.us
Ответ на
Re: grant permissions to set variable? (Vivek Khera)
Список
Дерево обсуждения
grant permissions to set variable? Vivek Khera <vivek@khera.org>
Re: grant permissions to set variable? Richard Huxton <dev@archonet.com>
Re: grant permissions to set variable? Vivek Khera <vivek@khera.org>
Re: grant permissions to set variable? Tom Lane <tgl@sss.pgh.pa.us>
Vivek Khera writes: > CREATE OR REPLACE FUNCTION setlogtime(integer) RETURNS void AS $$ > SET log_min_duration_statement = $1; > SHOW log_min_duration_statement; > $$ LANGUAGE SQL SECURITY DEFINER; > How can I write this function? Use a plpgsql EXECUTE command. In general, utility statements don't cope with parameters, because that's a planner/executor facility and utility statements don't go through that. So you've got to substitute the value you want into the text of the command that's submitted. regards, tom lane
В списке pgsql-general по дате отправления
От: Tom Lane
Дата: