Re: [GENERAL] using 'ALTER ROLE' in a function

2007-03-22 Thread Douglas McNaught
Lutz Broedel <[EMAIL PROTECTED]> 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 > fo

[GENERAL] using 'ALTER ROLE' in a function

2007-03-22 Thread Lutz Broedel
Dear list, I'm trying to write a PL/pgSQL function that executes some code every time a user changes his/her password. The function is supposed to work like this: CREATE OR REPLACE FUNCTION changePwd(varchar(255)) RETURNS boolean AS $$ DECLARE pwd varchar(255); curr_user name;