Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AdamStormhardtGH/e8e68e780d231b68865e64dd1a343c9d to your computer and use it in GitHub Desktop.
Save AdamStormhardtGH/e8e68e780d231b68865e64dd1a343c9d to your computer and use it in GitHub Desktop.
select 'GRANT SELECT ON ALL TABLES IN SCHEMA ' || nspname || ' TO GROUP READONLY; GRANT USAGE ON SCHEMA ' || nspname || ' TO GROUP READONLY;'
from pg_namespace
where nspowner = 100;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment