Step 1. Create role
CREATE ROLE read_only_role
Step 2. Generate sql query for all tables:
SELECT 'GRANT SELECT ON "' + TABLE_SCHEMA + '"."' + TABLE_NAME + '" TO "read_only_role"' FROM information_schema.tables
Step 3: Copy generated sql query from “Results” panel
Step 4: Paste copied sql query and run
Enjoy
Recent Comments