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