Re: BUG #1590: Comparison Operation with Strings - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: BUG #1590: Comparison Operation with Strings
Date
Msg-id 20050410132226.J82492@megazone.bigpanda.com
Whole thread Raw
In response to BUG #1590: Comparison Operation with Strings  ("Michaela" <rambo1503-postgresql@yahoo.de>)
List pgsql-bugs
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.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1590: Comparison Operation with Strings
Next
From: Tom Lane
Date:
Subject: Re: BUG #1591: BETWEEN NULL AND NULL causes crash