Created
February 1, 2022 11:54
-
-
Save lordlycastle/afcfb2ddf2833988d5e9504418a46a59 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 usename AS role_name, | |
CASE | |
WHEN usesuper AND usecreatedb THEN | |
CAST('superuser, create database' AS pg_catalog.text) | |
WHEN usesuper THEN | |
CAST('superuser' AS pg_catalog.text) | |
WHEN usecreatedb THEN | |
CAST('create database' AS pg_catalog.text) | |
ELSE | |
CAST('' AS pg_catalog.text) | |
END role_attributes | |
FROM pg_catalog.pg_user | |
ORDER BY role_name desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment