suggested query to list ENUM types是伟大的。但是,它只是模式和typname的列表。如何列出实际的ENUM值?例如,在上面的链接答案中,我想要以下结果
schema type values ------------- -------- ------- communication channels 'text_message','email','phone_call','broadcast'
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