Re: enumeration type?

Поиск
Список
Период
Сортировка
От Karel Zak
Тема Re: enumeration type?
Дата
Msg-id 20011218110119.C16212@zf.jcu.cz
обсуждение исходный текст
Ответ на enumeration type?  (Tina Messmann <tina.messmann@xinux.de>)
Список pgsql-general
On Tue, Dec 18, 2001 at 10:32:21AM +0100, Tina Messmann wrote:
> Hello List,
> is there in PostgreSQL something like an enumeration type or have i to
> use the CREATE TYPE command to build my own enumeration type ?

 You needn't enumeration type, you can use more standard CHECK
 option in table definition. For example:

 CREATE TABLE tab (
    y char(1) CHECK(y='A' OR y='B' OR y='C')
 );

        Karel

--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

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

Предыдущее
От: Tina Messmann
Дата:
Сообщение: enumeration type?
Следующее
От: Bo Lorentsen
Дата:
Сообщение: PG sql string -> time_t