Re: phantom rights

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Thomas Poty <thomas(dot)poty(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: phantom rights
Date: 2017-08-01 15:39:38
Message-ID: CAOR=d=3ur1Sp8V=OwQF-LT733Kt_Eqn6nNTKpy-A2bGcKLdsYw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Aug 1, 2017 at 7:53 AM, Thomas Poty <thomas(dot)poty(at)gmail(dot)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.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2017-08-01 15:40:28 Re: phantom rights
Previous Message Scott Marlowe 2017-08-01 15:35:20 Re: [PERFORM] 2 server with same configuration but huge difference in performance