pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David G Johnston <david.g.johnston@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #12765: Postgresql ROLE dropped, but its not dropped from pg_roles
Date: Thu, 12 Feb 2015 13:16:14 -0700 (MST)
Message-ID: <1423772174344-5837720.post@n5.nabble.com> (raw)
In-Reply-To: <20150212193420.2590.49423@wrigleys.postgresql.org>
References: <20150212193420.2590.49423@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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-tp5...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)

Message-ID: <1423772174344-5837720.post@n5.nabble.com>
Permalink:  ../1423772174344-5837720.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1423772174344-5837720.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: david.g.johnston@gmail.com
  Subject: Re: BUG #12765: Postgresql ROLE dropped, but its not dropped from pg_roles
  In-Reply-To: <1423772174344-5837720.post@n5.nabble.com>
  References: <20150212193420.2590.49423@wrigleys.postgresql.org> <1423772174344-5837720.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox