Re: enumeration type?
От | Christopher Kings-Lynne |
---|---|
Тема | Re: enumeration type? |
Дата | |
Msg-id | 0c7501c333cb$9336b6c0$6500a8c0@fhp.internal обсуждение исходный текст |
Ответ на | enumeration type? ("Andrew Dunstan" <andrew@dunslane.net>) |
Ответы |
Re: enumeration type?
|
Список | 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 по дате отправления: