Re: Abbreviated keys for Numeric - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: Abbreviated keys for Numeric
Date
Msg-id 87r3sf7yu9.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: Abbreviated keys for Numeric  (Peter Geoghegan <pg@heroku.com>)
Responses Re: Abbreviated keys for Numeric  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
>>>>> "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)



pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: WIP: multivariate statistics / proof of concept
Next
From: Peter Geoghegan
Date:
Subject: Re: Abbreviated keys for Numeric