Re: texteq/byteaeq: avoid detoast [REVIEW]

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: texteq/byteaeq: avoid detoast [REVIEW]
Дата
Msg-id 1295250978.1455.2.camel@fsopti579.F-Secure.com
обсуждение исходный текст
Ответ на Re: texteq/byteaeq: avoid detoast [REVIEW]  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: texteq/byteaeq: avoid detoast [REVIEW]  (Robert Haas <robertmhaas@gmail.com>)
Re: texteq/byteaeq: avoid detoast [REVIEW]  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On mån, 2011-01-17 at 07:35 +0100, Magnus Hagander wrote:
> For text, I think locales may make that impossible. Aren't there
> locale rules where two different characters can "behave the same" when
> comparing them? I know in Swedish at least w and v behave the same
> when sorting (but not when comparing) in some variants of the locale.
> 
> In fact, aren't there cases where the *length test* also fails? I
> don't know this for sure, but unless we know for certain that two
> different length strings can never be the same *independent of
> locale*, this whole patch has a big problem...

Currently, two text values are only equal of strcoll() considers them
equal and the bits are the same.  So this patch is safe in that regard.

There is, however, some desire to loosen this.  Possible applications
are case-insensitive comparison and Unicode normalization.  It's not
going to happen soon, but it may be worth considering not putting in an
optimization that we'll end up having to rip out again in a year
perhaps.



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

Предыдущее
От: Itagaki Takahiro
Дата:
Сообщение: Re: texteq/byteaeq: avoid detoast [REVIEW]
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: texteq/byteaeq: avoid detoast [REVIEW]