pgsql: Add more tests for hashing and hash-based plans

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add more tests for hashing and hash-based plans
Date: 2020-11-18 07:42:02
Message-ID: E1kfI6M-0001hH-5X@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add more tests for hashing and hash-based plans

- Test hashing of an array of a non-hashable element type.

- Test UNION [DISTINCT] with hash- and sort-based plans. (Previously,
only INTERSECT and EXCEPT where tested there.)

- Test UNION [DISTINCT] with a non-hashable column type. This
currently reverts to a sort-based plan even if enable_hashagg is on.

- Test UNION/INTERSECT/EXCEPT hash- and sort-based plans with arrays
as column types. Also test an array with a non-hashable element
type.

- Test UNION/INTERSECT/EXCEPT similarly with row types as column
types. Currently, this uses only sort-based plans because there is
no hashing support for row types.

- Add a test case that shows that recursive queries using UNION
[DISTINCT] require hashable column types.

- Add a currently failing test that uses UNION DISTINCT in a
cycle-detection use case using row types as column types.

Discussion: https://www.postgresql.org/message-id/flat/38eccd35-4e2d-6767-1b3c-dada1eac3124%402ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6dd8b00807871bfd0c3ce8e18fd1f6ba1a71fbf9

Modified Files
--------------
src/test/regress/expected/hash_func.out | 7 +
src/test/regress/expected/union.out | 357 +++++++++++++++++++++++++++++++-
src/test/regress/expected/with.out | 20 ++
src/test/regress/sql/hash_func.sql | 6 +
src/test/regress/sql/union.sql | 92 +++++++-
src/test/regress/sql/with.sql | 18 ++
6 files changed, 498 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2020-11-18 08:32:16 pgsql: docs: Clarify that signal functions have no feedback.
Previous Message Michael Paquier 2020-11-18 05:02:30 pgsql: Add tab completion for CREATE [OR REPLACE] TRIGGER in psql