Re: citex regression fails with de.UTF8 locale

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: citex regression fails with de.UTF8 locale
Date: 2009-04-23 07:22:12
Message-ID: 49F01724.8010306@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-04-23 07:49:13 Re: New trigger option of pg_standby
Previous Message Zdenek Kotala 2009-04-23 06:27:54 citex regression fails with de.UTF8 locale