Connecting to PostgreSQL

Create a new user silota:

create user silota with password 'password';

And grant the silota user read-only access to the schema schema_name:

grant usage on schema <schema_name> to silota;
grant select on all tables in schema <schema_name> to silota;
  • The first command grants the ability to list tables from a schema to a user
  • The second command grants the read ability to all existing tables from that schema to the user

If there's a specific table in your schema that holds private information and you don't want the silota user to query, you can revoke the permission to select from it:

revoke select on table_name from silota;

Next Generation SQL Data Analysis Write SQL, visualize data, and share your results. Onboarding forward-thinking teams now:

No spam, ever! Unsubscribe any time. Learn more about the product.

results matching ""

    No results matching ""