Re: how is text-equality handled in postgresql?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: how is text-equality handled in postgresql?
Дата
Msg-id 24248.1389797020@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: how is text-equality handled in postgresql?  (Ivan Voras <ivoras@freebsd.org>)
Список pgsql-general
Ivan Voras <ivoras@freebsd.org> writes:
> On 15/01/2014 12:36, Amit Langote wrote:
>> Just to add to this, whenever strcoll() (a locale aware comparator)
>> says two strings are equal, postgres re-compares them using strcmp().

> That seems odd and inefficient. Why would it be necessary? I would think
> indexing (and other collation-sensitive operations) don't care what the
> actual collation result is for arbitrary blobs of strings, as long as
> they are stable?

If we didn't do it like this, we could not use hashing techniques for
text --- at least not unless we could find a hash function guaranteed
to yield the same values for any two strings that strcoll() claims are
equal.

            regards, tom lane


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pg_basebackup failing
Следующее
От: Amit Langote
Дата:
Сообщение: Re: How are pg_operator and pg_type related with each other?