Re: enumeration type? - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: enumeration type?
Date
Msg-id 0c7501c333cb$9336b6c0$6500a8c0@fhp.internal
Whole thread Raw
In response to enumeration type?  ("Andrew Dunstan" <andrew@dunslane.net>)
Responses Re: enumeration type?
List 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@dunslane.net>
To: "PostgreSQL Hackers Mailing List" <pgsql-hackers@postgresql.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@postgresql.org
>



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Groups and roles
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Groups and roles