File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Expand file tree Collapse file tree 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)
40844084 {
40854085 /* Apply the hash function */
40864086 locfcinfo .arg [0 ] = elt ;
4087- locfcinfo .arg [1 ] = seed ;
4087+ locfcinfo .arg [1 ] = Int64GetDatum ( seed ) ;
40884088 locfcinfo .argnull [0 ] = false;
40894089 locfcinfo .argnull [1 ] = false;
40904090 locfcinfo .isnull = false;
Original file line number Diff line number Diff line change @@ -2223,14 +2223,15 @@ Datum
22232223timetz_hash_extended (PG_FUNCTION_ARGS )
22242224{
22252225 TimeTzADT * key = PG_GETARG_TIMETZADT_P (0 );
2226- uint64 seed = PG_GETARG_DATUM (1 );
2226+ Datum seed = PG_GETARG_DATUM (1 );
22272227 uint64 thash ;
22282228
22292229 /* Same approach as timetz_hash */
22302230 thash = DatumGetUInt64 (DirectFunctionCall2 (hashint8extended ,
22312231 Int64GetDatumFast (key -> time ),
22322232 seed ));
2233- thash ^= DatumGetUInt64 (hash_uint32_extended (key -> zone , seed ));
2233+ thash ^= DatumGetUInt64 (hash_uint32_extended (key -> zone ,
2234+ DatumGetInt64 (seed )));
22342235 PG_RETURN_UINT64 (thash );
22352236}
22362237
Original file line number Diff line number Diff line change @@ -2285,7 +2285,7 @@ hash_numeric_extended(PG_FUNCTION_ARGS)
22852285 hash_len * sizeof (NumericDigit ),
22862286 seed );
22872287
2288- result = digit_hash ^ weight ;
2288+ result = UInt64GetDatum ( DatumGetUInt64 ( digit_hash ) ^ weight ) ;
22892289
22902290 PG_RETURN_DATUM (result );
22912291}
Original file line number Diff line number Diff line change @@ -1288,7 +1288,7 @@ Datum
12881288hash_range_extended (PG_FUNCTION_ARGS )
12891289{
12901290 RangeType * r = PG_GETARG_RANGE (0 );
1291- uint64 seed = PG_GETARG_INT64 (1 );
1291+ Datum seed = PG_GETARG_DATUM (1 );
12921292 uint64 result ;
12931293 TypeCacheEntry * typcache ;
12941294 TypeCacheEntry * scache ;
@@ -1335,7 +1335,8 @@ hash_range_extended(PG_FUNCTION_ARGS)
13351335 upper_hash = 0 ;
13361336
13371337 /* 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 )));
13391340 result ^= lower_hash ;
13401341 result = ROTATE_HIGH_AND_LOW_32BITS (result );
13411342 result ^= upper_hash ;
You can’t perform that action at this time.
0 commit comments