Re: ALTER ROLES - questions
От | Stephen Frost |
---|---|
Тема | Re: ALTER ROLES - questions |
Дата | |
Msg-id | 20050815135528.GA6026@ns.snowman.net обсуждение исходный текст |
Ответ на | ALTER ROLES - questions (Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>) |
Список | pgsql-hackers |
* Stefan Kaltenbrunner (stefan@kaltenbrunner.cc) wrote: > ALTER ROLE seems to support ALTER ROLE <name> ROLE <name> - but that > form is not mentioned in the docs: It's not really encouraged and is more because (iirc) that's what 'alter group' did. > ALTER ROLE <name> IN ROLE <name> (undocumented but seems logical to try > because CREATE ROLE supports that) seems to result in the following a > bit cryptic error message: [...] > playground=# ALTER ROLE myrole IN ROLE myrole2; > ERROR: option "addroleto" not recognized Yeah, 'alter group' (or 'alter user', one of them) did the same thing, which suprised me but lead me to not really be too concerned about this issue. > I understand that adding/removing role membership can be done by the > means of GRANT/REVOKE but at least improving the error message(or > stopping the parser from accepting that syntax) a bit would be nice :-) Improving the error message would probably be good (though the error messages in those functions did tend to follow the same "blah not recognized" format, so if it's going to be changed to something 'better' it'd probably make sense to change them all). Having the parser not accept the syntax would mean splitting the CREATE ROLE and ALTER ROLE options-which-are-accepted into two sets (currently there's just one set which both use) which would create quite a bit of duplication... Thanks, Stephen
В списке pgsql-hackers по дате отправления: