Re: Order By ignoring "-" character
| От | Tom Lane |
|---|---|
| Тема | Re: Order By ignoring "-" character |
| Дата | |
| Msg-id | 10604.1054999096@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Order By ignoring "-" character (Dave Wood <postgresql_question@attbi.com>) |
| Список | pgsql-general |
Dave Wood <postgresql_question@attbi.com> writes:
> Postgres not only seems to ignore the case of the text, implying a
> clause of "order by upper(name)", but it also seems to drop characters
> when doing the sort (the "-" and " " preceding the letters are not used
> during the order by). Doing some digging on this subject seemed to
> imply that my locale was not set correctly somehow. This is an
> out-of-the-box install of postgres from RedHat 9 in the en_US locale.
^^^^^^^^^^^^
You need locale "C" if you want plain-ASCII sort order. Unfortunately,
changing this requires a re-initdb (because it affects index ordering).
There are ongoing discussions about whether or not we should force C as
the default locale rather than accept the default from your environment.
It seems that some people will be confused and unhappy no matter which
way we do it :-(
regards, tom lane
В списке pgsql-general по дате отправления: