Re: BUG #1590: Comparison Operation with Strings

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Michaela <rambo1503-postgresql(at)yahoo(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1590: Comparison Operation with Strings
Date: 2005-04-10 20:25:49
Message-ID: 20050410132226.J82492@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)yahoo(dot)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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-04-10 21:00:14 Re: BUG #1591: BETWEEN NULL AND NULL causes crash
Previous Message Tom Lane 2005-04-10 20:12:22 Re: BUG #1590: Comparison Operation with Strings