Re: Permissions with multiple groups... - Mailing list pgsql-general

From Tom Lane
Subject Re: Permissions with multiple groups...
Date
Msg-id 13045.1032385725@sss.pgh.pa.us
Whole thread Raw
In response to Permissions with multiple groups...  (Eric D Nielsen <nielsene@MIT.EDU>)
Responses Re: Permissions with multiple groups...
List pgsql-general
Eric D Nielsen <nielsene@MIT.EDU> writes:
> I'm receiving permissions denied message when I think I shouldn't.

I tried to duplicate your problem and couldn't:

z=# create user  cib_admin;
CREATE USER
z=# create group cib_all user  cib_admin;
CREATE GROUP
z=# create group cib_trusted user  cib_admin;
CREATE GROUP
z=# create table sometable(f1 int);
CREATE TABLE
z=# REVOKE ALL ON sometable FROM PUBLIC;
REVOKE
z=# GRANT SELECT ON sometable TO GROUP cib_all;
GRANT
z=# GRANT INSERT ON sometable TO GROUP cib_trusted;
GRANT
z=# GRANT UPDATE,DELETE on sometable TO cib_admin;
GRANT
z=# \c - cib_admin
You are now connected as new user cib_admin.
z=> select * from sometable;
 f1
----
(0 rows)

z=> insert into sometable values(1);
INSERT 281986 1
z=> update sometable set f1=0;
UPDATE 1
z=> delete from sometable;
DELETE 1


Could you provide an exact test case?  Also, which PG version are you
running?  (I'm testing CVS tip = 7.3beta1+)

            regards, tom lane

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: psql: \pset pager 'always'?
Next
From: Tom Lane
Date:
Subject: Re: posix style regexp?