Re: Combining hash values

Greg Stark <stark@mit.edu>

From: Greg Stark <stark@mit.edu>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2016-08-01T07:19:21Z
Lists: pgsql-hackers
Surely combining multiple hashes is the same problem as hashing a block of
memory? Shouldn't we just use the same algorithm as hash_any()?

I was originally going to suggest using a crc  to combine but iirc we
changed hash_any() a while back and decided against using crc. I don't know
if that was wise but wouldn't want to suggest relitigating that.

Commits

  1. Add a hash_combine function for mixing hash values.