>>>>> "Peter" == Peter Geoghegan <pg@heroku.com> writes:
Peter> By the way, there was another bug in this that I forgot to pointPeter> out, but removed, here:
"removed"? looks just the same in either of your patches...
Peter> + if (nss->estimating)Peter> + {Peter> + uint32 tmp = (uint32)result;Peter> + addHyperLogLog(&nss->abbr_card,
hash_uint32(tmp));Peter>+ }
Yes, that should have DatumGetUInt32() around the hash_uint32, thanks
Peter> (I simply operate on the raw Datum when hashing for hyperLogLog,Peter> in a similar manner to the text opclass,
whichis safe with 8Peter> byte datums + pass by value int64).
But this paragraph makes no sense, and the code currently in varlena.c
is just as wrong in its usage of hash_uint32 as I was.
--
Andrew (irc:RhodiumToad)