On Thu, 7 Apr 2005, Michaela wrote:
> The following bug has been logged online:
>
> Bug reference: 1590
> Logged by: Michaela
> Email address: rambo1503-postgresql@yahoo.de
> PostgreSQL version: 8.0.1
> Operating system: SuSE Linux 9.1
> Description: Comparison Operation with Strings
> Details:
>
> Hello!
>
> conditions:
> -----------
> Our database is defined with SQL_ASCII. We also tested Latin1.
This depends on the locale, not the encoding.
Specifically, for example, 'A' < '? ABC' in en_US and probably other
similar locales.
For the data you give, en_US and de_DE appear to sort as:
?
100
ABC
? ABC
B
Z
If you want byte order sorting, you need to make sure to initdb in C
locale.