Re: Reproducible coliisions in jsonb_hash

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Reproducible coliisions in jsonb_hash
Дата
Msg-id 309877.1652363844@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Reproducible coliisions in jsonb_hash  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Reproducible coliisions in jsonb_hash  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 2022-05-12 Th 07:02, Valeriy Meleshkin wrote:
>> AFAICT it happens because when iterating over a jsonb the hash function makes no distinction between raw scalars and
arrays(it doesn't inspect v.val.array.rawScalar) 

> It does look rather like a bug, but I'm unclear about the implications
> of fixing it.

Changing this hash algorithm would break existing hash indexes on jsonb
columns.  Maybe there aren't any, but even if so I can't get very excited
about changing this.  Hash algorithms always have collisions, and we have
never made any promise that ours are cryptographically strong.

            regards, tom lane



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: First draft of the PG 15 release notes
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: First draft of the PG 15 release notes