Re: What is the good equivalent for ENUM ?

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
Cc: PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: What is the good equivalent for ENUM ?
Date: 2003-09-04 00:30:12
Message-ID: Pine.LNX.4.33.0309031829270.25656-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 3 Sep 2003, Ron Johnson wrote:

> On Wed, 2003-09-03 at 09:50, Vivek Khera wrote:
> > >>>>> "SD" == Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in> writes:
> >
> > SD> On 3 Sep 2003 at 14:30, Bruno BAGUETTE wrote:
> > >> The problem is that this MySQL database uses ENUM, do you see what can I
> > >> do to migrate ENUM into PostgreSQL ?
> >
> > SD> varchar with check constraints. Add constraits to allow only
> > SD> certain values of varchar string.
> >
> > I used to do this. It turns out to be horribly inflexible when you
> > need to alter the enum values since the constraints cannot easily be
> > changed.
>
> It'll be better when domains have alterable constraints. Your
> way is the traditional (and best, IMO) way, though.

Speaking of enumeration, I noticed that the old copy of the SQL3 spec I
have lists an enumerated type. Is that still in the SQL 3 spec, and if
so, are there any plans to implement it in pgsql?

Just wondering.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-09-04 02:00:19 Re: postmaster crashing
Previous Message Ashley Cambrell 2003-09-04 00:28:01 Re: [HACKERS] Using oids