mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Add missing calls to DatumGetUInt32.
These were inadvertently ommitted from the commit that introduced abbreviated keys, commit 4ea51cdfe85ceef8afabceb03c446574daa0ac23. Peter Geoghegan
This commit is contained in:
parent
62e2a8dc2c
commit
c02ef232c1
@ -2084,8 +2084,8 @@ bttext_abbrev_convert(Datum original, SortSupport ssup)
|
|||||||
* in order to compensate for cases where differences are past
|
* in order to compensate for cases where differences are past
|
||||||
* PG_CACHE_LINE_SIZE bytes, so as to limit the overhead of hashing.
|
* PG_CACHE_LINE_SIZE bytes, so as to limit the overhead of hashing.
|
||||||
*/
|
*/
|
||||||
hash = hash_any((unsigned char *) authoritative_data,
|
hash = DatumGetUInt32(hash_any((unsigned char *) authoritative_data,
|
||||||
Min(len, PG_CACHE_LINE_SIZE));
|
Min(len, PG_CACHE_LINE_SIZE)));
|
||||||
|
|
||||||
if (len > PG_CACHE_LINE_SIZE)
|
if (len > PG_CACHE_LINE_SIZE)
|
||||||
hash ^= DatumGetUInt32(hash_uint32((uint32) len));
|
hash ^= DatumGetUInt32(hash_uint32((uint32) len));
|
||||||
@ -2100,10 +2100,10 @@ bttext_abbrev_convert(Datum original, SortSupport ssup)
|
|||||||
|
|
||||||
lohalf = (uint32) res;
|
lohalf = (uint32) res;
|
||||||
hihalf = (uint32) (res >> 32);
|
hihalf = (uint32) (res >> 32);
|
||||||
hash = hash_uint32(lohalf ^ hihalf);
|
hash = DatumGetUInt32(hash_uint32(lohalf ^ hihalf));
|
||||||
}
|
}
|
||||||
#else /* SIZEOF_DATUM != 8 */
|
#else /* SIZEOF_DATUM != 8 */
|
||||||
hash = hash_uint32((uint32) res);
|
hash = DatumGetUInt32(hash_uint32((uint32) res));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
addHyperLogLog(&tss->abbr_card, hash);
|
addHyperLogLog(&tss->abbr_card, hash);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user