summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/aggregates.out9
-rw-r--r--src/test/regress/expected/join.out39
2 files changed, 22 insertions, 26 deletions
diff --git a/src/test/regress/expected/aggregates.out b/src/test/regress/expected/aggregates.out
index e434c5d8cd0..601bdb405aa 100644
--- a/src/test/regress/expected/aggregates.out
+++ b/src/test/regress/expected/aggregates.out
@@ -806,8 +806,7 @@ explain (costs off)
select distinct min(f1), max(f1) from minmaxtest;
QUERY PLAN
----------------------------------------------------------------------------------------------
- HashAggregate
- Group Key: $0, $1
+ Unique
InitPlan 1 (returns $0)
-> Limit
-> Merge Append
@@ -832,8 +831,10 @@ explain (costs off)
Index Cond: (f1 IS NOT NULL)
-> Index Only Scan Backward using minmaxtest3i on minmaxtest3 minmaxtest3_1
Index Cond: (f1 IS NOT NULL)
- -> Result
-(27 rows)
+ -> Sort
+ Sort Key: ($0), ($1)
+ -> Result
+(28 rows)
select distinct min(f1), max(f1) from minmaxtest;
min | max
diff --git a/src/test/regress/expected/join.out b/src/test/regress/expected/join.out
index 59d7877b57d..cafbc5e54d2 100644
--- a/src/test/regress/expected/join.out
+++ b/src/test/regress/expected/join.out
@@ -3949,39 +3949,34 @@ select d.* from d left join (select distinct * from b) s
explain (costs off)
select d.* from d left join (select * from b group by b.id, b.c_id) s
on d.a = s.id;
- QUERY PLAN
----------------------------------------
- Merge Left Join
- Merge Cond: (d.a = s.id)
+ QUERY PLAN
+------------------------------------------
+ Merge Right Join
+ Merge Cond: (b.id = d.a)
+ -> Group
+ Group Key: b.id
+ -> Index Scan using b_pkey on b
-> Sort
Sort Key: d.a
-> Seq Scan on d
- -> Sort
- Sort Key: s.id
- -> Subquery Scan on s
- -> HashAggregate
- Group Key: b.id
- -> Seq Scan on b
-(11 rows)
+(8 rows)
-- similarly, but keying off a DISTINCT clause
explain (costs off)
select d.* from d left join (select distinct * from b) s
on d.a = s.id;
- QUERY PLAN
----------------------------------------------
- Merge Left Join
- Merge Cond: (d.a = s.id)
+ QUERY PLAN
+--------------------------------------
+ Merge Right Join
+ Merge Cond: (b.id = d.a)
+ -> Unique
+ -> Sort
+ Sort Key: b.id, b.c_id
+ -> Seq Scan on b
-> Sort
Sort Key: d.a
-> Seq Scan on d
- -> Sort
- Sort Key: s.id
- -> Subquery Scan on s
- -> HashAggregate
- Group Key: b.id, b.c_id
- -> Seq Scan on b
-(11 rows)
+(9 rows)
-- check join removal works when uniqueness of the join condition is enforced
-- by a UNION