mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Fix various hash function uses
These instances were using Datum-returning functions where a lower-level function returning uint32 would be more appropriate. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/8246d7ff-f4b7-4363-913e-827dadfeb145%40eisentraut.org
This commit is contained in:
@@ -2833,7 +2833,7 @@ hash_multirange(PG_FUNCTION_ARGS)
|
||||
upper_hash = 0;
|
||||
|
||||
/* Merge hashes of flags and bounds */
|
||||
range_hash = hash_uint32((uint32) flags);
|
||||
range_hash = hash_bytes_uint32((uint32) flags);
|
||||
range_hash ^= lower_hash;
|
||||
range_hash = pg_rotate_left32(range_hash, 1);
|
||||
range_hash ^= upper_hash;
|
||||
|
||||
@@ -1444,7 +1444,7 @@ hash_range(PG_FUNCTION_ARGS)
|
||||
upper_hash = 0;
|
||||
|
||||
/* Merge hashes of flags and bounds */
|
||||
result = hash_uint32((uint32) flags);
|
||||
result = hash_bytes_uint32((uint32) flags);
|
||||
result ^= lower_hash;
|
||||
result = pg_rotate_left32(result, 1);
|
||||
result ^= upper_hash;
|
||||
|
||||
Reference in New Issue
Block a user