Re: enum data type - Mailing list pgsql-general

From Szabo Zoltan
Subject Re: enum data type
Date
Msg-id 3BB824AD.6070703@mportal.hu
Whole thread Raw
In response to enum data type  (travis <smitht@cache.net>)
List pgsql-general
Hi,
you can use the check.

create table language (
         lang_id SERIAL primary key,
         shortcut char(2) not null unique check (shortcut in
('en','nl','de'))
);

CoL

travis wrote:

> can somebody point me in the direction of info on how to implement an
> 'enum' data type?
>
> trav
>
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
>


pgsql-general by date:

Previous
From: "Andy Hallam"
Date:
Subject: Re: CREATION OF PRIMARY KEYS
Next
From: "sreedhar"
Date:
Subject: