"PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)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