diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/union.out | 13 | ||||
-rw-r--r-- | src/test/regress/sql/union.sql | 6 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/test/regress/expected/union.out b/src/test/regress/expected/union.out index 26b718e9033..0fd0e1c38b3 100644 --- a/src/test/regress/expected/union.out +++ b/src/test/regress/expected/union.out @@ -815,6 +815,19 @@ select x from (values (row(1, 2)), (row(1, 3))) _(x) except select x from (value (1,3) (1 row) +-- non-sortable type +-- Ensure we get a HashAggregate plan. Keep enable_hashagg=off to ensure +-- there's no chance of a sort. +explain (costs off) select '123'::xid union select '123'::xid; + QUERY PLAN +--------------------------- + HashAggregate + Group Key: ('123'::xid) + -> Append + -> Result + -> Result +(5 rows) + reset enable_hashagg; -- -- Mixed types diff --git a/src/test/regress/sql/union.sql b/src/test/regress/sql/union.sql index 8afc580c632..f8826514e42 100644 --- a/src/test/regress/sql/union.sql +++ b/src/test/regress/sql/union.sql @@ -244,6 +244,12 @@ explain (costs off) select x from (values (row(1, 2)), (row(1, 3))) _(x) except select x from (values (row(1, 2)), (row(1, 4))) _(x); select x from (values (row(1, 2)), (row(1, 3))) _(x) except select x from (values (row(1, 2)), (row(1, 4))) _(x); +-- non-sortable type + +-- Ensure we get a HashAggregate plan. Keep enable_hashagg=off to ensure +-- there's no chance of a sort. +explain (costs off) select '123'::xid union select '123'::xid; + reset enable_hashagg; -- |