Re: BUG #12765: Postgresql ROLE dropped, but its not dropped from pg_roles

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: BUG #12765: Postgresql ROLE dropped, but its not dropped from pg_roles
Дата
Msg-id 1423772174344-5837720.post@n5.nabble.com
обсуждение исходный текст
Ответ на BUG #12765: Postgresql ROLE dropped, but its not dropped from pg_roles  (vivek.singh@rackspace.com)
Список pgsql-bugs
vivek.singh wrote
> postgres=# ALTER ROLE user1 SET ROLE TO role1;

This does not do what it is you think it does...

In this statement the word "role" following SET is interpreted as an
identifier, specifically a GUC/configuration-variable.  It is not the
command/keyword ROLE as it is in the first part (ALTER ROLE).

See:  http://www.postgresql.org/docs/9.4/static/sql-alterrole.html

Custom user variables are allowed to be created and this is what you
accomplished.

You likely meant to issue:

GRANT role1 TO user1;

David J.




--
View this message in context:
http://postgresql.nabble.com/BUG-12765-Postgresql-ROLE-dropped-but-its-not-dropped-from-pg-roles-tp5837714p5837720.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

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

Предыдущее
От: Asif Naeem
Дата:
Сообщение: Re: gettimeofday cause crash on Windows
Следующее
От: Hugo Osvaldo Barrera
Дата:
Сообщение: postgresql-server exiting abnormally after an OS upgrade