Re: [ADMIN] phantom rights - Mailing list pgsql-admin

From Scott Marlowe
Subject Re: [ADMIN] phantom rights
Date
Msg-id CAOR=d=3ur1Sp8V=OwQF-LT733Kt_Eqn6nNTKpy-A2bGcKLdsYw@mail.gmail.com
Whole thread Raw
In response to [ADMIN] phantom rights  (Thomas Poty <thomas.poty@gmail.com>)
Responses Re: [ADMIN] phantom rights  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-admin
On Tue, Aug 1, 2017 at 7:53 AM, Thomas Poty <thomas.poty@gmail.com> wrote:
> Hello world,
>
> I wonder if the problem of "phantom rights" exists in Postgresql 9.5 as it
> exists in MySQL.
>
> What happens with privileges if :
> - I create a table t1
> - I grant to user u1 some privileges for the table t1
> - I drop table t1;
> - and I recreate de same table t1
>
> Are these privileges still existing or completely revoked/deleted with the
> drop table statement?

Easy enough to test:

create table test (a int, b text);
CREATE TABLE
smarlowe=# \z test
                            Access privileges
 Schema | Name | Type  | Access privileges | Column privileges | Policies
--------+------+-------+-------------------+-------------------+----------
 public | test | table |                   |

grant select on test to stan;
GRANT
smarlowe=# \z test
                                Access privileges
 Schema | Name | Type  |     Access privileges     | Column privileges
| Policies
--------+------+-------+---------------------------+-------------------+----------
 public | test | table | smarlowe=arwdDxt/smarlowe+|                   |
        |      |       | stan=r/smarlowe           |                   |

smarlowe=# drop table test;
DROP TABLE
smarlowe=# create table test (a int, b text);
CREATE TABLE
smarlowe=# \z test
                            Access privileges
 Schema | Name | Type  | Access privileges | Column privileges | Policies
--------+------+-------+-------------------+-------------------+----------
 public | test | table |                   |                   |

So no, no phantom permissions.


pgsql-admin by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: [ADMIN] [PERFORM] 2 server with same configuration but huge difference in performance
Next
From: Scott Marlowe
Date:
Subject: Re: [ADMIN] phantom rights