Re: enum data type

From: Szabo Zoltan <col(at)mportal(dot)hu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: enum data type
Date: 2001-10-01 08:09:17
Message-ID: 3BB824AD.6070703@mportal.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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! =-----
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message J C Lawrence 2001-10-01 08:36:48 GROUP BY with wildcard non-deterministic fields?
Previous Message Krzysztof Koch 2001-10-01 07:59:18 temporary table problem in function