Skip to content

Instantly share code, notes, and snippets.

@almahdi404
Last active June 10, 2025 11:22
Show Gist options
  • Save almahdi404/95d06962c8dfb90754a30b170e2b4518 to your computer and use it in GitHub Desktop.
Save almahdi404/95d06962c8dfb90754a30b170e2b4518 to your computer and use it in GitHub Desktop.
Postgresql get enums list
select n.nspname as enum_schema,
t.typname as enum_name,
e.enumlabel as enum_value
from pg_type t
join pg_enum e on t.oid = e.enumtypid
join pg_catalog.pg_namespace n ON n.oid = t.typnamespace;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment