Search Postgresql Archives

Re: grant permissions to set variable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vivek Khera <vivek@xxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux