Re: Why do indexes and sorts use the database collation?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Why do indexes and sorts use the database collation?
Дата
Msg-id c46e94e0-53ef-4e9a-9c0b-ad11f8ced616@eisentraut.org
обсуждение исходный текст
Ответ на Re: Why do indexes and sorts use the database collation?  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Why do indexes and sorts use the database collation?  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On 14.11.23 02:58, Jeff Davis wrote:
> If the user just wants PK/FK constraints, and equality lookups, then an
> index with the "C" collation makes a lot of sense to serve those
> purposes.

The problem is that the user has no way to declare whether they just 
want this.  The default assumption is that you get a btree and that is 
useful for range queries.  If the user just wants equality lookups, they 
could use a hash index.  Hash indexes kind of work like what we 
discussed in another message: They use C collation semantics unless the 
collation is declared nondeterministic.  Of course, hash indexes don't 
support uniqueness, but maybe that could be fixed?  And/or we could 
provide some other syntax that say, I want a btree but I just want 
equality lookups?




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: should check collations when creating partitioned index
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro