Re: Granting of permissions on tables - Mailing list pgsql-sql

From Tom Lane
Subject Re: Granting of permissions on tables
Date
Msg-id 17228.970781869@sss.pgh.pa.us
Whole thread Raw
In response to Granting of permissions on tables  ("Saltsgaver, Scott" <scottsa@aiinet.com>)
List pgsql-sql
"Saltsgaver, Scott" <scottsa@aiinet.com> writes:
> Is this a bug or desired behavior?  I would imagine since I owned the tables
> and then granted permissions to another user, I wouldn't lose my
> permissions.

It's a bug, or at least a misfeature.  As long as you haven't done any
explicit grants or revokes, 7.0 uses an implicit access control list
that grants all privileges to the owner and none to anyone else.
However, the moment you do any explicit grant/revoke, that implicit
ACL entry for the owner isn't used anymore.  You have to explicitly
grant rights to yourself again :-(.

You don't need superuser help to do this, you just have to doGRANT ALL ON table TO yourself
as the table owner.  But it's stupid to have to do that when it's
supposed to be the default condition.  Fixed for 7.1.
        regards, tom lane


pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Granting of permissions on tables
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Counting bool flags in a complex query