From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Hash support for row types |
Date: | 2020-10-19 23:32:34 |
Message-ID: | 20201019233234.r6lyxbvdg5s77rvd@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2020-10-19 10:01:14 +0200, Peter Eisentraut wrote:
> In [0] it was discussed that hash support for row types/record would be
> handy. So I implemented that.
> The implementation hashes each field and combines the hash values. Most of
> the code structure can be borrowed from the record comparison
> functions/btree support. To combine the hash values, I adapted the code
> from the array hashing functions. (The hash_combine()/hash_combine64()
> functions also looked sensible, but they don't appear to work in a way that
> satisfies the hash_func regression test. Could be documented better.)
>
> The main motivation is to support UNION [DISTINCT] as discussed in [0], but
> this also enables other hash-related functionality such as hash joins (as
> one regression test accidentally revealed) and hash partitioning.
How does this deal with row types with a field that doesn't have a hash
function? Erroring out at runtime could cause queries that used to
succeed, e.g. because all fields have btree ops, to fail, if we just have
a generic unconditionally present hash opclass? Is that an OK
"regression"?
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2020-10-20 00:35:56 | Re: Make procedure OUT parameters work with JDBC |
Previous Message | Andres Freund | 2020-10-19 23:27:53 | Re: Enumize logical replication message actions |