Re: How to modify ENUM datatypes?

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: How to modify ENUM datatypes?
Дата
Msg-id 20080428142839.GB2970@commandprompt.com
обсуждение исходный текст
Ответ на Re: How to modify ENUM datatypes?  (Robert Treat <xzilla@users.sourceforge.net>)
Ответы Re: How to modify ENUM datatypes?
Список 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@commandprompt.com
+1 503 667 4564 x104
http://www.commandprompt.com/

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: meaning of default_statistics_target
Следующее
От: Erik Jones
Дата:
Сообщение: Re: inheritance. more.