Re: PATCH: CITEXT 2.0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org, "Zdenek Kotala" <Zdenek(dot)Kotala(at)Sun(dot)COM>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Subject: Re: PATCH: CITEXT 2.0
Date: 2008-07-08 00:18:40
Message-ID: 26034.1215476320@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"David E. Wheeler" <david(at)kineticode(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-07-08 00:21:16 Re: Data type OID numbers fixed?
Previous Message Alvaro Herrera 2008-07-08 00:16:55 Re: Data type OID numbers fixed?