Re: PATCH: CITEXT 2.0

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: PATCH: CITEXT 2.0
Дата
Msg-id D0094897-A812-416E-8E8F-3193ACC55BFC@kineticode.com
обсуждение исходный текст
Ответ на Re: PATCH: CITEXT 2.0  ("David E. Wheeler" <david@kineticode.com>)
Ответы Re: PATCH: CITEXT 2.0  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Re: PATCH: CITEXT 2.0  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: PATCH: CITEXT 2.0  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
On Jul 7, 2008, at 12:21, David E. Wheeler wrote:

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

Let me try to answer my own question by citing this comment:
/* * Since we only care about equality or not-equality, we can avoid  
all the * expense of strcoll() here, and just do bitwise comparison. */

So, the upshot is that the = and <> operators are not locale-aware,  
yes? They just do byte comparisons. Is that really the way it should  
be? I mean, could there not be strings that are equivalent but have  
different bytes?

Thanks,

David



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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: PATCH: CITEXT 2.0 v2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: the un-vacuumable table