Re: BUG #1964: Role membership error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Walker" <kwalker(at)ameritrade(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1964: Role membership error
Date: 2005-10-14 15:13:11
Message-ID: 9975.1129302791@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Kevin Walker" <kwalker(at)ameritrade(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-10-14 15:23:56 Re: Bug#333854: pg_group file update problems
Previous Message Tom Lane 2005-10-14 15:06:11 Re: Postgres logs to syslog LOCAL0