"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> Description: incorrect result from 'order by'
You initdb'd in the wrong locale. You are expecting sort order as in
C locale, but that isn't the default locale setting in recent Red Hat
releases --- en_US is probably what you're using, and that result is
correct according to en_US. (If you don't believe me, try it with
"sort".)
> I have tried databases with SQL_ASCII, LATIN1 and LATIN2
> encoding with the same result.
Database encoding doesn't affect this. You'll need to re-initdb
with the desired locale environment.
regards, tom lane