Re: GRANT SELECT ON ALL TABLES IN SCHEMA... doesn't apply to new tables? - Mailing list pgsql-sql

From Christopher Swingley
Subject Re: GRANT SELECT ON ALL TABLES IN SCHEMA... doesn't apply to new tables?
Date
Msg-id CAHsw449_9f4CP-Ggeh4B9OFNoqKR6sO4bbF=L==2n2GBVE2KZA@mail.gmail.com
Whole thread Raw
In response to GRANT SELECT ON ALL TABLES IN SCHEMA... doesn't apply to new tables?  (Larry Rosenman <ler@lerctr.org>)
List pgsql-sql
Larry,

On Fri, Dec 14, 2018 at 17:14 Larry Rosenman <ler@lerctr.org> wrote:
I have the following grant in effect:
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly;

We occasionally add tables to that schema, but the readonly role
can't read them. 

What you want is to apply default privileges to the roles that will be creating new objects:


Your existing GRANT will take care of the tables you have, default privileges will set permissions on new tables. \ddp shows the in psql.

Cheers,

Chris

--
Christopher Swingley
Fairbanks, Alaska
http://swingleydev.com/
cswingle@swingleydev.com

pgsql-sql by date:

Previous
From: Larry Rosenman
Date:
Subject: GRANT SELECT ON ALL TABLES IN SCHEMA... doesn't apply to new tables?
Next
From: Rob Sargent
Date:
Subject: Re: GRANT SELECT ON ALL TABLES IN SCHEMA... doesn't apply to new tables?