Re: Removing SORTFUNC_LT/REVLT

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Removing SORTFUNC_LT/REVLT
Дата
Msg-id 87bqyx95ac.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Removing SORTFUNC_LT/REVLT  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Removing SORTFUNC_LT/REVLT
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:

> Yet hashing is also a property of the collation, not the type. The same
> string in different locales would hash differently.

I think this is a mistake -- the same mistake that got us into trouble with
Turkish.

Hashing depends on the concept of equality which is integral to the type. Two
things are either the same or they aren't, and that can't change based on
context.

Specifically in the case of strings, two strings should only be considered
"equal" if they consist of the exact same series of characters. (That is, they
could be encoded differently but they have to encode the same actual
characters.) That they happen to sort equally compared to all other strings
doesn't mean that they're equal.

-- 
greg



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

Предыдущее
От: Qingqing Zhou
Дата:
Сообщение: Re: EINTR error in SunOS
Следующее
От: Greg Stark
Дата:
Сообщение: Re: EINTR error in SunOS