This question was asked on the PostgreSQL novice newsgroup recently and Tom Lane fielded the question. Its a common thing to want to know if you are using the new 8.3 Enum feature. So we felt it useful to restate it.
Question: Given an enum, is there a query you can run to list out all the elements allowed by the enum?
CREATE TYPE myenum as enum ('red','green','blue'); SELECT enumlabel FROM pg_enum WHERE enumtypid = 'myenum'::regtype ORDER BY oid; enumlabel ----------- red green blue (3 rows) http://www.postgresql.org/docs/8.3/static/catalog-pg-enum.html