File tree 4 files changed +8
-6
lines changed
4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -4084,7 +4084,7 @@ hash_array_extended(PG_FUNCTION_ARGS)
4084
4084
{
4085
4085
/* Apply the hash function */
4086
4086
locfcinfo .arg [0 ] = elt ;
4087
- locfcinfo .arg [1 ] = seed ;
4087
+ locfcinfo .arg [1 ] = Int64GetDatum ( seed ) ;
4088
4088
locfcinfo .argnull [0 ] = false;
4089
4089
locfcinfo .argnull [1 ] = false;
4090
4090
locfcinfo .isnull = false;
Original file line number Diff line number Diff line change @@ -2223,14 +2223,15 @@ Datum
2223
2223
timetz_hash_extended (PG_FUNCTION_ARGS )
2224
2224
{
2225
2225
TimeTzADT * key = PG_GETARG_TIMETZADT_P (0 );
2226
- uint64 seed = PG_GETARG_DATUM (1 );
2226
+ Datum seed = PG_GETARG_DATUM (1 );
2227
2227
uint64 thash ;
2228
2228
2229
2229
/* Same approach as timetz_hash */
2230
2230
thash = DatumGetUInt64 (DirectFunctionCall2 (hashint8extended ,
2231
2231
Int64GetDatumFast (key -> time ),
2232
2232
seed ));
2233
- thash ^= DatumGetUInt64 (hash_uint32_extended (key -> zone , seed ));
2233
+ thash ^= DatumGetUInt64 (hash_uint32_extended (key -> zone ,
2234
+ DatumGetInt64 (seed )));
2234
2235
PG_RETURN_UINT64 (thash );
2235
2236
}
2236
2237
Original file line number Diff line number Diff line change @@ -2285,7 +2285,7 @@ hash_numeric_extended(PG_FUNCTION_ARGS)
2285
2285
hash_len * sizeof (NumericDigit ),
2286
2286
seed );
2287
2287
2288
- result = digit_hash ^ weight ;
2288
+ result = UInt64GetDatum ( DatumGetUInt64 ( digit_hash ) ^ weight ) ;
2289
2289
2290
2290
PG_RETURN_DATUM (result );
2291
2291
}
Original file line number Diff line number Diff line change @@ -1288,7 +1288,7 @@ Datum
1288
1288
hash_range_extended (PG_FUNCTION_ARGS )
1289
1289
{
1290
1290
RangeType * r = PG_GETARG_RANGE (0 );
1291
- uint64 seed = PG_GETARG_INT64 (1 );
1291
+ Datum seed = PG_GETARG_DATUM (1 );
1292
1292
uint64 result ;
1293
1293
TypeCacheEntry * typcache ;
1294
1294
TypeCacheEntry * scache ;
@@ -1335,7 +1335,8 @@ hash_range_extended(PG_FUNCTION_ARGS)
1335
1335
upper_hash = 0 ;
1336
1336
1337
1337
/* Merge hashes of flags and bounds */
1338
- result = hash_uint32_extended ((uint32 ) flags , seed );
1338
+ result = DatumGetUInt64 (hash_uint32_extended ((uint32 ) flags ,
1339
+ DatumGetInt64 (seed )));
1339
1340
result ^= lower_hash ;
1340
1341
result = ROTATE_HIGH_AND_LOW_32BITS (result );
1341
1342
result ^= upper_hash ;
You can’t perform that action at this time.
0 commit comments