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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is it possible to query the database for the values of an enumerated type in 8.3.3?
Дата
Msg-id 24759.1229607178@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Is it possible to query the database for the values of an enumerated type in 8.3.3?  ("Nagle, Gail A \(US SSA\)" <gail.nagle@baesystems.com>)
Список pgsql-novice
"Nagle, Gail A \(US SSA\)" <gail.nagle@baesystems.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

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Nagle, Gail A \(US SSA\)"
Дата:
Сообщение: Is it possible to query the database for the values of an enumerated type in 8.3.3?
Следующее
От: Joshua Tolley
Дата:
Сообщение: Re: See description of a function