Re: Migrating a MySQL schema with an enum

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Keith Gray <keith(at)heart(dot)com(dot)au>
Cc: SQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Migrating a MySQL schema with an enum
Date: 2002-03-20 23:53:55
Message-ID: 200203202353.g2KNrtM11253@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Keith Gray wrote:
> SQL gurus,
>
> Migrating a MySQL schema with an enum to PostgreSQL,
> is there an equivalent type or do I have to declare
> another table for "enum" values.

You can use another table, or use CHECK constraints to limit the
possible values.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2002-03-21 00:02:21 Re: Migrating a MySQL schema with an enum
Previous Message Keith Gray 2002-03-20 23:41:30 Migrating a MySQL schema with an enum