PostgreSQL Permissions – GRANT ON ALL TABLES IN SCHEMA

permissionspostgresqlschema

It seems obvious that PostgreSQL will GRANT some privileges ON ALL TABLES IN some schema TO some role when I'll command.

But, will it make it permanent for the schema that on all tables within it, they will be granted the indicated privileges to the indicated roles, so new tables will be affected in the future?.

Or it works as a batch command so after a new table is created in the schema I have to GRANT the indicated privileges to the indicated roles again?.

Best Answer

so new tables will be affected in the future?

No, to affect new tables set DEFAULT PRIVILEGES:
PostgreSQL CREATE TABLE creates with incorrect owner

Note that default privileges are set per role.