dbTalk Databases Forums  

[BUGS] BUG #1964: Role membership error

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1964: Role membership error in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kevin Walker
 
Posts: n/a

Default [BUGS] BUG #1964: Role membership error - 10-14-2005 , 07:39 AM







The following bug has been logged online:

Bug reference: 1964
Logged by: Kevin Walker
Email address: kwalker (AT) ameritrade (DOT) com
PostgreSQL version: 8.1 beta 3
Operating system: Windows XP
Description: Role membership error
Details:

I created a group role called dbadmin and assigned it the privileges that I
wanted. I then created a new login role and attempted to add this new login
as a member in the group role. The following error is generated in pgAdmin
III and when the same steps are performed manually.

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. Using the alter group command also
produces the same error.

This problem is occurring on the build for Windows. I have not tested this
process on a Linux build yet.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply With Quote
  #2  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #1964: Role membership error - 10-14-2005 , 09:07 AM






Kevin Walker wrote:
Quote:
The following bug has been logged online:

Bug reference: 1964
Logged by: Kevin Walker
Email address: kwalker (AT) ameritrade (DOT) com
PostgreSQL version: 8.1 beta 3
Operating system: Windows XP
Description: Role membership error
Details:

I created a group role called dbadmin and assigned it the privileges that I
wanted. I then created a new login role and attempted to add this new login
as a member in the group role. The following error is generated in pgAdmin
III and when the same steps are performed manually.

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. Using the alter group command also
produces the same error.

This problem is occurring on the build for Windows. I have not tested this
process on a Linux build yet.
What were you trying, exactly? It worked for me:

test=> CREATE ROLE dbadmin;
CREATE ROLE
test=> CREATE ROLE kw;
CREATE ROLE
test=> GRANT dbadmin TO kw;
GRANT ROLE

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1964: Role membership error - 10-14-2005 , 10:17 AM



"Kevin Walker" <kwalker (AT) ameritrade (DOT) com> writes:
Quote:
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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.