mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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:
@@ -815,10 +815,10 @@ hashRowType(TupleDesc desc)
|
||||
uint32 s;
|
||||
int i;
|
||||
|
||||
s = hash_combine(0, hash_uint32(desc->natts));
|
||||
s = hash_combine(s, hash_uint32(desc->tdtypeid));
|
||||
s = hash_combine(0, hash_bytes_uint32(desc->natts));
|
||||
s = hash_combine(s, hash_bytes_uint32(desc->tdtypeid));
|
||||
for (i = 0; i < desc->natts; ++i)
|
||||
s = hash_combine(s, hash_uint32(TupleDescAttr(desc, i)->atttypid));
|
||||
s = hash_combine(s, hash_bytes_uint32(TupleDescAttr(desc, i)->atttypid));
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user