Re: [GENERAL] Making subscribers read only in Postgres 10 logical replication - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: [GENERAL] Making subscribers read only in Postgres 10 logical replication
Date
Msg-id os46ui$rij$1@blaine.gmane.org
Whole thread Raw
In response to Re: [GENERAL] Making subscribers read only in Postgres 10 logical replication  (rverghese <riyav@hotmail.com>)
List pgsql-general
rverghese schrieb am 11.10.2017 um 20:38:
> You mean at the user permissions level? Yes, I could, but would mean doing so
> table by table, which is not our current structure. I guess there is nothing
> at the database level.

Not at the database level, but at the schema level:

You can revoke those privileges for all tables in a schema:
 revoke insert,update,delete    on all tables in schema public   from the_user;

You can do that for all future tables as well:
 alter default privileges   in schema public   revoke insert,update,delete on tables   from the_user;

Thomas



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Allan Kamau
Date:
Subject: [GENERAL] Preventing psql from attempting to access ~/.pgpass file.
Next
From: Justin Pryzby
Date:
Subject: Re: [GENERAL] Preventing psql from attempting to access ~/.pgpassfile.