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

From Scott Marlowe
Subject Re: How to modify ENUM datatypes?
Date
Msg-id dcc563d10804240856h27a1c5f1td6074a39e43e2385@mail.gmail.com
Whole thread Raw
In response to Re: How to modify ENUM datatypes?  (Andrew Sullivan <ajs@crankycanuck.ca>)
List pgsql-general
On Thu, Apr 24, 2008 at 9:39 AM, Andrew Sullivan <ajs@crankycanuck.ca> wrote:
> On Wed, Apr 23, 2008 at 07:46:07PM -0400, brian wrote:
>  >
>  > Absolutely true. Which is odd, because this example is trotted out
>  > whenever there's a thread about ENUMs.
>
>  I don't think it's odd at all.  In my view, the people who think enums are a
>  good datatype for databases are exactly the sorts who'd think that their
>  data is as static as this poor understanding of the vagaries of individuals'
>  sex (gender is a different problem, given its association with social roles)
>  would suggest.
>
>  The world moves around in unexpected ways.  Your data model needs to
>  accommodate itself to the world, because the alternative is not going to
>  happen.

Mostly true, but there are systems where certain parts really do tend
to be static over very long periods, and for those, I might admit to
ENUM being an answer.  for instance, in the USAF, all units being
worked on in our avionics shop were in one of three categories,
Awaiting Maintenance, Awaiting Parts, or In Work.  They were
abbreviated AWM, AWP, and INW.

That was back in the 1980s.  I'm willing to bet it hasn't changed
since then.  For those types of problems, enums make a certain amount
of sense, especially if you're tracking thousands of line units being
worked on every hour of every day across the US.  the small saving in
space adds up fast.  But that's an artificially constructed set of
choices.

pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: How to modify ENUM datatypes?
Next
From: "D. Dante Lorenso"
Date:
Subject: Re: How to modify ENUM datatypes?