index 522af7affc6e301bc7c594c6fd1b1db37ea45a5f..2a4de41bbc0b303bb3177827687d7c2eab1ca65f 100644 (file)
{
/* Apply the hash function */
locfcinfo.arg[0] = elt;
- locfcinfo.arg[1] = seed;
+ locfcinfo.arg[1] = Int64GetDatum(seed);
locfcinfo.argnull[0] = false;
locfcinfo.argnull[1] = false;
locfcinfo.isnull = false;
index 34c0b52d5834d1b929c9b3540d0d64e2b6b87ff2..0992bb3fdd024a093374ad923e2151fc05446550 100644 (file)
timetz_hash_extended(PG_FUNCTION_ARGS)
{
TimeTzADT *key = PG_GETARG_TIMETZADT_P(0);
- uint64 seed = PG_GETARG_DATUM(1);
+ Datum seed = PG_GETARG_DATUM(1);
uint64 thash;
/* Same approach as timetz_hash */
thash = DatumGetUInt64(DirectFunctionCall2(hashint8extended,
Int64GetDatumFast(key->time),
seed));
- thash ^= DatumGetUInt64(hash_uint32_extended(key->zone, seed));
+ thash ^= DatumGetUInt64(hash_uint32_extended(key->zone,
+ DatumGetInt64(seed)));
PG_RETURN_UINT64(thash);
}
index 22d5898927cec5dc8700d9a76ae72df45b1a8e62..bc01f3c284640d37f289021bad1e9d8016755059 100644 (file)
hash_len * sizeof(NumericDigit),
seed);
- result = digit_hash ^ weight;
+ result = UInt64GetDatum(DatumGetUInt64(digit_hash) ^ weight);
PG_RETURN_DATUM(result);
}
index d7ba271317a19d8b8a2e420d084e174817a0007c..dae505159ee76dd5af39c3d3cf61b69af3719a23 100644 (file)
hash_range_extended(PG_FUNCTION_ARGS)
{
RangeType *r = PG_GETARG_RANGE(0);
- uint64 seed = PG_GETARG_INT64(1);
+ Datum seed = PG_GETARG_DATUM(1);
uint64 result;
TypeCacheEntry *typcache;
TypeCacheEntry *scache;
upper_hash = 0;
/* Merge hashes of flags and bounds */
- result = hash_uint32_extended((uint32) flags, seed);
+ result = DatumGetUInt64(hash_uint32_extended((uint32) flags,
+ DatumGetInt64(seed)));
result ^= lower_hash;
result = ROTATE_HIGH_AND_LOW_32BITS(result);
result ^= upper_hash;