Created
August 22, 2023 20:30
-
-
Save twopoint718/5a4b275d4b85799cb9ad75dadf8daeac to your computer and use it in GitHub Desktop.
List custom types along with their enum values
This file contains 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
-- list types and their enum values | |
SELECT | |
pg_type.typname AS enumtype, | |
array_agg(pg_enum.enumlabel) AS enumlabels | |
FROM | |
pg_type | |
JOIN pg_enum ON pg_enum.enumtypid = pg_type.oid | |
GROUP BY pg_type.typname; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment