Skip to content

Instantly share code, notes, and snippets.

@mdespriee
Last active December 11, 2015 09:55
Show Gist options
  • Save mdespriee/97fd48a174cc6d6d02e3 to your computer and use it in GitHub Desktop.
Save mdespriee/97fd48a174cc6d6d02e3 to your computer and use it in GitHub Desktop.
select tablename,
HAS_TABLE_PRIVILEGE(tablename, 'select') as select,
HAS_TABLE_PRIVILEGE(tablename, 'insert') as insert,
HAS_TABLE_PRIVILEGE(tablename, 'update') as update,
HAS_TABLE_PRIVILEGE(tablename, 'delete') as delete,
HAS_TABLE_PRIVILEGE(tablename, 'references') as references
from pg_tables where schemaname='public' order by tablename;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment