Connecting to PostgreSQL

If your read-only user name is silota:

GRANT USAGE ON SCHEMA <schema_name> TO silota;
GRANT SELECT ON ALL TABLES IN SCHEMA <schema_name> TO silota;
  • The first command grant the ability to list tables from a schema to a user
  • The second command grant the read ability to all existing tables from that schema to the user