hashing bpchar for nondeterministic collations is broken

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема hashing bpchar for nondeterministic collations is broken
Дата
Msg-id eb83d0ac7b299eb08f9b900dd08a5a0c5d90e517.camel@j-davis.com
обсуждение исходный текст
Ответы Re: hashing bpchar for nondeterministic collations is broken
Re: hashing bpchar for nondeterministic collations is broken
Список pgsql-bugs
CREATE COLLATION ctest_nondet(
  provider = icu, locale = '', deterministic = false);

=# select hashbpcharextended('a' collate ctest_nondet, 3);
 hashbpcharextended
---------------------
 2792701603979490504
(1 row)

=# select hashbpcharextended('a  ' collate ctest_nondet, 3);
  hashbpcharextended
----------------------
 -4885217598372536483
(1 row)


I don't see any major consequences, because in both hash indexes and
partitioning it appears that the trailing spaces on the key are already
gone before hashbpcharextended is called. If someone does see bigger
consequences here, please let me know.

Seems to be an oversight. Patch attached.

Also, does someone have an opinion on backporting this? I'm inclined
to.


--
Jeff Davis
PostgreSQL Contributor Team - AWS



Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_catalog.pg_get_viewdef pretty-print removes important parentheses
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Bug in jsonb_path_exists (maybe _match) one-element scalar/variable jsonpath handling