From: | Zachary Beane <xach(at)xach(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: 'enum' equivalent? |
Date: | 2001-01-22 04:01:04 |
Message-ID: | 20010121230104.T11005@xach.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers pgsql-jdbc |
On Sun, Jan 21, 2001 at 10:33:02PM -0500, Steve Leibel wrote:
> Hello,
>
> I'm converting a mysql database to postgres. Is there an equivalent
> for the enum data type?
If you want to make a column limited to few certain values, you can
define it something like:
mycolumn varchar(3) check (mycolumn in ('foo', 'bar', 'baz'))
That would be somewhat similar in effec to mysql's
mycolumn enum('foo', 'bar', 'baz')
Zach
--
xach(at)xach(dot)com Zachary Beane http://www.xach.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lémery | 2001-01-22 08:38:31 | Re: Troubles with performances |
Previous Message | Steve Leibel | 2001-01-22 03:33:02 | 'enum' equivalent? |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-01-22 06:35:28 | Re: Need a debugging tip or two |
Previous Message | Steve Leibel | 2001-01-22 03:33:02 | 'enum' equivalent? |
From | Date | Subject | |
---|---|---|---|
Next Message | Kogotkov, Vyacheslav | 2001-01-22 15:07:33 | JDBC2 question -- can't find files needed |
Previous Message | Steve Leibel | 2001-01-22 03:33:02 | 'enum' equivalent? |