I was reminded today that I'd promised to do $SUBJECT awhile back. It's worth having so that hash joins and hash aggregation can work on array values. I believe this is a fairly straightforward exercise:
1. Add a hash opclass that accepts ANYARRAY, similar to the existing btree opclass for ANYARRAY. It will work for any array type whose element type has a hash opclass. 2. Coding is much like the array_cmp support code, including caching the lookup of the element type's hash function. 3. To hash, apply the element type's hash function to each array element. Combine these values by rotating the accumulator left one bit at each step and xor'ing in the next element's hash value. Thoughts? In particular, is anyone aware of a better method for combining the element hash values? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers