Re: Enumerated data type

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Anand Raman <araman(at)india-today(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Enumerated data type
Date: 2000-05-02 21:29:16
Message-ID: Pine.LNX.4.21.0005022200330.362-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Anand Raman writes:

> Is there anything equivalent to the enumerated data types in
> postgresql..

You might find that strings with check constraints will do the job, e.g.

create table my_tbl (
...
color text check color in ('blue', 'green', 'white'),
...
);

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message rmcm 2000-05-02 21:46:49 Re: Finding PrimaryKey columns of a table
Previous Message Culberson, Philip 2000-05-02 21:26:23 RE: Need help with attributes...