Re: Default Privilege Table ANY ROLE - Mailing list pgsql-general

From Nicolas Paris
Subject Re: Default Privilege Table ANY ROLE
Date
Msg-id 20181114190815.72lprnsyh4w7c67c@riseup.net
Whole thread Raw
In response to Re: Default Privilege Table ANY ROLE  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-general
On Wed, Nov 14, 2018 at 10:05:51AM -0600, Ron wrote:
> On 11/14/2018 08:19 AM, Nicolas Paris wrote:
> > Hi
> > 
> > I d'like my user be able to select on any new table from other users.
> > 
> Would ROLE Groups solve your problem?


Maybe yes, not sure what it is. I tested this:

> create role myrolegroup;
> ALTER DEFAULT PRIVILEGES  FOR  ROLE "myrolegroup"  IN SCHEMA "myschema" GRANT  select ON TABLES TO "myuser";
> create myuser1 inherit  in role myrolegroup;
> create myuser2 inherit  in role myrolegroup;

But if myuser2 creates a table, then myuser1 cannot select on it. I
guess that's because inheritance only apply for GRANT (which is
distinct from DEFAUL PRIVILEGE).


Thanks,

-- 
nicolas


pgsql-general by date:

Previous
From: Rémi Cura
Date:
Subject: Re: TOAST : partial detoasting : only a small part of a toasted value(for pgpointcloud)
Next
From: Konstantin Knizhnik
Date:
Subject: libpq to JDBC adapter