0

I created new role named "support" in my PostgreSQL. Now I need grant "READ ONLY" permissions for this role an ALL exists databases/tables. Also I need automatically granted same permissions on each DB that will created in future.

I unsuccessfully tried next queries for grant permissions in new databases (Can not select from new database tables ):

ALTER DEFAULT PRIVILEGES FOR ROLE support GRANT SELECT ON TABLES TO PUBLIC;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES to support;
Slava Rozhnev
  • 9,510
  • 6
  • 23
  • 39

1 Answers1

0

ALTER DEFAULT PRIVILEGES allows you to set the privileges that will be applied to objects created in the future. (It does not affect privileges assigned to already-existing objects.)

pifor
  • 7,419
  • 2
  • 8
  • 16