Re: PATCH: CITEXT 2.0 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PATCH: CITEXT 2.0
Date
Msg-id 26034.1215476320@sss.pgh.pa.us
Whole thread Raw
In response to Re: PATCH: CITEXT 2.0  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: PATCH: CITEXT 2.0  ("David E. Wheeler" <david@kineticode.com>)
List pgsql-hackers
"David E. Wheeler" <david@kineticode.com> writes:
> On Jul 7, 2008, at 16:58, Tom Lane wrote:
>> If that's so, you certainly can't use strncmp, because that would  
>> result
>> in sort orderings totally different from lower()'s result.  Even  
>> without
>> that argument, for most multibyte cases you'd get a pretty arbitrary,
>> user-unfriendly sort ordering.

> Now I'm confused again. :-( Whether or not I use strncmp() or  
> varstr_cmp(), I first lowercase the value to be compared using  
> str_tolower(). What Zdenek has said is, that aside, just as for the  
> TEXT type, I should use strncmp() for = and <>, and varstr_cmp() for  
> everything else. Are you saying something different?

No, but you were: you proposed using strncmp for everything.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Data type OID numbers fixed?
Next
From: Tom Lane
Date:
Subject: Re: Data type OID numbers fixed?