Created
April 20, 2023 20:34
-
-
Save gareth-cheeseman/289b854974af94a2f04a261186fddfd6 to your computer and use it in GitHub Desktop.
get roles postgres
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 | |
U.rolname | |
,D.datname | |
FROM | |
pg_roles AS U JOIN pg_database AS D ON (D.datdba = U.oid) | |
WHERE | |
D.datname = current_database() | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment