Re: Column Types - Mailing list pgsql-sql

From Oliver Elphick
Subject Re: Column Types
Date
Msg-id 1063526018.18284.21.camel@linda.lfix.co.uk
Whole thread Raw
In response to Column Types  ("Muhyiddin A.M Hayat" <middink@indo.net.id>)
List 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 by date:

Previous
From: "Muhyiddin A.M Hayat"
Date:
Subject: Column Types
Next
From: Peter Childs
Date:
Subject: Re: A generic trigger?