Re: citex regression fails with de.UTF8 locale - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: citex regression fails with de.UTF8 locale
Date
Msg-id 49F01724.8010306@enterprisedb.com
Whole thread Raw
In response to citex regression fails with de.UTF8 locale  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Responses Re: citex regression fails with de.UTF8 locale  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Re: citex regression fails with de.UTF8 locale  ("David E. Wheeler" <david@kineticode.com>)
List pgsql-hackers
Zdenek Kotala wrote:
> It seems to me that citex_cmp can return any integer value. It depends
> what wcscoll() returns. I think it should be changed to:
> 
> SELECT citext_cmp('B'::citext, 'a'::citext) > 0 AS one;

The comment in varstr_cmp() claims that it returns -1, 0 or 1. That's 
not accurate then.

Comment and test case fixed. I considered changing varstr_cmp to really 
return -1, 0 or 1, but I didn't because the behavior has been unchanged 
for ages and all the callers are happy with it. That's a heavily called 
function so any extra cycles there could make a difference.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: citex regression fails with de.UTF8 locale
Next
From: Heikki Linnakangas
Date:
Subject: Re: New trigger option of pg_standby