Re: enums
От | Gregory Maxwell |
---|---|
Тема | Re: enums |
Дата | |
Msg-id | e692861c0510272257n6fb8943fl1bcfd30942f1c35b@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: enums (Andrew Dunstan <andrew@dunslane.net>) |
Список | pgsql-hackers |
On 10/27/05, Andrew Dunstan <andrew@dunslane.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).
В списке pgsql-hackers по дате отправления: