Re: How to modify ENUM datatypes? - Mailing list pgsql-general

From Merlin Moncure
Subject Re: How to modify ENUM datatypes?
Date
Msg-id b42b73150804241102i3574b570x5e18daf44fac3053@mail.gmail.com
Whole thread Raw
In response to Re: How to modify ENUM datatypes?  (Andrew Sullivan <ajs@crankycanuck.ca>)
Responses Re: How to modify ENUM datatypes?  (Tino Wildenhain <tino@wildenhain.de>)
Re: How to modify ENUM datatypes?  (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>)
List pgsql-general
On Thu, Apr 24, 2008 at 12:22 PM, Andrew Sullivan <ajs@crankycanuck.ca> wrote:
>  The first time I encountered them, I thought enums were a filthy,
>  ill-conceived answer to a problem that didn't exist, implemented by people
>  who didn't understand relational databases.  With considerably more
>  experience under my belt than then, I say now that my original estimation
>  was too kind.

I think you're being a little too hard on enums here.  I was actually
in the anti-enum camp until it was demonstrated to me (and in my own
testing) that using enum for natural ordering vs. fielding the
ordering of the type out to a join is can be a huge win in such cases
where it is important.  Relational theory is all well and good, but in
practical terms things like record size, index size, and query
performance are important.

I'll admit that if computers were infinitely fast, I'd probably use
enums less, although I still like them for things like male/female.  I
think they have a place.

The difficulty of manipulating enums is simply a shortcoming of the
implementation which could presumably be solved at some later point.

merlin

pgsql-general by date:

Previous
From: Oliver Helm
Date:
Subject: Adding notes against fields
Next
From: Richard Huxton
Date:
Subject: Re: Adding notes against fields