Re: PATCH: CITEXT 2.0

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: PATCH: CITEXT 2.0
Дата
Msg-id 2F472DC1-CB44-476C-ACFF-C2807C21751F@kineticode.com
обсуждение исходный текст
Ответ на Re: PATCH: CITEXT 2.0  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Ответы Re: PATCH: CITEXT 2.0  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
On Jul 7, 2008, at 00:46, Zdenek Kotala wrote:

> You have to use varstr_cmp  in citextcmp. Your code is correct,  
> because for
> < <= >= > operators you need collation sensible function.
>
> You need to change only citext_cmp function to use strncmp() or call  
> texteq function.

I'm confused. What's the difference between strncmp() and  
varstr_cmp()? And why would I use one in one place and the other  
elsewhere? Shouldn't they be used consistently?

> I'm think that this test will work correctly for en_US.UTF-8 at any  
> time. I guess the test make sense only when Czech collation  
> (cs_CZ.UTF-8) is selected, but unfortunately, you cannot change  
> collation during your test :(.

No, I was wondering before what locale was used for initdb on the  
build farm. I mean, how are locale-aware things really tested?

> I think, Best solution for now is to keep the test and add comment  
> about recommended collation for this test.

Yep, that's what it does.

Thanks,

David



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Auto-explain patch
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: PATCH: CITEXT 2.0 v2