mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Fix assorted carelessness about Datum vs. int64 vs. uint64
Bugs introduced by commit 81c5e46c49
This commit is contained in:
@@ -2223,14 +2223,15 @@ Datum
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user