Re: PATCH: CITEXT 2.0

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: PATCH: CITEXT 2.0
Дата
Msg-id 2679EDDF-7BAB-465B-866A-7B94C6975306@kineticode.com
обсуждение исходный текст
Ответ на Re: PATCH: CITEXT 2.0  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Ответы Re: PATCH: CITEXT 2.0  ("David E. Wheeler" <david@kineticode.com>)
Список pgsql-hackers
On Jul 7, 2008, at 12:13, Zdenek Kotala wrote:

> 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.

I've no idea what bttext has to do with anything. Sorry if I'm being  
slow here.

> 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. :(

Okay, I see that text_cmp() uses varstr_cmp():
  http://doxygen.postgresql.org/varlena_8c-source.html#l01139

While texteq() and textne() use strncmp():
  http://doxygen.postgresql.org/varlena_8c-source.html#l01164
http://doxygen.postgresql.org/varlena_8c-source.html#l01187

The other operator functions, like text_lt(), use text_cmp() and  
therefore varstr_cmp():
  http://doxygen.postgresql.org/varlena_8c-source.html#01210

My question is: why? Shouldn't they all use the same function for  
comparison? I'm happy to dupe this implementation for citext, but I  
don't understand it. Should not all comparisons be executed  
consistently?

Thanks,

David


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: Re: PATCH: CITEXT 2.0
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: PATCH: CITEXT 2.0 v2