Search Postgresql Archives

Re: How to modify ENUM datatypes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 24, 2008 at 9:39 AM, Andrew Sullivan <ajs@xxxxxxxxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux