Re: Is it possible to query the database for the values of an enumerated type in 8.3.3?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Nagle, Gail A \(US SSA\)" <gail(dot)nagle(at)baesystems(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Is it possible to query the database for the values of an enumerated type in 8.3.3?
Date: 2008-12-18 13:32:58
Message-ID: 24759.1229607178@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Nagle, Gail A \(US SSA\)" <gail(dot)nagle(at)baesystems(dot)com> writes:
> Is it possible to query the database (e.g. from psql or from the pgAdmin
> III Query tool) for the enumerated values in the newly added user
> defined type?

regression=# create type myenum as enum ('red','green','blue');
CREATE TYPE
regression=# 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

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Joshua Tolley 2008-12-18 14:46:10 Re: See description of a function
Previous Message Nagle, Gail A (US SSA) 2008-12-18 08:58:54 Is it possible to query the database for the values of an enumerated type in 8.3.3?