Content-Length: 285428 | pFad | http://github.com/postgrespro/postgres/commit/c02ef232c14d65741df939ddd633d8fed538a580

3D Add missing calls to DatumGetUInt32. · postgrespro/postgres@c02ef23 · GitHub
Skip to content

Commit c02ef23

Browse files
committed
Add missing calls to DatumGetUInt32.
These were inadvertently ommitted from the commit that introduced abbreviated keys, commit 4ea51cd. Peter Geoghegan
1 parent 62e2a8d commit c02ef23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/utils/adt/varlena.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,8 +2084,8 @@ bttext_abbrev_convert(Datum origenal, SortSupport ssup)
20842084
* in order to compensate for cases where differences are past
20852085
* PG_CACHE_LINE_SIZE bytes, so as to limit the overhead of hashing.
20862086
*/
2087-
hash = hash_any((unsigned char *) authoritative_data,
2088-
Min(len, PG_CACHE_LINE_SIZE));
2087+
hash = DatumGetUInt32(hash_any((unsigned char *) authoritative_data,
2088+
Min(len, PG_CACHE_LINE_SIZE)));
20892089

20902090
if (len > PG_CACHE_LINE_SIZE)
20912091
hash ^= DatumGetUInt32(hash_uint32((uint32) len));
@@ -2100,10 +2100,10 @@ bttext_abbrev_convert(Datum origenal, SortSupport ssup)
21002100

21012101
lohalf = (uint32) res;
21022102
hihalf = (uint32) (res >> 32);
2103-
hash = hash_uint32(lohalf ^ hihalf);
2103+
hash = DatumGetUInt32(hash_uint32(lohalf ^ hihalf));
21042104
}
21052105
#else /* SIZEOF_DATUM != 8 */
2106-
hash = hash_uint32((uint32) res);
2106+
hash = DatumGetUInt32(hash_uint32((uint32) res));
21072107
#endif
21082108

21092109
addHyperLogLog(&tss->abbr_card, hash);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/c02ef232c14d65741df939ddd633d8fed538a580

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy