On 25/11/2023 08:23, Alexander Korotkov wrote:
> I think patch certainly gets better in this aspect. One thing I can't
> understand is why do we use home-grown code for resolving
> hash-collisions. You can just define custom hash and match functions
> in HASHCTL. Even if we need to avoid repeated JumbleExpr calls, we
> still can save pre-calculated hash value into hash entry and use
> custom hash and match. This doesn't imply us to write our own
> collision-resolving code.
Thanks, it was an insightful suggestion.
I implemented it, and the code has become shorter (see attachment).
--
regards,
Andrei Lepikhov
Postgres Professional