ALTER DEFAULT PRIVILEGES

A utility command for defining default object access privileges

ALTER DEFAULT PRIVILEGES is a utility command for defining default object access privileges.

ALTER DEFAULT PRIVILEGES was introduced in PostgreSQL 9.0.

Change history

Examples

postgres=# CREATE SCHEMA someschema;
CREATE SCHEMA
postgres=# ALTER DEFAULT PRIVILEGES IN SCHEMA someschema GRANT SELECT ON TABLES TO foo; ALTER DEFAULT PRIVILEGES
postgres=# \ddp Default access privileges Owner | Schema | Type | Access privileges ----------+------------+-------+------------------- postgres | someschema | table | foo=r/postgres (1 row)

Categories

DDL, SQL command, Utility command

See also

pg_default_acl