Re: 64-bit hash function for hstore and citext data type
Andrew Gierth <andrew@tao11.riddles.org.uk>
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: amul sul <sulamul@gmail.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-11-22T20:29:34Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix hstore hash function for empty hstores upgraded from 8.4.
- e5a6ae97effe 9.4.21 landed
- bcbb682786a3 10.7 landed
- 8087788f6ade 9.5.16 landed
- 239abfff12a4 9.6.12 landed
- 02e669c0f7dd 11.2 landed
- d5890f49da6a 12.0 landed
-
Add a 64-bit hash function for type hstore.
- eb6f29141bed 12.0 landed
-
Add a 64-bit hash function for type citext.
- 48c41fa97480 12.0 landed
-
Introduce 64-bit hash functions with a 64-bit seed.
- 81c5e46c490e 11.0 cited
>>>>> "Tomas" == Tomas Vondra <tomas.vondra@2ndquadrant.com> writes: Tomas> I wonder if the hstore hash function is actually correct. I see Tomas> it pretty much just computes hash on the varlena representation. Tomas> The important question is - can there be two different encodings Tomas> for the same hstore value? I was going to say "no", but in fact on closer examination there is an edge case caused by the fact that hstoreUpgrade allows an _empty_ hstore from pg_upgraded 8.4 data through without modifying it. (There's also a vanishingly unlikely case involving the pgfoundry release of hstore-new.) I'm inclined to fix this in hstoreUpgrade rather than complicate hstore_hash with historical trivia. Also there have been no field complaints - I guess it's unlikely that there is much pg 8.4 hstore data in the wild that anyone wants to hash. -- Andrew (irc:RhodiumToad)