From: | Gregory Maxwell <gmaxwell(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, ted(at)php(dot)net, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: enums |
Date: | 2005-10-28 05:57:38 |
Message-ID: | e692861c0510272257n6fb8943fl1bcfd30942f1c35b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 10/27/05, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> >That seems counter-intuitive. It's also exposing an implimentation
> >detail (that the enum is stored internally as a number).
>
> No it is not. Not in the slightest. It is honoring the enumeration order
> defined for the type. That is the ONLY correct behaviour, IMNSHO.
> Otherwise, you could just as easily use a domain with a check constraint.
>
> In fact, mysql's behaviour is laughably, even ludicrously, inconsistent:
[snip]
> So for "order by" it honors the enumeration order, but for < it uses the
> lexical ordering. Lovely, eh?
Oh wow. That is broken, I didn't try that case because I figured it
would do it right (i.e. use the enum order).
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Maxwell | 2005-10-28 06:02:43 | Re: enums |
Previous Message | Philip Yarra | 2005-10-28 05:41:09 | Re: pl/pgsql breakage in 8.1b4? |