Re: ALTER ROLES - questions

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: ALTER ROLES - questions
Дата
Msg-id 200509232224.j8NMOst27703@candle.pha.pa.us
обсуждение исходный текст
Ответ на ALTER ROLES - questions  (Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>)
Список pgsql-hackers
OK, I have added comments to gram.y to document what is happening.

ALTER ROLE ... ROLE is supported for ALTER GROUP.  The others like IN
ROL are supported by CREATE, but when used by ALTER throw an error
printing their internal names, so it is kind of cryptic. Not sure what
we should do to improve this.  Let's see if others complain.

---------------------------------------------------------------------------

Stefan Kaltenbrunner wrote:
> Hi!
> 
> I played around with roles a bit today and noticed some minor things:
> 
> ALTER ROLE seems to support ALTER ROLE <name> ROLE <name> - but that
> form is not mentioned in the docs:
> 
> playground=# CREATE ROLE myrole;
> CREATE ROLE
> playground=# CREATE ROLE myrole2;
> CREATE ROLE
> playground=# ALTER ROLE myrole ROLE myrole2;
> ALTER ROLE
> 
> 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=# CREATE ROLE myrole;
> CREATE ROLE
> playground=# CREATE ROLE myrole2;
> CREATE ROLE
> playground=# ALTER ROLE myrole IN ROLE myrole2;
> ERROR:  option "addroleto" not recognized
> 
> 
> 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 :-)
> 
> Stefan
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ALTER ROLES - questions
Следующее
От: David Fetter
Дата:
Сообщение: Re: 64-bit API for large objects