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

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12765: Postgresql ROLE dropped, but its not dropped from pg_roles
Date: 2015-02-12 20:16:14
Message-ID: 1423772174344-5837720.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Hugo Osvaldo Barrera 2015-02-12 22:42:57 postgresql-server exiting abnormally after an OS upgrade
Previous Message Asif Naeem 2015-02-12 19:41:46 Re: gettimeofday cause crash on Windows