aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/varlena.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2015-04-02 11:57:35 -0400
committerRobert Haas <rhaas@postgresql.org>2015-04-02 11:57:35 -0400
commitc02ef232c14d65741df939ddd633d8fed538a580 (patch)
tree7417e7476c22a1f98b8e1e4ace0c2b9b2dd6dfe8 /src/backend/utils/adt/varlena.c
parent62e2a8dc2c7f6b1351a0385491933af969ed4265 (diff)
downloadpostgresql-c02ef232c14d65741df939ddd633d8fed538a580.tar.gz
postgresql-c02ef232c14d65741df939ddd633d8fed538a580.zip
Add missing calls to DatumGetUInt32.
These were inadvertently ommitted from the commit that introduced abbreviated keys, commit 4ea51cdfe85ceef8afabceb03c446574daa0ac23. Peter Geoghegan
Diffstat (limited to 'src/backend/utils/adt/varlena.c')
-rw-r--r--src/backend/utils/adt/varlena.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 3edd283212c..02e994972c3 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -2084,8 +2084,8 @@ bttext_abbrev_convert(Datum original, SortSupport ssup)
* in order to compensate for cases where differences are past
* PG_CACHE_LINE_SIZE bytes, so as to limit the overhead of hashing.
*/
- hash = hash_any((unsigned char *) authoritative_data,
- Min(len, PG_CACHE_LINE_SIZE));
+ hash = DatumGetUInt32(hash_any((unsigned char *) authoritative_data,
+ Min(len, PG_CACHE_LINE_SIZE)));
if (len > PG_CACHE_LINE_SIZE)
hash ^= DatumGetUInt32(hash_uint32((uint32) len));
@@ -2100,10 +2100,10 @@ bttext_abbrev_convert(Datum original, SortSupport ssup)
lohalf = (uint32) res;
hihalf = (uint32) (res >> 32);
- hash = hash_uint32(lohalf ^ hihalf);
+ hash = DatumGetUInt32(hash_uint32(lohalf ^ hihalf));
}
#else /* SIZEOF_DATUM != 8 */
- hash = hash_uint32((uint32) res);
+ hash = DatumGetUInt32(hash_uint32((uint32) res));
#endif
addHyperLogLog(&tss->abbr_card, hash);