On Tue, Dec 19, 2006 at 08:09:47AM +0000, Heikki Linnakangas wrote:
> Tom Dunstan wrote:
> >Here is an updated version of the enums patch. It has been brought up to 
> >date and applies against current CVS HEAD. The original email is at [1], 
> >and describes the implementation.
> 
> I'm sorry I missed the original discussions, but I have to ask: Why do 
> we want enums in core? The only potential advantage I can see over using 
> a look-up table and FK references is performance.

A natural ordering is another.  I'd love to be able to make a type
color that has

Red
Orange 
Yellow
Green
Blue
Indigo
Violet

and then be able to do an ORDER BY color;

> And I'd rather spend time improving the performance of FK checks
> than add extra machinery to do the same thing in a different way.

Not the same thing.

> Ignoring my general dislike of enums, I have a few issues with the patch 
> as it is:
> 
> 1. What's the point of having comparison operators for enums? For most 
> use cases, there's no natural ordering of enum values.

A natural ordering is precisely the use case for enums.  Otherwise,
you just use a FK to a one-column table and have done.

Cheers,
D
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to