From: | Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> |
---|---|
To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: PATCH: CITEXT 2.0 |
Date: | 2008-07-07 19:13:38 |
Message-ID: | 48726AE2.3070201@sun.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David E. Wheeler napsal(a):
> On Jul 7, 2008, at 11:54, Alvaro Herrera wrote:
>
>>> Then why shouldn't I use strncmp() for all comparisons?
>>
>> I have no idea :-) -- because it's not locale-aware perhaps.
>
> Could someone who does have an idea answer these questions:
>
> * Does it need to be locale-aware or not?
> * Should I use strncmp() or varstr_cmp() to compare strings?
> * Shouldn't it use one or the other, but not both?
>
> Sorry, I'm just confused about the "correct" thing to do here. If
> someone who knows the definitive answers could weigh in, I'd be happy to
> make the adjustment.
I'm sorry. I meant bttext()
http://doxygen.postgresql.org/varlena_8c-source.html#l01270
bttext should use in citextcmp function. It uses strcol function.
And citext_eq should be implemented as texteq:
http://doxygen.postgresql.org/varlena_8c-source.html#l01164
I'm sorry for confusion I'm exchange bttext and varstr_cmp. :(
Zdenek
--
Zdenek Kotala Sun Microsystems
Prague, Czech Republic http://sun.com/postgresql
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2008-07-07 19:21:39 | Re: PATCH: CITEXT 2.0 |
Previous Message | Pavel Stehule | 2008-07-07 19:10:45 | Re: PATCH: CITEXT 2.0 v2 |