Re: Per-column collation, proof of concept

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Per-column collation, proof of concept
Дата
Msg-id 5575.1279207461@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Per-column collation, proof of concept  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Per-column collation, proof of concept  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Well, the comparison function varstr_cmp() contains this comment:

>     /*
>      * In some locales strcoll() can claim that nonidentical strings are
>      * equal.  Believing that would be bad news for a number of reasons,
>      * so we follow Perl's lead and sort "equal" strings according to
>      * strcmp().
>      */

> This might not be strictly necessary, seeing that citext obviously
> doesn't work that way, but resolving this is really an orthogonal issue.

The problem with not doing that is it breaks hashing --- hash joins and
hash aggregation being the real pain points.

citext works around this in a rather klugy fashion by decreeing that two
strings are equal iff their str_tolower() conversions are bitwise equal.
So it can hash the str_tolower() representation.  But that's kinda slow
and it fails in the general case anyhow, I think.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: SHOW TABLES
Следующее
От: Thom Brown
Дата:
Сообщение: Re: SHOW TABLES