Search Postgresql Archives

Re: using 'ALTER ROLE' in a function

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

 



Lutz Broedel <lb@xxxxxxxxxxxxxxxxxxxx> writes:

> ERROR:  Error »syntax error« at »$1« at character 13
> QUERY:  ALTER ROLE  $1  WITH ENCRYPTED PASSWORD  $2
>
> I have tried this in several ways and it seems, ALTER ROLE just does
> not accept a parameter instead of name. Does anybody have a solution
> for this?

You probably need to build the query dynamically and use EXECUTE.

-Doug


[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