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-07 23:58:07
Message-ID: 25624.1215475087@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:
> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2008-07-08 00:03:34 Re: PATCH: CITEXT 2.0
Previous Message David E. Wheeler 2008-07-07 23:37:00 Re: PATCH: CITEXT 2.0 v2