Re: privs drop after alter table - Mailing list pgsql-general

From Josh Kupershmidt
Subject Re: privs drop after alter table
Date
Msg-id CAK3UJRFFh2Ebcbf2F=KgwLFArwHHOmWhmyEyqnAe0Gmup+yeig@mail.gmail.com
Whole thread Raw
In response to privs drop after alter table  ("Gauthier, Dave" <dave.gauthier@intel.com>)
List pgsql-general
On Thu, May 3, 2012 at 11:14 AM, Gauthier, Dave <dave.gauthier@intel.com> wrote:
> v8.3.4 on linux
> After this..
>
> alter table fred alter column wilma set default 'dino';
>
> ...it appeared that a user that had insert,delete,update privs lost them.
>
> I regranded and things went back to normal.
>
> Is it correct for those privs to be dropped in this case?  If so, why (just
> curious).

I don't think the behavior you described would be correct. But works
for me on 8.3.18 (see testcase below), and I don't see any bugfixes
like this in the 8.3.x release notes. Are you able to produce a
self-contained test case?

Josh

-- These commands were run as user 'josh'
test=# CREATE TABLE fred (wilma text);
CREATE TABLE
test=# GRANT INSERT, DELETE, UPDATE ON fred TO dummy;
GRANT
test=# \z fred
           Access privileges for database "test"
 Schema | Name | Type  |         Access privileges
--------+------+-------+-----------------------------------
 public | fred | table | {josh=arwdxt/josh,dummy=awd/josh}
(1 row)

test=# ALTER TABLE fred ALTER COLUMN wilma SET DEFAULT 'dino';
ALTER TABLE
test=# \z fred
           Access privileges for database "test"
 Schema | Name | Type  |         Access privileges
--------+------+-------+-----------------------------------
 public | fred | table | {josh=arwdxt/josh,dummy=awd/josh}
(1 row)

pgsql-general by date:

Previous
From: Michael Nolan
Date:
Subject: Re: Issue with rsync based incremental backup : postgres: startup process waiting for 0000000100000001000000D2
Next
From: EllyR
Date:
Subject: Move the postgreSQL database from Drive C to Map Network Drive (Called Z)