Re: Column Types

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: Column Types
Дата
Msg-id 1063526018.18284.21.camel@linda.lfix.co.uk
обсуждение исходный текст
Ответ на Column Types  ("Muhyiddin A.M Hayat" <middink@indo.net.id>)
Список pgsql-sql
On Sun, 2003-09-14 at 07:49, Muhyiddin A.M Hayat wrote:
> If in MySQL i'm using type EMUN what type in Postgres?

Use a CHECK constraint:

CREATE TABLE xxx (  ...  colour    TEXT   CHECK (colour IN ('red', 'green', 'blue')),  ...
);

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "But without faith it is impossible to please him; for      he that cometh
toGod must believe that he is, and      that he is a rewarder of them that diligently seek      him."        Hebrews
11:6
 



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

Предыдущее
От: "Muhyiddin A.M Hayat"
Дата:
Сообщение: Column Types
Следующее
От: Peter Childs
Дата:
Сообщение: Re: A generic trigger?