Re: enumeration type?

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "PostgreSQL Hackers Mailing List" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: enumeration type?
Date: 2003-06-16 05:53:12
Message-ID: 0c7501c333cb$9336b6c0$6500a8c0@fhp.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

There is no such thing as an enumeration type. What there is is the char
type with a CHECK constraint. MySQL made up ENUMs out of whole cloth...they
should copy our way, not us theirs...

Chris

----- Original Message -----
From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: "PostgreSQL Hackers Mailing List" <pgsql-hackers(at)postgresql(dot)org>
Sent: Sunday, June 15, 2003 4:49 AM
Subject: [HACKERS] enumeration type?

> This occurred to me yesterday as I was designing a little Db.
>
> Has anyone thought about support for a simple enumeration type creation
> mechanism? I know I could do it with CREATE TYPE and input/output
functions,
> but that does seem like a lot of work for a smallish thing.
>
> As it is, I settled on a char type with some constraint checking, but
> couldn't help thinking how nice a simple enumeration would have been.
>
> andrew
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2003-06-16 05:55:28 Re: Groups and roles
Previous Message Tom Lane 2003-06-16 05:24:42 Re: Groups and roles