Hash support for row types

Enterprise / PostgreSQL - Peter Eisentraut [eisentraut.org] - 19 November 2020 08:32 UTC

Add hash functions for the record type as well as a hash operator family and operator class for the record type. This enables all the hash functionality for the record type such as hash-based plans for UNION/INTERSECT/EXCEPT DISTINCT, recursive queries using UNION DISTINCT, hash joins, and hash partitioning.

01e658fa74 Hash support for row types
doc/src/sgml/queries.sgml | 9 --
src/backend/utils/adt/rowtypes.c | 249 ++++++++++++++++++++++++++++++++
src/backend/utils/cache/lsyscache.c | 7 +-
src/backend/utils/cache/typcache.c | 78 +++++++---
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_amop.dat | 5 +
src/include/catalog/pg_amproc.dat | 4 +
src/include/catalog/pg_opclass.dat | 2 +
src/include/catalog/pg_operator.dat | 2 +-
src/include/catalog/pg_opfamily.dat | 2 +
src/include/catalog/pg_proc.dat | 7 +
src/test/regress/expected/hash_func.out | 21 +++
src/test/regress/expected/join.out | 1 +
src/test/regress/expected/union.out | 83 ++++++-----
src/test/regress/expected/with.out | 33 ++++-
src/test/regress/sql/hash_func.sql | 17 +++
src/test/regress/sql/join.sql | 1 +
src/test/regress/sql/union.sql | 12 +-
src/test/regress/sql/with.sql | 2 +-
19 files changed, 462 insertions(+), 75 deletions(-)

Upstream: git.postgresql.org


  • Share