Search code examples
postgresqlrole

postgres role to access all schema


I am using postgres 9.4 database with many schemas. How can I create a login role that can select table of all table of all schema and also any new schema that we create in the database


Solution

  • To answer your comment I think this statement will work:

    ALTER DEFAULT PRIVILEGES 
    FOR ROLE role_name
    IN SCHEMA public
    GRANT ALL PRIVILEGES ON TABLES TO role_name;