{"repo":"cybertec-postgresql/pg_permissions","free":true,"listed":false,"github":"https://github.com/cybertec-postgresql/pg_permissions","clone":"git clone https://github.com/cybertec-postgresql/pg_permissions.git","description":"A simple set of views to see ALL permissions in a PostgreSQL database","language":"PLpgSQL","stars":168,"topics":["postgresql-extension","postgresql"],"license":null,"category":"databases-storage","readme_excerpt":"PostgreSQL permission reports and checks ======================================== This extension allows you to review object permissions on a PostgreSQL database. Cookbook -------- First, you have to install the extension in the database: CREATE EXTENSION pg permissions SCHEMA public; Then you need to add entries to permission target that correspond to your desired permissions. Let's assume we have a schema appschema , and appuser should have SELECT , UPDATE , DELETE and INSERT permissions on all tables and views in that schema: INSERT INTO public.permission target (role name, permissions, object type, schema name) VALUES ('appuser', '{SELECT,INSERT,UPDATE,DELETE}', 'TABLE', 'appschema'); INSERT INTO public.permission target (role name, permissions, object type, schema name) VALUES ('appuser', '{SELECT,INSERT,UPDATE,DELETE}', 'VIEW', 'appschema'); Of course, the user will need the USAGE privilege on the schema: INSERT INTO public.permission target (role name, permissions, object type, schema name) VALUES ('appuser', '{USAGE}', 'SCHEMA', 'appschema'); The user also needs USAGE privileges on the appseq sequence in that schema: INSERT INTO public.permission target (role name, permissions, object type, schema name, object name) VALUES ('appuser', '{USAGE}', 'SEQUENCE', 'appschema', 'appseq'); Now we can review which permissions are missing and which additional permissions are granted: SELECT FROM public.permission diffs(); missing role name object type schema name object name col","default_branch":null,"files":null,"tree":[],"storefront":"/r/cybertec-postgresql","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/cybertec-postgresql/pg_permissions/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}