Re: BUG #1964: Role membership error - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1964: Role membership error
Date
Msg-id 9975.1129302791@sss.pgh.pa.us
Whole thread Raw
In response to BUG #1964: Role membership error  ("Kevin Walker" <kwalker@ameritrade.com>)
List pgsql-bugs
"Kevin Walker" <kwalker@ameritrade.com> writes:
>    ERROR: role "dbadmin" is a member of role "kw"

> The message suggests that the login role "kw" is already a member of group
> role "dbadmin" which is not the case.

I think you are reading it backwards.  You're probably accidentally
trying to set up circular role memberships, which isn't allowed.
Observe:

regression=# create role dbadmin;
CREATE ROLE
regression=# create role kw;
CREATE ROLE
regression=# grant kw to dbadmin;
GRANT ROLE
regression=# grant kw to dbadmin;
NOTICE:  role "dbadmin" is already a member of role "kw"
GRANT ROLE
regression=# grant dbadmin to kw;
ERROR:  role "dbadmin" is a member of role "kw"

Note that re-granting is only a NOTICE not an ERROR.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: BUG #1956: Plpgsql top-level DECLARE does not share
Next
From: Tom Lane
Date:
Subject: Re: Bug#333854: pg_group file update problems