Re: sortsupport for text

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: sortsupport for text
Дата
Msg-id 26600.1339948864@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: sortsupport for text  (Peter Geoghegan <peter@2ndquadrant.com>)
Ответы Re: sortsupport for text  (Peter Geoghegan <peter@2ndquadrant.com>)
Список pgsql-hackers
Peter Geoghegan <peter@2ndquadrant.com> writes:
> The fly in the ointment for strxfrm() adoption may be the need to be
> consistent with this earlier behaviour:

>     if strcoll claims two strings are equal, check it with strcmp, and
>     sort according to strcmp if not identical.

> I'm not sure I agree with this decision; why should we presume to know
> better than the glibc locale what constitutes equality?

The killer reason why it must be like that is that you can't use hash
methods on text if text equality is some unknown condition subtly
different from bitwise equality.  My recollection is that there were
some other problems as well, but I'm too lazy to search the archives
for you.

> It's seems very likely that the main
> one was the then-need to guard against poor quality qsort()
> implementations that went quadratic in the face of lots of duplicates,

No, I don't recall that that had anything to do with it.
        regards, tom lane


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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: libpq compression
Следующее
От: Gianni Ciolli
Дата:
Сообщение: Re: [PATCH] Support for foreign keys with arrays