diff options
Diffstat (limited to 'src/test/regress/expected/union.out')
| -rw-r--r-- | src/test/regress/expected/union.out | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/src/test/regress/expected/union.out b/src/test/regress/expected/union.out index 26b718e9033..882017afc9a 100644 --- a/src/test/regress/expected/union.out +++ b/src/test/regress/expected/union.out @@ -412,17 +412,16 @@ set enable_hashagg to off; explain (costs off) select count(*) from ( select unique1 from tenk1 union select fivethous from tenk1 ) ss; - QUERY PLAN ----------------------------------------------------------------- + QUERY PLAN +---------------------------------------------------------------------- Aggregate -> Unique - -> Merge Append + -> Sort Sort Key: tenk1.unique1 - -> Index Only Scan using tenk1_unique1 on tenk1 - -> Sort - Sort Key: tenk1_1.fivethous + -> Append + -> Index Only Scan using tenk1_unique1 on tenk1 -> Seq Scan on tenk1 tenk1_1 -(8 rows) +(7 rows) select count(*) from ( select unique1 from tenk1 union select fivethous from tenk1 ) ss; @@ -951,9 +950,16 @@ select except select; -- check hashed implementation set enable_hashagg = true; set enable_sort = false; --- We've no way to check hashed UNION as the empty pathkeys in the Append are --- fine to make use of Unique, which is cheaper than HashAggregate and we've --- no means to disable Unique. +explain (costs off) +select from generate_series(1,5) union select from generate_series(1,3); + QUERY PLAN +---------------------------------------------------------------- + HashAggregate + -> Append + -> Function Scan on generate_series + -> Function Scan on generate_series generate_series_1 +(4 rows) + explain (costs off) select from generate_series(1,5) intersect select from generate_series(1,3); QUERY PLAN @@ -966,6 +972,10 @@ select from generate_series(1,5) intersect select from generate_series(1,3); -> Function Scan on generate_series generate_series_1 (6 rows) +select from generate_series(1,5) union select from generate_series(1,3); +-- +(1 row) + select from generate_series(1,5) union all select from generate_series(1,3); -- (8 rows) @@ -1035,20 +1045,6 @@ select from generate_series(1,5) except all select from generate_series(1,3); -- (2 rows) --- Try a variation of the above but with a CTE which contains a column, again --- with an empty final select list. --- Ensure we get the expected 1 row with 0 columns -with cte as materialized (select s from generate_series(1,5) s) -select from cte union select from cte; --- -(1 row) - --- Ensure we get the same result as the above. -with cte as not materialized (select s from generate_series(1,5) s) -select from cte union select from cte; --- -(1 row) - reset enable_hashagg; reset enable_sort; -- @@ -1085,7 +1081,6 @@ INSERT INTO t2 VALUES ('ab'), ('xy'); set enable_seqscan = off; set enable_indexscan = on; set enable_bitmapscan = off; -set enable_sort = off; explain (costs off) SELECT * FROM (SELECT a || b AS ab FROM t1 @@ -1167,7 +1162,6 @@ explain (costs off) reset enable_seqscan; reset enable_indexscan; reset enable_bitmapscan; -reset enable_sort; -- This simpler variant of the above test has been observed to fail differently create table events (event_id int primary key); create table other_events (event_id int primary key); |
