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

Re: BUG #4999: select 'a' < 'A' is true, but should be false . . .

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Brian Ceccarelli <ceccareb(at)talusmusic(dot)com>
Cc: 'Greg Stark' <gsstark(at)mit(dot)edu>,'Brian Ceccarelli' <ceccareb(at)talussoftware(dot)com>,pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4999: select 'a' < 'A' is true, but should be false . . .
Date: 2009-08-26 04:34:54
Message-ID: 20090826043454.GU12604@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Brian Ceccarelli wrote:

> If the words are the same words but letters have different case, then the
> operator is case-sensitive.
> If the words are not the same words, then the operator is case-insensitive
> until the operator reaches the character position in both strings where the
> letters become different.  

This is *exactly* how the collation is supposed to work (read: how it is
defined by the C library).  It is not a trivial single-pass comparison.
It is definitely not simply a case-sensitive or case-insensitive
comparison.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

pgsql-bugs by date

Next:From: Craig RingerDate: 2009-08-26 05:20:51
Subject: Re: BUG #4996: postgres.exe memory consumption keeps going up
Previous:From: Jaime CasanovaDate: 2009-08-26 03:40:05
Subject: Re: BUG #4999: select 'a' < 'A' is true, but should be false . . .

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