Andrew Dunstan <and...@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