Created
January 13, 2024 02:50
-
-
Save 0xBigBoss/69ccfb61fc9a8d6ce62b87fcdeed1160 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
grantee, | |
specific_schema, | |
routine_name, | |
privilege_type | |
FROM | |
information_schema.routine_privileges | |
WHERE | |
specific_schema NOT IN ('pg_catalog', 'information_schema'); | |
SELECT | |
defaclrole::regrole AS role, | |
nspname AS schema, | |
defaclobjtype AS object_type, | |
defaclacl AS default_privileges | |
FROM | |
pg_default_acl | |
JOIN | |
pg_namespace ON pg_default_acl.defaclnamespace = pg_namespace.oid; | |
SELECT | |
grantee, | |
table_schema, | |
table_name, | |
privilege_type | |
FROM | |
information_schema.table_privileges | |
WHERE | |
table_schema NOT IN ('pg_catalog', 'information_schema'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment