From: | Andrew Sullivan <ajs(at)commandprompt(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to modify ENUM datatypes? |
Date: | 2008-04-28 14:28:40 |
Message-ID: | 20080428142839.GB2970@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Apr 26, 2008 at 08:33:28PM -0400, Robert Treat wrote:
> enum types custom ordering. It also showcases the idea of data definitions
> that "should never change", but that do changes every half dozen years or so.
> Now you can argue that since it is expected that the ratings might change in
> some way every few years that an enum type is not a good choice for this, but
> I feel like some type of counter-argument is that this is probably longer
> than one would expect thier database software to last. :-)
I think that if you are building software on the premise that it's
only going to last five years, you oughta have a look around on the
Internet again. Or think about why banks spent the money they did a
few years back poring over ancient code making sure that two-digit
year representations weren't in use.
You can _of course_ make this sort of trade-off: the cost of the
upgrade might be worth the natural ordering and boost in performance.
But that was part of my point when noting that enums oughta come with
a warning (and why I compared them to char()). I'm not arguing that
they're completely useless; just that, like any oddly specialised
tool, they require careful use.
A
--
Andrew Sullivan
ajs(at)commandprompt(dot)com
+1 503 667 4564 x104
http://www.commandprompt.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Erik Jones | 2008-04-28 14:31:40 | Re: inheritance. more. |
Previous Message | Tom Lane | 2008-04-28 14:02:01 | Re: meaning of default_statistics_target |