Re: Felix Lechner 2019-08-24
<CAFHYt56JutkB3EC5fhEtMOAieOLDN_zb-f0GHZL=x_ffcu9...@mail.gmail.com>
> There's a missing HASHES property on the = operator declaration that's
> stopping it being considered for hash joins.
I have bad news here: The existing debversion_hash() function is bogus
because it doesn't consider that different strings might be debversion-equal:
# select '1.01'::debversion = '1.1';
?column?
──────────
t
# select debversion_hash('1.1');
debversion_hash
─────────────────
1155389872
# select debversion_hash('1.01');
debversion_hash
─────────────────
-721827735
This means that instead of what you requested, we need to drop the
debversion_hash function instead, pushing hash joins even more out.
Inventing a hash function that is consistent with the debversion
semantics seems hard. (I think most of the cases would be fixed by
dropping extra zeros, but I have a strong feeling that this isn't
enough.)
Adding MERGES looks reasonable, though.
Christoph