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

From Tom Lane
Subject Re: PATCH: CITEXT 2.0
Date
Msg-id 25624.1215475087@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:
> Hrm. So in your opinion, strncmp() could be used for all comparisons  
> by citext, rather than varstr_cmp()?

I thought the charter of this type was to work like lower(textcol).
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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: PATCH: CITEXT 2.0 v2
Next
From: "David E. Wheeler"
Date:
Subject: Re: PATCH: CITEXT 2.0