Re: BUG #1082: Order by doesn't sort correctly.

Поиск
Список
Период
Сортировка
От Richard Neill
Тема Re: BUG #1082: Order by doesn't sort correctly.
Дата
Msg-id 4037E70D.6020106@hermes.cam.ac.uk
обсуждение исходный текст
Ответ на Re: BUG #1082: Order by doesn't sort correctly.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Tom Lane wrote:
> "PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
>
>>Description:        Order by doesn't sort correctly.
>
>
> It almost certainly is the correct sort order according to the locale
> you're using.  Use pg_controldata to check the database locale.  You'll
> probably want to re-initdb in C locale.  Most non-C locales have weird
> rules that try to approximate dictionary sort order.
>
>             regards, tom lane
>

Dear Tom,

Thanks for your email. I did check pg_controldata and found:
LC_COLLATE:  en_GB
LC_CTYPE:    en_GB

The bug isn't the particular ascii-betical (or other) order.
But what I am getting as a supposedly ordered list includes:

Cymbal #1
Cymbal - 18 inch
Cymbal #2

This ordering is perverse! No matter what the priority is of the
different characters, I cannot understand how the above can arise.
Whether '#' comes before or after '-', '#1' and '#2' should be adjacent.

Richard

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

Предыдущее
От: Richard Neill
Дата:
Сообщение: Re: BUG #1082: Order by doesn't sort correctly.
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: The syntax about CREATE DOMAIN