Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group