OSDN Git Service

Support PostgreSQL 13.
[pghintplan/pg_hint_plan.git] / expected / ut-R.out
index 270c29c..eed3fe3 100644 (file)
@@ -9,13 +9,12 @@ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-1-1 specified pattern of the object name
@@ -35,13 +34,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-1-1-2
 \o results/ut-R.tmpout
@@ -58,13 +56,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                   QUERY PLAN                                   
 -------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t_1.c1 = t_2.c1)
-   ->  Index Scan using t1_i1 on t1 t_1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1 t_1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t_2.c1
-         ->  Seq Scan on t2 t_2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2 t_2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-1-1-3
 \o results/ut-R.tmpout
@@ -81,13 +78,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                   QUERY PLAN                                   
 -------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t_1.c1 = t_2.c1)
-   ->  Index Scan using t1_i1 on t1 t_1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1 t_1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t_2.c1
-         ->  Seq Scan on t2 t_2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2 t_2  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-1-2 specified schema name in the hint option
@@ -107,13 +103,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-1-2-2
 \o results/ut-R.tmpout
@@ -130,13 +125,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-1-3 table doesn't exist in the hint option
@@ -156,13 +150,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-1-3-2
 \o results/ut-R.tmpout
@@ -179,13 +172,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-1-4 conflict table name
@@ -205,13 +197,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-1-4-2
 \o results/ut-R.tmpout
@@ -220,13 +211,12 @@ EXPLAIN SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t1_1.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t1_1.c1
-         ->  Seq Scan on t1 t1_1  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t1 t1_1  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t1 #1)*/
@@ -244,13 +234,12 @@ Rows(t1 t1 #1)
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t1_1.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t1_1.c1
-         ->  Seq Scan on t1 t1_1  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t1 t1_1  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(s1.t1 s2.t1 #1)*/
@@ -266,13 +255,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t1_1.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t1_1.c1
-         ->  Seq Scan on t1 t1_1  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t1 t1_1  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 EXPLAIN SELECT * FROM s1.t1, s2.t1 s2t1 WHERE s1.t1.c1 = s2t1.c1;
@@ -280,13 +268,12 @@ EXPLAIN SELECT * FROM s1.t1, s2.t1 s2t1 WHERE s1.t1.c1 = s2t1.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = s2t1.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: s2t1.c1
-         ->  Seq Scan on t1 s2t1  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t1 s2t1  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 s2t1 #1)*/
@@ -302,13 +289,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = s2t1.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: s2t1.c1
-         ->  Seq Scan on t1 s2t1  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t1 s2t1  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-1-4-3
 \o results/ut-R.tmpout
@@ -317,21 +303,20 @@ EXPLAIN SELECT *, (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) FROM
 \! sql/maskout.sh results/ut-R.tmpout
                                             QUERY PLAN                                            
 --------------------------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
    InitPlan 1 (returns $0)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Merge Join  (cost=xxx rows=100 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
                  Merge Cond: (t1_1.c1 = t2_1.c1)
-                 ->  Index Only Scan using t1_i1 on t1 t1_1  (cost=xxx rows=1000 width=xxx)
-                 ->  Sort  (cost=xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 t1_1  (cost=xxx..xxx rows=1000 width=xxx)
+                 ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                        Sort Key: t2_1.c1
-                       ->  Seq Scan on t2 t2_1  (cost=xxx rows=100 width=xxx)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+                       ->  Seq Scan on t2 t2_1  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(15 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)*/
@@ -347,21 +332,20 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                             QUERY PLAN                                            
 --------------------------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
    InitPlan 1 (returns $0)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Merge Join  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                  Merge Cond: (t1_1.c1 = t2_1.c1)
-                 ->  Index Only Scan using t1_i1 on t1 t1_1  (cost=xxx rows=1000 width=xxx)
-                 ->  Sort  (cost=xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 t1_1  (cost=xxx..xxx rows=1000 width=xxx)
+                 ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                        Sort Key: t2_1.c1
-                       ->  Seq Scan on t2 t2_1  (cost=xxx rows=100 width=xxx)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+                       ->  Seq Scan on t2 t2_1  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(15 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(st1 st2 #1)Rows(t1 t2 #1)*/
@@ -378,21 +362,20 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                            QUERY PLAN                                            
 -------------------------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
    InitPlan 1 (returns $0)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Merge Join  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                  Merge Cond: (st1.c1 = st2.c1)
-                 ->  Index Only Scan using t1_i1 on t1 st1  (cost=xxx rows=1000 width=xxx)
-                 ->  Sort  (cost=xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 st1  (cost=xxx..xxx rows=1000 width=xxx)
+                 ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                        Sort Key: st2.c1
-                       ->  Seq Scan on t2 st2  (cost=xxx rows=100 width=xxx)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+                       ->  Seq Scan on t2 st2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(15 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-1-5 conflict table name
@@ -412,13 +395,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-1-5-2
 \o results/ut-R.tmpout
@@ -437,13 +419,12 @@ Rows(t1 t1 #1)
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-1-5-3
 \o results/ut-R.tmpout
@@ -455,13 +436,12 @@ DETAIL:  Unrecognized hint keyword "".
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 EXPLAIN SELECT * FROM s1.t1, s1.t2, s1.t3 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
@@ -469,16 +449,15 @@ EXPLAIN SELECT * FROM s1.t1, s1.t2, s1.t3 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                                    QUERY PLAN                                    
 ---------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Merge Join  (cost=xxx rows=1000 width=xxx)
+   ->  Merge Join  (cost=xxx..xxx rows=1000 width=xxx)
          Merge Cond: (t1.c1 = t3.c1)
-         ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-         ->  Index Scan using t3_i1 on t3  (cost=xxx rows=1100 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+         ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+         ->  Index Scan using t3_i1 on t3  (cost=xxx..xxx rows=1130 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(10 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+(t1 t2 t1 t2)*/
@@ -489,20 +468,18 @@ DETAIL:  Unrecognized hint keyword "".
 \! sql/maskout.sh results/ut-R.tmpout
                                       QUERY PLAN                                       
 ---------------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=100 width=xxx)
-   Join Filter: (t1.c1 = t4.c1)
-   ->  Merge Join  (cost=xxx rows=100 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
          Merge Cond: (t1.c1 = t2.c1)
-         ->  Merge Join  (cost=xxx rows=1000 width=xxx)
+         ->  Merge Join  (cost=xxx..xxx rows=1000 width=xxx)
                Merge Cond: (t1.c1 = t3.c1)
-               ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-               ->  Index Scan using t3_i1 on t3  (cost=xxx rows=1100 width=xxx)
-         ->  Sort  (cost=xxx rows=100 width=xxx)
+               ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+               ->  Index Scan using t3_i1 on t3  (cost=xxx..xxx rows=1130 width=xxx)
+         ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                Sort Key: t2.c1
-               ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-   ->  Index Scan using t4_i1 on t4  (cost=xxx rows=1 width=xxx)
-         Index Cond: (c1 = t3.c1)
-(14 rows)
+               ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Index Scan using t4_i1 on t4  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = t1.c1)
 
 ----
 ---- No. R-1-6 object type for the hint
@@ -522,13 +499,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-1-6-2
 \o results/ut-R.tmpout
@@ -537,20 +513,19 @@ EXPLAIN SELECT * FROM s1.p1 t1, s1.p1 t2 WHERE t1.c1 = t2.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                                   QUERY PLAN                                  
 ------------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=301 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=301 width=xxx)
    Hash Cond: (t1.c1 = t2.c1)
-   ->  Append  (cost=xxx rows=301 width=xxx)
-         ->  Seq Scan on p1 t1  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p1c1 t1_1  (cost=xxx rows=100 width=xxx)
-         ->  Seq Scan on p1c2 t1_2  (cost=xxx rows=100 width=xxx)
-         ->  Seq Scan on p1c3 t1_3  (cost=xxx rows=100 width=xxx)
-   ->  Hash  (cost=xxx rows=301 width=xxx)
-         ->  Append  (cost=xxx rows=301 width=xxx)
-               ->  Seq Scan on p1 t2  (cost=xxx rows=1 width=xxx)
-               ->  Seq Scan on p1c1 t2_1  (cost=xxx rows=100 width=xxx)
-               ->  Seq Scan on p1c2 t2_2  (cost=xxx rows=100 width=xxx)
-               ->  Seq Scan on p1c3 t2_3  (cost=xxx rows=100 width=xxx)
-(14 rows)
+   ->  Append  (cost=xxx..xxx rows=301 width=xxx)
+         ->  Seq Scan on p1 t1_1  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p1c1 t1_2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Seq Scan on p1c2 t1_3  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Seq Scan on p1c3 t1_4  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=301 width=xxx)
+         ->  Append  (cost=xxx..xxx rows=301 width=xxx)
+               ->  Seq Scan on p1 t2_1  (cost=xxx..xxx rows=1 width=xxx)
+               ->  Seq Scan on p1c1 t2_2  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Seq Scan on p1c2 t2_3  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Seq Scan on p1c3 t2_4  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)*/
@@ -566,20 +541,19 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                   QUERY PLAN                                  
 ------------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1 width=xxx)
    Hash Cond: (t1.c1 = t2.c1)
-   ->  Append  (cost=xxx rows=301 width=xxx)
-         ->  Seq Scan on p1 t1  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p1c1 t1_1  (cost=xxx rows=100 width=xxx)
-         ->  Seq Scan on p1c2 t1_2  (cost=xxx rows=100 width=xxx)
-         ->  Seq Scan on p1c3 t1_3  (cost=xxx rows=100 width=xxx)
-   ->  Hash  (cost=xxx rows=301 width=xxx)
-         ->  Append  (cost=xxx rows=301 width=xxx)
-               ->  Seq Scan on p1 t2  (cost=xxx rows=1 width=xxx)
-               ->  Seq Scan on p1c1 t2_1  (cost=xxx rows=100 width=xxx)
-               ->  Seq Scan on p1c2 t2_2  (cost=xxx rows=100 width=xxx)
-               ->  Seq Scan on p1c3 t2_3  (cost=xxx rows=100 width=xxx)
-(14 rows)
+   ->  Append  (cost=xxx..xxx rows=301 width=xxx)
+         ->  Seq Scan on p1 t1_1  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p1c1 t1_2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Seq Scan on p1c2 t1_3  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Seq Scan on p1c3 t1_4  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=301 width=xxx)
+         ->  Append  (cost=xxx..xxx rows=301 width=xxx)
+               ->  Seq Scan on p1 t2_1  (cost=xxx..xxx rows=1 width=xxx)
+               ->  Seq Scan on p1c1 t2_2  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Seq Scan on p1c2 t2_3  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Seq Scan on p1c3 t2_4  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-1-6-3
 \o results/ut-R.tmpout
@@ -588,12 +562,11 @@ EXPLAIN SELECT * FROM s1.ul1 t1, s1.ul1 t2 WHERE t1.c1 = t2.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                               QUERY PLAN                               
 -----------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1100 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1130 width=xxx)
    Hash Cond: (t1.c1 = t2.c1)
-   ->  Seq Scan on ul1 t1  (cost=xxx rows=1100 width=xxx)
-   ->  Hash  (cost=xxx rows=1100 width=xxx)
-         ->  Seq Scan on ul1 t2  (cost=xxx rows=1100 width=xxx)
-(6 rows)
+   ->  Seq Scan on ul1 t1  (cost=xxx..xxx rows=1130 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+         ->  Seq Scan on ul1 t2  (cost=xxx..xxx rows=1130 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)*/
@@ -609,12 +582,11 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                               QUERY PLAN                               
 -----------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1 width=xxx)
    Hash Cond: (t1.c1 = t2.c1)
-   ->  Seq Scan on ul1 t1  (cost=xxx rows=1100 width=xxx)
-   ->  Hash  (cost=xxx rows=1100 width=xxx)
-         ->  Seq Scan on ul1 t2  (cost=xxx rows=1100 width=xxx)
-(6 rows)
+   ->  Seq Scan on ul1 t1  (cost=xxx..xxx rows=1130 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+         ->  Seq Scan on ul1 t2  (cost=xxx..xxx rows=1130 width=xxx)
 
 -- No. R-1-6-4
 CREATE TEMP TABLE tm1 (LIKE s1.t1 INCLUDING ALL);
@@ -624,12 +596,11 @@ EXPLAIN SELECT * FROM tm1 t1, tm1 t2 WHERE t1.c1 = t2.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                               QUERY PLAN                               
 -----------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1100 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1130 width=xxx)
    Hash Cond: (t1.c1 = t2.c1)
-   ->  Seq Scan on tm1 t1  (cost=xxx rows=1100 width=xxx)
-   ->  Hash  (cost=xxx rows=1100 width=xxx)
-         ->  Seq Scan on tm1 t2  (cost=xxx rows=1100 width=xxx)
-(6 rows)
+   ->  Seq Scan on tm1 t1  (cost=xxx..xxx rows=1130 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+         ->  Seq Scan on tm1 t2  (cost=xxx..xxx rows=1130 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)*/
@@ -645,27 +616,25 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                               QUERY PLAN                               
 -----------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1 width=xxx)
    Hash Cond: (t1.c1 = t2.c1)
-   ->  Seq Scan on tm1 t1  (cost=xxx rows=1100 width=xxx)
-   ->  Hash  (cost=xxx rows=1100 width=xxx)
-         ->  Seq Scan on tm1 t2  (cost=xxx rows=1100 width=xxx)
-(6 rows)
+   ->  Seq Scan on tm1 t1  (cost=xxx..xxx rows=1130 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+         ->  Seq Scan on tm1 t2  (cost=xxx..xxx rows=1130 width=xxx)
 
 -- No. R-1-6-5
-CREATE TEMP TABLE t_pg_class WITH OIDS AS SELECT * from pg_class LIMIT 100;
+CREATE TEMP TABLE t_pg_class AS SELECT * from pg_class LIMIT 100;
 \o results/ut-R.tmpout
 EXPLAIN SELECT * FROM t_pg_class t1, t_pg_class t2 WHERE t1.oid = t2.oid;
 \o
 \! sql/maskout.sh results/ut-R.tmpout
                                   QUERY PLAN                                  
 ------------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=360 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=450 width=xxx)
    Hash Cond: (t1.oid = t2.oid)
-   ->  Seq Scan on t_pg_class t1  (cost=xxx rows=360 width=xxx)
-   ->  Hash  (cost=xxx rows=360 width=xxx)
-         ->  Seq Scan on t_pg_class t2  (cost=xxx rows=360 width=xxx)
-(6 rows)
+   ->  Seq Scan on t_pg_class t1  (cost=xxx..xxx rows=300 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=300 width=xxx)
+         ->  Seq Scan on t_pg_class t2  (cost=xxx..xxx rows=300 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)*/
@@ -681,12 +650,11 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                   QUERY PLAN                                  
 ------------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1 width=xxx)
    Hash Cond: (t1.oid = t2.oid)
-   ->  Seq Scan on t_pg_class t1  (cost=xxx rows=360 width=xxx)
-   ->  Hash  (cost=xxx rows=360 width=xxx)
-         ->  Seq Scan on t_pg_class t2  (cost=xxx rows=360 width=xxx)
-(6 rows)
+   ->  Seq Scan on t_pg_class t1  (cost=xxx..xxx rows=300 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=300 width=xxx)
+         ->  Seq Scan on t_pg_class t2  (cost=xxx..xxx rows=300 width=xxx)
 
 -- No. R-1-6-6
 -- refer ut-fdw.sql
@@ -697,11 +665,10 @@ EXPLAIN SELECT * FROM s1.f1() t1, s1.f1() t2 WHERE t1.c1 = t2.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                            QUERY PLAN                            
 -----------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
    Join Filter: (t1.c1 = t2.c1)
-   ->  Function Scan on f1 t1  (cost=xxx rows=1 width=xxx)
-   ->  Function Scan on f1 t2  (cost=xxx rows=1 width=xxx)
-(5 rows)
+   ->  Function Scan on f1 t1  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Function Scan on f1 t2  (cost=xxx..xxx rows=1 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)*/
@@ -717,11 +684,10 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                            QUERY PLAN                            
 -----------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
    Join Filter: (t1.c1 = t2.c1)
-   ->  Function Scan on f1 t1  (cost=xxx rows=1 width=xxx)
-   ->  Function Scan on f1 t2  (cost=xxx rows=1 width=xxx)
-(5 rows)
+   ->  Function Scan on f1 t1  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Function Scan on f1 t2  (cost=xxx..xxx rows=1 width=xxx)
 
 -- No. R-1-6-8
 \o results/ut-R.tmpout
@@ -730,12 +696,11 @@ EXPLAIN SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS t1 (c1, c
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                
 --------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=3 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=3 width=xxx)
    Hash Cond: (t2.c1 = "*VALUES*".column1)
-   ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-   ->  Hash  (cost=xxx rows=3 width=xxx)
-         ->  Values Scan on "*VALUES*"  (cost=xxx rows=3 width=xxx)
-(6 rows)
+   ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=3 width=xxx)
+         ->  Values Scan on "*VALUES*"  (cost=xxx..xxx rows=3 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)*/
@@ -751,12 +716,11 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                
 --------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=3 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=3 width=xxx)
    Hash Cond: (t2.c1 = "*VALUES*".column1)
-   ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-   ->  Hash  (cost=xxx rows=3 width=xxx)
-         ->  Values Scan on "*VALUES*"  (cost=xxx rows=3 width=xxx)
-(6 rows)
+   ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=3 width=xxx)
+         ->  Values Scan on "*VALUES*"  (cost=xxx..xxx rows=3 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(*VALUES* t2 #1)*/
@@ -772,33 +736,29 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                
 --------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1 width=xxx)
    Hash Cond: (t2.c1 = "*VALUES*".column1)
-   ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-   ->  Hash  (cost=xxx rows=3 width=xxx)
-         ->  Values Scan on "*VALUES*"  (cost=xxx rows=3 width=xxx)
-(6 rows)
+   ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=3 width=xxx)
+         ->  Values Scan on "*VALUES*"  (cost=xxx..xxx rows=3 width=xxx)
 
 -- No. R-1-6-9
 \o results/ut-R.tmpout
 EXPLAIN WITH c1(c1) AS (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) SELECT * FROM s1.t1, c1 WHERE t1.c1 = c1.c1;
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                                            QUERY PLAN                                            
---------------------------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
-   CTE c1
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Merge Join  (cost=xxx rows=100 width=xxx)
-                 Merge Cond: (t1_1.c1 = t2.c1)
-                 ->  Index Only Scan using t1_i1 on t1 t1_1  (cost=xxx rows=1000 width=xxx)
-                 ->  Sort  (cost=xxx rows=100 width=xxx)
-                       Sort Key: t2.c1
-                       ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-   ->  CTE Scan on c1  (cost=xxx rows=1 width=xxx)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
-         Index Cond: (c1 = c1.c1)
-(13 rows)
+                                           QUERY PLAN                                           
+------------------------------------------------------------------------------------------------
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
+               Merge Cond: (t1_1.c1 = t2.c1)
+               ->  Index Only Scan using t1_i1 on t1 t1_1  (cost=xxx..xxx rows=1000 width=xxx)
+               ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
+                     Sort Key: t2.c1
+                     ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = (max(t1_1.c1)))
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)Rows(t1 c1 +1)*/
@@ -813,21 +773,18 @@ error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                                            QUERY PLAN                                            
---------------------------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=2 width=xxx)
-   CTE c1
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                 Merge Cond: (t1_1.c1 = t2.c1)
-                 ->  Index Only Scan using t1_i1 on t1 t1_1  (cost=xxx rows=1000 width=xxx)
-                 ->  Sort  (cost=xxx rows=100 width=xxx)
-                       Sort Key: t2.c1
-                       ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-   ->  CTE Scan on c1  (cost=xxx rows=1 width=xxx)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
-         Index Cond: (c1 = c1.c1)
-(13 rows)
+                                           QUERY PLAN                                           
+------------------------------------------------------------------------------------------------
+ Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+   ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+               Merge Cond: (t1_1.c1 = t2.c1)
+               ->  Index Only Scan using t1_i1 on t1 t1_1  (cost=xxx..xxx rows=1000 width=xxx)
+               ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
+                     Sort Key: t2.c1
+                     ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = (max(t1_1.c1)))
 
 -- No. R-1-6-10
 \o results/ut-R.tmpout
@@ -836,12 +793,11 @@ EXPLAIN SELECT * FROM s1.v1 t1, s1.v1 t2 WHERE t1.c1 = t2.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                
 --------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1000 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1000 width=xxx)
    Hash Cond: (v1t1.c1 = v1t1_1.c1)
-   ->  Seq Scan on t1 v1t1  (cost=xxx rows=1000 width=xxx)
-   ->  Hash  (cost=xxx rows=1000 width=xxx)
-         ->  Seq Scan on t1 v1t1_1  (cost=xxx rows=1000 width=xxx)
-(6 rows)
+   ->  Seq Scan on t1 v1t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+         ->  Seq Scan on t1 v1t1_1  (cost=xxx..xxx rows=1000 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)*/
@@ -857,12 +813,11 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                
 --------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1000 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1000 width=xxx)
    Hash Cond: (v1t1.c1 = v1t1_1.c1)
-   ->  Seq Scan on t1 v1t1  (cost=xxx rows=1000 width=xxx)
-   ->  Hash  (cost=xxx rows=1000 width=xxx)
-         ->  Seq Scan on t1 v1t1_1  (cost=xxx rows=1000 width=xxx)
-(6 rows)
+   ->  Seq Scan on t1 v1t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+         ->  Seq Scan on t1 v1t1_1  (cost=xxx..xxx rows=1000 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(v1t1 v1t1_ #1)*/
@@ -878,12 +833,11 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                QUERY PLAN                                
 -------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1 width=xxx)
    Hash Cond: (v1t1.c1 = v1t1_.c1)
-   ->  Seq Scan on t1 v1t1  (cost=xxx rows=1000 width=xxx)
-   ->  Hash  (cost=xxx rows=1000 width=xxx)
-         ->  Seq Scan on t1 v1t1_  (cost=xxx rows=1000 width=xxx)
-(6 rows)
+   ->  Seq Scan on t1 v1t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+         ->  Seq Scan on t1 v1t1_  (cost=xxx..xxx rows=1000 width=xxx)
 
 -- No. R-1-6-11
 \o results/ut-R.tmpout
@@ -892,20 +846,19 @@ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1 AND t1.c1 = (SELECT max(s
 \! sql/maskout.sh results/ut-R.tmpout
                                            QUERY PLAN                                            
 -------------------------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
    InitPlan 1 (returns $0)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Merge Join  (cost=xxx rows=100 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
                  Merge Cond: (st1.c1 = st2.c1)
-                 ->  Index Only Scan using t1_i1 on t1 st1  (cost=xxx rows=1000 width=xxx)
-                 ->  Sort  (cost=xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 st1  (cost=xxx..xxx rows=1000 width=xxx)
+                 ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                        Sort Key: st2.c1
-                       ->  Seq Scan on t2 st2  (cost=xxx rows=100 width=xxx)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
+                       ->  Seq Scan on t2 st2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
          Index Cond: (c1 = $0)
-   ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+   ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
          Filter: (c1 = $0)
-(14 rows)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)Rows(st1 st2 #1)*/
@@ -922,20 +875,19 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                            QUERY PLAN                                            
 -------------------------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
    InitPlan 1 (returns $0)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Merge Join  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                  Merge Cond: (st1.c1 = st2.c1)
-                 ->  Index Only Scan using t1_i1 on t1 st1  (cost=xxx rows=1000 width=xxx)
-                 ->  Sort  (cost=xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 st1  (cost=xxx..xxx rows=1000 width=xxx)
+                 ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                        Sort Key: st2.c1
-                       ->  Seq Scan on t2 st2  (cost=xxx rows=100 width=xxx)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
+                       ->  Seq Scan on t2 st2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
          Index Cond: (c1 = $0)
-   ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+   ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
          Filter: (c1 = $0)
-(14 rows)
 
 --
 -- There are cases where difference in the measured value and predicted value
@@ -947,13 +899,12 @@ EXPLAIN SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 st2 #1)*/
@@ -969,13 +920,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)*/
@@ -991,13 +941,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-1-7 specified number of conditions
@@ -1019,13 +968,12 @@ Rows(t1 #1)
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-1-7-2
 \o results/ut-R.tmpout
@@ -1044,13 +992,12 @@ Rows(t1 t2 1)
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-1-7-3
 \o results/ut-R.tmpout
@@ -1069,13 +1016,12 @@ Rows(t1 t2 #notrows)
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-2-1 some complexity query blocks
@@ -1120,51 +1066,49 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                                      QUERY PLAN                                                     
 --------------------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
    InitPlan 1 (returns $1)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
                  Join Filter: (b1t2.c1 = b1t1.c1)
-                 ->  Hash Join  (cost=xxx rows=100 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                        Hash Cond: (b1t4.c1 = b1t2.c1)
-                       ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=100 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=100 width=xxx)
+                       ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                             ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
                                    Merge Cond: (b1t3.c1 = b1t2.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Sort  (cost=xxx rows=100 width=xxx)
+                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                          Sort Key: b1t2.c1
-                                         ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                                         ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b1t3.c1)
    InitPlan 2 (returns $3)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                 ->  Hash Join  (cost=xxx rows=1000 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1000 width=xxx)
                        Hash Cond: (b2t3.c1 = b2t1.c1)
-                       ->  Merge Join  (cost=xxx rows=1100 width=xxx)
+                       ->  Merge Join  (cost=xxx..xxx rows=1130 width=xxx)
                              Merge Cond: (b2t3.c1 = b2t4.c1)
-                             ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                             ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=1000 width=xxx)
-                             ->  Seq Scan on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                             ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                             ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+                             ->  Seq Scan on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b2t1.c1)
-   ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-         Join Filter: (bmt1.c1 = bmt4.c1)
-         ->  Hash Join  (cost=xxx rows=100 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                Hash Cond: (bmt3.c1 = bmt1.c1)
-               ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=100 width=xxx)
-                     ->  Merge Join  (cost=xxx rows=100 width=xxx)
+               ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                     ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
                            Merge Cond: (bmt1.c1 = bmt2.c1)
-                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-                           ->  Sort  (cost=xxx rows=100 width=xxx)
+                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+                           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                  Sort Key: bmt2.c1
-                                 ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = bmt3.c1)
-(45 rows)
+                                 ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = bmt1.c1)
 
 \o results/ut-R.tmpout
 /*+
@@ -1216,51 +1160,49 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                                      QUERY PLAN                                                     
 --------------------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
    InitPlan 1 (returns $1)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                  Join Filter: (b1t2.c1 = b1t1.c1)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                        Hash Cond: (b1t4.c1 = b1t2.c1)
-                       ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                       ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                             ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                                    Merge Cond: (b1t3.c1 = b1t2.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Sort  (cost=xxx rows=100 width=xxx)
+                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                          Sort Key: b1t2.c1
-                                         ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                                         ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b1t3.c1)
    InitPlan 2 (returns $3)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                        Hash Cond: (b2t1.c1 = b2t3.c1)
-                       ->  Seq Scan on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                       ->  Seq Scan on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                             ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                                    Merge Cond: (b2t3.c1 = b2t4.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                                   ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b2t1.c1)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-         Join Filter: (bmt1.c1 = bmt4.c1)
-         ->  Hash Join  (cost=xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                Hash Cond: (bmt3.c1 = bmt1.c1)
-               ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=1 width=xxx)
-                     ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                     ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                            Merge Cond: (bmt1.c1 = bmt2.c1)
-                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-                           ->  Sort  (cost=xxx rows=100 width=xxx)
+                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+                           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                  Sort Key: bmt2.c1
-                                 ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = bmt3.c1)
-(45 rows)
+                                 ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = bmt1.c1)
 
 -- No. R-2-1-2
 \o results/ut-R.tmpout
@@ -1310,65 +1252,62 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                                      QUERY PLAN                                                     
 --------------------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
    InitPlan 1 (returns $1)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
                  Join Filter: (b1t2.c1 = b1t1.c1)
-                 ->  Hash Join  (cost=xxx rows=100 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                        Hash Cond: (b1t4.c1 = b1t2.c1)
-                       ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=100 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=100 width=xxx)
+                       ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                             ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
                                    Merge Cond: (b1t3.c1 = b1t2.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Sort  (cost=xxx rows=100 width=xxx)
+                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                          Sort Key: b1t2.c1
-                                         ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                                         ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b1t3.c1)
    InitPlan 2 (returns $3)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                 ->  Hash Join  (cost=xxx rows=1000 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1000 width=xxx)
                        Hash Cond: (b2t3.c1 = b2t1.c1)
-                       ->  Merge Join  (cost=xxx rows=1100 width=xxx)
+                       ->  Merge Join  (cost=xxx..xxx rows=1130 width=xxx)
                              Merge Cond: (b2t3.c1 = b2t4.c1)
-                             ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                             ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=1000 width=xxx)
-                             ->  Seq Scan on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                             ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                             ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+                             ->  Seq Scan on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b2t1.c1)
    InitPlan 3 (returns $5)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                 Join Filter: (b3t1.c1 = b3t3.c1)
-                 ->  Hash Join  (cost=xxx rows=100 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                        Hash Cond: (b3t1.c1 = b3t2.c1)
-                       ->  Merge Join  (cost=xxx rows=1000 width=xxx)
+                       ->  Merge Join  (cost=xxx..xxx rows=1000 width=xxx)
                              Merge Cond: (b3t1.c1 = b3t4.c1)
-                             ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1000 width=xxx)
-                             ->  Index Only Scan using t4_i1 on t4 b3t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=100 width=xxx)
-                             ->  Seq Scan on t2 b3t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t3_i1 on t3 b3t3  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b3t4.c1)
-   ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-         Join Filter: (bmt1.c1 = bmt4.c1)
-         ->  Hash Join  (cost=xxx rows=100 width=xxx)
+                             ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1000 width=xxx)
+                             ->  Index Only Scan using t4_i1 on t4 b3t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                             ->  Seq Scan on t2 b3t2  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t3_i1 on t3 b3t3  (cost=xxx..xxx rows=1 width=xxx)
+                       Index Cond: (c1 = b3t1.c1)
+   ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                Hash Cond: (bmt3.c1 = bmt1.c1)
-               ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=100 width=xxx)
-                     ->  Merge Join  (cost=xxx rows=100 width=xxx)
+               ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                     ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
                            Merge Cond: (bmt1.c1 = bmt2.c1)
-                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-                           ->  Sort  (cost=xxx rows=100 width=xxx)
+                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+                           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                  Sort Key: bmt2.c1
-                                 ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = bmt3.c1)
-(59 rows)
+                                 ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = bmt1.c1)
 
 \o results/ut-R.tmpout
 /*+
@@ -1433,65 +1372,62 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                                      QUERY PLAN                                                     
 --------------------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
    InitPlan 1 (returns $1)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                  Join Filter: (b1t2.c1 = b1t1.c1)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                        Hash Cond: (b1t4.c1 = b1t2.c1)
-                       ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                       ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                             ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                                    Merge Cond: (b1t3.c1 = b1t2.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Sort  (cost=xxx rows=100 width=xxx)
+                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                          Sort Key: b1t2.c1
-                                         ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                                         ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b1t3.c1)
    InitPlan 2 (returns $3)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                        Hash Cond: (b2t1.c1 = b2t3.c1)
-                       ->  Seq Scan on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                       ->  Seq Scan on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                             ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                                    Merge Cond: (b2t3.c1 = b2t4.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                                   ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b2t1.c1)
    InitPlan 3 (returns $5)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                 Join Filter: (b3t1.c1 = b3t3.c1)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                        Hash Cond: (b3t1.c1 = b3t2.c1)
-                       ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                       ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                              Merge Cond: (b3t1.c1 = b3t4.c1)
-                             ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1000 width=xxx)
-                             ->  Index Only Scan using t4_i1 on t4 b3t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=100 width=xxx)
-                             ->  Seq Scan on t2 b3t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t3_i1 on t3 b3t3  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b3t4.c1)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-         Join Filter: (bmt1.c1 = bmt4.c1)
-         ->  Hash Join  (cost=xxx rows=1 width=xxx)
+                             ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1000 width=xxx)
+                             ->  Index Only Scan using t4_i1 on t4 b3t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                             ->  Seq Scan on t2 b3t2  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t3_i1 on t3 b3t3  (cost=xxx..xxx rows=1 width=xxx)
+                       Index Cond: (c1 = b3t1.c1)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                Hash Cond: (bmt3.c1 = bmt1.c1)
-               ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=1 width=xxx)
-                     ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                     ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                            Merge Cond: (bmt1.c1 = bmt2.c1)
-                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-                           ->  Sort  (cost=xxx rows=100 width=xxx)
+                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+                           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                  Sort Key: bmt2.c1
-                                 ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = bmt3.c1)
-(59 rows)
+                                 ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = bmt1.c1)
 
 -- No. R-2-1-3
 \o results/ut-R.tmpout
@@ -1510,22 +1446,21 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                           QUERY PLAN                                           
 -----------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Merge Join  (cost=xxx rows=100 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
          Merge Cond: (bmt1.c1 = bmt2.c1)
-         ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-         ->  Sort  (cost=xxx rows=100 width=xxx)
+         ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+         ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                Sort Key: bmt2.c1
-               ->  Hash Join  (cost=xxx rows=100 width=xxx)
+               ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                      Hash Cond: (bmt3.c1 = bmt2.c1)
-                     ->  Hash Join  (cost=xxx rows=1100 width=xxx)
+                     ->  Hash Join  (cost=xxx..xxx rows=1130 width=xxx)
                            Hash Cond: (bmt3.c1 = bmt4.c1)
-                           ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                           ->  Hash  (cost=xxx rows=1100 width=xxx)
-                                 ->  Seq Scan on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-                     ->  Hash  (cost=xxx rows=100 width=xxx)
-                           ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-(16 rows)
+                           ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+                           ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                                 ->  Seq Scan on t4 bmt4  (cost=xxx..xxx rows=1130 width=xxx)
+                     ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                           ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+
@@ -1547,20 +1482,19 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                          QUERY PLAN                                         
 --------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (bmt2.c1 = bmt1.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-               ->  Hash Join  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+               ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                      Hash Cond: (bmt3.c1 = bmt4.c1)
-                     ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                     ->  Hash  (cost=xxx rows=1100 width=xxx)
-                           ->  Seq Scan on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-               ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+                     ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                           ->  Seq Scan on t4 bmt4  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx..xxx rows=1 width=xxx)
                      Index Cond: (c1 = bmt3.c1)
-         ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1 width=xxx)
+         ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1 width=xxx)
                Index Cond: (c1 = bmt3.c1)
-(14 rows)
 
 -- No. R-2-1-4
 \o results/ut-R.tmpout
@@ -1579,22 +1513,21 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                           QUERY PLAN                                           
 -----------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Merge Join  (cost=xxx rows=100 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
          Merge Cond: (bmt1.c1 = bmt2.c1)
-         ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-         ->  Sort  (cost=xxx rows=100 width=xxx)
+         ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+         ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                Sort Key: bmt2.c1
-               ->  Hash Join  (cost=xxx rows=100 width=xxx)
+               ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                      Hash Cond: (bmt3.c1 = bmt2.c1)
-                     ->  Hash Join  (cost=xxx rows=1100 width=xxx)
+                     ->  Hash Join  (cost=xxx..xxx rows=1130 width=xxx)
                            Hash Cond: (bmt3.c1 = bmt4.c1)
-                           ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                           ->  Hash  (cost=xxx rows=1100 width=xxx)
-                                 ->  Seq Scan on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-                     ->  Hash  (cost=xxx rows=100 width=xxx)
-                           ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-(16 rows)
+                           ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+                           ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                                 ->  Seq Scan on t4 bmt4  (cost=xxx..xxx rows=1130 width=xxx)
+                     ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                           ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+
@@ -1616,20 +1549,19 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                          QUERY PLAN                                         
 --------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (bmt2.c1 = bmt1.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-               ->  Hash Join  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+               ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                      Hash Cond: (bmt3.c1 = bmt4.c1)
-                     ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                     ->  Hash  (cost=xxx rows=1100 width=xxx)
-                           ->  Seq Scan on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-               ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+                     ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                           ->  Seq Scan on t4 bmt4  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx..xxx rows=1 width=xxx)
                      Index Cond: (c1 = bmt3.c1)
-         ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1 width=xxx)
+         ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1 width=xxx)
                Index Cond: (c1 = bmt3.c1)
-(14 rows)
 
 -- No. R-2-1-5
 \o results/ut-R.tmpout
@@ -1670,52 +1602,50 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                                      QUERY PLAN                                                     
 --------------------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
    InitPlan 1 (returns $1)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
                  Join Filter: (b1t2.c1 = b1t1.c1)
-                 ->  Hash Join  (cost=xxx rows=100 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                        Hash Cond: (b1t4.c1 = b1t2.c1)
-                       ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=100 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=100 width=xxx)
+                       ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                             ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
                                    Merge Cond: (b1t3.c1 = b1t2.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Sort  (cost=xxx rows=100 width=xxx)
+                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                          Sort Key: b1t2.c1
-                                         ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                                         ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b1t3.c1)
    InitPlan 2 (returns $3)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                 ->  Hash Join  (cost=xxx rows=1000 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1000 width=xxx)
                        Hash Cond: (b2t3.c1 = b2t1.c1)
-                       ->  Merge Join  (cost=xxx rows=1100 width=xxx)
+                       ->  Merge Join  (cost=xxx..xxx rows=1130 width=xxx)
                              Merge Cond: (b2t3.c1 = b2t4.c1)
-                             ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                             ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=1000 width=xxx)
-                             ->  Seq Scan on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                             ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                             ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+                             ->  Seq Scan on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b2t1.c1)
-   ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-         Join Filter: (bmt1.c1 = bmt4.c1)
-         ->  Hash Join  (cost=xxx rows=100 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                Hash Cond: (bmt3.c1 = bmt1.c1)
-               ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=100 width=xxx)
-                     ->  Merge Join  (cost=xxx rows=100 width=xxx)
+               ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                     ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
                            Merge Cond: (bmt1.c1 = bmt2.c1)
-                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=998 width=xxx)
+                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=998 width=xxx)
                                  Filter: ((c1 <> $1) AND (c1 <> $3))
-                           ->  Sort  (cost=xxx rows=100 width=xxx)
+                           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                  Sort Key: bmt2.c1
-                                 ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = bmt3.c1)
-(46 rows)
+                                 ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = bmt1.c1)
 
 \o results/ut-R.tmpout
 /*+
@@ -1768,52 +1698,50 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                                      QUERY PLAN                                                     
 --------------------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
    InitPlan 1 (returns $1)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                  Join Filter: (b1t2.c1 = b1t1.c1)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                        Hash Cond: (b1t4.c1 = b1t2.c1)
-                       ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                       ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                             ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                                    Merge Cond: (b1t3.c1 = b1t2.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Sort  (cost=xxx rows=100 width=xxx)
+                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                          Sort Key: b1t2.c1
-                                         ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                                         ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b1t3.c1)
    InitPlan 2 (returns $3)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                        Hash Cond: (b2t1.c1 = b2t3.c1)
-                       ->  Seq Scan on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                       ->  Seq Scan on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                             ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                                    Merge Cond: (b2t3.c1 = b2t4.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                                   ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b2t1.c1)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-         Join Filter: (bmt1.c1 = bmt4.c1)
-         ->  Hash Join  (cost=xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                Hash Cond: (bmt3.c1 = bmt1.c1)
-               ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=1 width=xxx)
-                     ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                     ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                            Merge Cond: (bmt1.c1 = bmt2.c1)
-                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=998 width=xxx)
+                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=998 width=xxx)
                                  Filter: ((c1 <> $1) AND (c1 <> $3))
-                           ->  Sort  (cost=xxx rows=100 width=xxx)
+                           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                  Sort Key: bmt2.c1
-                                 ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = bmt3.c1)
-(46 rows)
+                                 ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = bmt1.c1)
 
 -- No. R-2-1-6
 \o results/ut-R.tmpout
@@ -1863,66 +1791,63 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                                      QUERY PLAN                                                     
 --------------------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
    InitPlan 1 (returns $1)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
                  Join Filter: (b1t2.c1 = b1t1.c1)
-                 ->  Hash Join  (cost=xxx rows=100 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                        Hash Cond: (b1t4.c1 = b1t2.c1)
-                       ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=100 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=100 width=xxx)
+                       ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                             ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
                                    Merge Cond: (b1t3.c1 = b1t2.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Sort  (cost=xxx rows=100 width=xxx)
+                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                          Sort Key: b1t2.c1
-                                         ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                                         ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b1t3.c1)
    InitPlan 2 (returns $3)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                 ->  Hash Join  (cost=xxx rows=1000 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1000 width=xxx)
                        Hash Cond: (b2t3.c1 = b2t1.c1)
-                       ->  Merge Join  (cost=xxx rows=1100 width=xxx)
+                       ->  Merge Join  (cost=xxx..xxx rows=1130 width=xxx)
                              Merge Cond: (b2t3.c1 = b2t4.c1)
-                             ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                             ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=1000 width=xxx)
-                             ->  Seq Scan on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                             ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                             ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+                             ->  Seq Scan on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b2t1.c1)
    InitPlan 3 (returns $5)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                 Join Filter: (b3t1.c1 = b3t3.c1)
-                 ->  Hash Join  (cost=xxx rows=100 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                        Hash Cond: (b3t1.c1 = b3t2.c1)
-                       ->  Merge Join  (cost=xxx rows=1000 width=xxx)
+                       ->  Merge Join  (cost=xxx..xxx rows=1000 width=xxx)
                              Merge Cond: (b3t1.c1 = b3t4.c1)
-                             ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1000 width=xxx)
-                             ->  Index Only Scan using t4_i1 on t4 b3t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=100 width=xxx)
-                             ->  Seq Scan on t2 b3t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t3_i1 on t3 b3t3  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b3t4.c1)
-   ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-         Join Filter: (bmt1.c1 = bmt4.c1)
-         ->  Hash Join  (cost=xxx rows=100 width=xxx)
+                             ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1000 width=xxx)
+                             ->  Index Only Scan using t4_i1 on t4 b3t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                             ->  Seq Scan on t2 b3t2  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t3_i1 on t3 b3t3  (cost=xxx..xxx rows=1 width=xxx)
+                       Index Cond: (c1 = b3t1.c1)
+   ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                Hash Cond: (bmt3.c1 = bmt1.c1)
-               ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=100 width=xxx)
-                     ->  Merge Join  (cost=xxx rows=100 width=xxx)
+               ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                     ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
                            Merge Cond: (bmt1.c1 = bmt2.c1)
-                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=997 width=xxx)
+                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=997 width=xxx)
                                  Filter: ((c1 <> $1) AND (c1 <> $3) AND (c1 <> $5))
-                           ->  Sort  (cost=xxx rows=100 width=xxx)
+                           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                  Sort Key: bmt2.c1
-                                 ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = bmt3.c1)
-(60 rows)
+                                 ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = bmt1.c1)
 
 \o results/ut-R.tmpout
 /*+
@@ -1987,66 +1912,63 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                                      QUERY PLAN                                                     
 --------------------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
    InitPlan 1 (returns $1)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                  Join Filter: (b1t2.c1 = b1t1.c1)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                        Hash Cond: (b1t4.c1 = b1t2.c1)
-                       ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                       ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                             ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                                    Merge Cond: (b1t3.c1 = b1t2.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Sort  (cost=xxx rows=100 width=xxx)
+                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                          Sort Key: b1t2.c1
-                                         ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                                         ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b1t3.c1)
    InitPlan 2 (returns $3)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                        Hash Cond: (b2t1.c1 = b2t3.c1)
-                       ->  Seq Scan on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                       ->  Seq Scan on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                             ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                                    Merge Cond: (b2t3.c1 = b2t4.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                                   ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                        Index Cond: (c1 = b2t1.c1)
    InitPlan 3 (returns $5)
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                 Join Filter: (b3t1.c1 = b3t3.c1)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
+     ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                        Hash Cond: (b3t1.c1 = b3t2.c1)
-                       ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                       ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                              Merge Cond: (b3t1.c1 = b3t4.c1)
-                             ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1000 width=xxx)
-                             ->  Index Only Scan using t4_i1 on t4 b3t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=100 width=xxx)
-                             ->  Seq Scan on t2 b3t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t3_i1 on t3 b3t3  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b3t4.c1)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-         Join Filter: (bmt1.c1 = bmt4.c1)
-         ->  Hash Join  (cost=xxx rows=1 width=xxx)
+                             ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1000 width=xxx)
+                             ->  Index Only Scan using t4_i1 on t4 b3t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                             ->  Seq Scan on t2 b3t2  (cost=xxx..xxx rows=100 width=xxx)
+                 ->  Index Only Scan using t3_i1 on t3 b3t3  (cost=xxx..xxx rows=1 width=xxx)
+                       Index Cond: (c1 = b3t1.c1)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                Hash Cond: (bmt3.c1 = bmt1.c1)
-               ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=1 width=xxx)
-                     ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                     ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                            Merge Cond: (bmt1.c1 = bmt2.c1)
-                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=997 width=xxx)
+                           ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=997 width=xxx)
                                  Filter: ((c1 <> $1) AND (c1 <> $3) AND (c1 <> $5))
-                           ->  Sort  (cost=xxx rows=100 width=xxx)
+                           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                  Sort Key: bmt2.c1
-                                 ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = bmt3.c1)
-(60 rows)
+                                 ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = bmt1.c1)
 
 -- No. R-2-1-7
 \o results/ut-R.tmpout
@@ -2093,63 +2015,58 @@ error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                                                     QUERY PLAN                                                     
---------------------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   CTE c1
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                 Join Filter: (b1t2.c1 = b1t1.c1)
-                 ->  Hash Join  (cost=xxx rows=100 width=xxx)
-                       Hash Cond: (b1t4.c1 = b1t2.c1)
-                       ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=100 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=100 width=xxx)
-                                   Merge Cond: (b1t3.c1 = b1t2.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Sort  (cost=xxx rows=100 width=xxx)
-                                         Sort Key: b1t2.c1
-                                         ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b1t3.c1)
-   CTE c2
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                 ->  Hash Join  (cost=xxx rows=1000 width=xxx)
-                       Hash Cond: (b2t3.c1 = b2t1.c1)
-                       ->  Merge Join  (cost=xxx rows=1100 width=xxx)
-                             Merge Cond: (b2t3.c1 = b2t4.c1)
-                             ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                             ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=1000 width=xxx)
-                             ->  Seq Scan on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b2t1.c1)
-   ->  Hash Join  (cost=xxx rows=1 width=xxx)
+                                                                               QUERY PLAN                                                                               
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
          Hash Cond: (bmt4.c1 = bmt1.c1)
-         ->  Seq Scan on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-         ->  Hash  (cost=xxx rows=1 width=xxx)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+         ->  Seq Scan on t4 bmt4  (cost=xxx..xxx rows=1130 width=xxx)
+         ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (bmt3.c1 = bmt1.c1)
-                     ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: bmt1.c1
-                           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                                       Hash Cond: (bmt1.c1 = c1.c1)
-                                       ->  Seq Scan on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-                                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                                                   Merge Cond: (c1.c1 = c2.c1)
-                                                   ->  Sort  (cost=xxx rows=1 width=xxx)
-                                                         Sort Key: c1.c1
-                                                         ->  CTE Scan on c1  (cost=xxx rows=1 width=xxx)
-                                                   ->  Sort  (cost=xxx rows=1 width=xxx)
-                                                         Sort Key: c2.c1
-                                                         ->  CTE Scan on c2  (cost=xxx rows=1 width=xxx)
-                                 ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx rows=1 width=xxx)
+                           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
+                                       Hash Cond: (bmt1.c1 = (max(b1t1.c1)))
+                                       ->  Seq Scan on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+                                       ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                                             ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                   Merge Cond: ((max(b1t1.c1)) = (max(b2t1.c1)))
+                                                   ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
+                                                         Sort Key: (max(b1t1.c1))
+                                                         ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+                                                               ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                                                                     Join Filter: (b1t2.c1 = b1t1.c1)
+                                                                     ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
+                                                                           Hash Cond: (b1t4.c1 = b1t2.c1)
+                                                                           ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                           ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                                                                                 ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
+                                                                                       Merge Cond: (b1t3.c1 = b1t2.c1)
+                                                                                       ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                                       ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
+                                                                                             Sort Key: b1t2.c1
+                                                                                             ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                                                                     ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           Index Cond: (c1 = b1t3.c1)
+                                                   ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
+                                                         Sort Key: (max(b2t1.c1))
+                                                         ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+                                                               ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                                                                     ->  Hash Join  (cost=xxx..xxx rows=1000 width=xxx)
+                                                                           Hash Cond: (b2t3.c1 = b2t1.c1)
+                                                                           ->  Merge Join  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                                 Merge Cond: (b2t3.c1 = b2t4.c1)
+                                                                                 ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                                 ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                           ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+                                                                                 ->  Seq Scan on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+                                                                     ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           Index Cond: (c1 = b2t1.c1)
+                                 ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx..xxx rows=1 width=xxx)
                                        Index Cond: (c1 = bmt1.c1)
-(55 rows)
 
 \o results/ut-R.tmpout
 /*+
@@ -2208,63 +2125,58 @@ error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                                                     QUERY PLAN                                                     
---------------------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   CTE c1
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                 Join Filter: (b1t2.c1 = b1t1.c1)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                       Hash Cond: (b1t4.c1 = b1t2.c1)
-                       ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                                   Merge Cond: (b1t3.c1 = b1t2.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Sort  (cost=xxx rows=100 width=xxx)
-                                         Sort Key: b1t2.c1
-                                         ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b1t3.c1)
-   CTE c2
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                       Hash Cond: (b2t1.c1 = b2t3.c1)
-                       ->  Seq Scan on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                                   Merge Cond: (b2t3.c1 = b2t4.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b2t1.c1)
-   ->  Hash Join  (cost=xxx rows=1 width=xxx)
+                                                                               QUERY PLAN                                                                               
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
          Hash Cond: (bmt4.c1 = bmt1.c1)
-         ->  Seq Scan on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-         ->  Hash  (cost=xxx rows=1 width=xxx)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+         ->  Seq Scan on t4 bmt4  (cost=xxx..xxx rows=1130 width=xxx)
+         ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (bmt3.c1 = bmt1.c1)
-                     ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: bmt1.c1
-                           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                                       Hash Cond: (bmt1.c1 = c1.c1)
-                                       ->  Seq Scan on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-                                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                                                   Merge Cond: (c1.c1 = c2.c1)
-                                                   ->  Sort  (cost=xxx rows=1 width=xxx)
-                                                         Sort Key: c1.c1
-                                                         ->  CTE Scan on c1  (cost=xxx rows=1 width=xxx)
-                                                   ->  Sort  (cost=xxx rows=1 width=xxx)
-                                                         Sort Key: c2.c1
-                                                         ->  CTE Scan on c2  (cost=xxx rows=1 width=xxx)
-                                 ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx rows=1 width=xxx)
+                           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
+                                       Hash Cond: (bmt1.c1 = (max(b1t1.c1)))
+                                       ->  Seq Scan on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+                                       ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                                             ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                   Merge Cond: ((max(b1t1.c1)) = (max(b2t1.c1)))
+                                                   ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
+                                                         Sort Key: (max(b1t1.c1))
+                                                         ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+                                                               ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                                                                     Join Filter: (b1t2.c1 = b1t1.c1)
+                                                                     ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           Hash Cond: (b1t4.c1 = b1t2.c1)
+                                                                           ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                           ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                                                                                 ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                                                       Merge Cond: (b1t3.c1 = b1t2.c1)
+                                                                                       ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                                       ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
+                                                                                             Sort Key: b1t2.c1
+                                                                                             ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                                                                     ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           Index Cond: (c1 = b1t3.c1)
+                                                   ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
+                                                         Sort Key: (max(b2t1.c1))
+                                                         ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+                                                               ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                                                                     ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           Hash Cond: (b2t1.c1 = b2t3.c1)
+                                                                           ->  Seq Scan on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+                                                                           ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                                                                                 ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                                                       Merge Cond: (b2t3.c1 = b2t4.c1)
+                                                                                       ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                                       ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                     ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           Index Cond: (c1 = b2t1.c1)
+                                 ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx..xxx rows=1 width=xxx)
                                        Index Cond: (c1 = bmt1.c1)
-(55 rows)
 
 -- No. R-2-1-8
 \o results/ut-R.tmpout
@@ -2321,83 +2233,75 @@ error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                                                     QUERY PLAN                                                     
---------------------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   CTE c1
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                 Join Filter: (b1t2.c1 = b1t1.c1)
-                 ->  Hash Join  (cost=xxx rows=100 width=xxx)
-                       Hash Cond: (b1t4.c1 = b1t2.c1)
-                       ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=100 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=100 width=xxx)
-                                   Merge Cond: (b1t3.c1 = b1t2.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Sort  (cost=xxx rows=100 width=xxx)
-                                         Sort Key: b1t2.c1
-                                         ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b1t3.c1)
-   CTE c2
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                 ->  Hash Join  (cost=xxx rows=1000 width=xxx)
-                       Hash Cond: (b2t3.c1 = b2t1.c1)
-                       ->  Merge Join  (cost=xxx rows=1100 width=xxx)
-                             Merge Cond: (b2t3.c1 = b2t4.c1)
-                             ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                             ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=1000 width=xxx)
-                             ->  Seq Scan on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b2t1.c1)
-   CTE c3
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                 Join Filter: (b3t1.c1 = b3t3.c1)
-                 ->  Hash Join  (cost=xxx rows=100 width=xxx)
-                       Hash Cond: (b3t1.c1 = b3t2.c1)
-                       ->  Merge Join  (cost=xxx rows=1000 width=xxx)
-                             Merge Cond: (b3t1.c1 = b3t4.c1)
-                             ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1000 width=xxx)
-                             ->  Index Only Scan using t4_i1 on t4 b3t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=100 width=xxx)
-                             ->  Seq Scan on t2 b3t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t3_i1 on t3 b3t3  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b3t4.c1)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-         Join Filter: (bmt1.c1 = bmt4.c1)
-         ->  Hash Join  (cost=xxx rows=1 width=xxx)
+                                                                            QUERY PLAN                                                                            
+------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                Hash Cond: (bmt3.c1 = bmt1.c1)
-               ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=1 width=xxx)
-                     ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                     ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                            Merge Cond: (bmt1.c1 = bmt2.c1)
-                           ->  Sort  (cost=xxx rows=1 width=xxx)
+                           ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                                  Sort Key: bmt1.c1
-                                 ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                                       ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                                             Hash Cond: (c2.c1 = c1.c1)
-                                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                                                   Merge Cond: (c2.c1 = c3.c1)
-                                                   ->  Sort  (cost=xxx rows=1 width=xxx)
-                                                         Sort Key: c2.c1
-                                                         ->  CTE Scan on c2  (cost=xxx rows=1 width=xxx)
-                                                   ->  Sort  (cost=xxx rows=1 width=xxx)
-                                                         Sort Key: c3.c1
-                                                         ->  CTE Scan on c3  (cost=xxx rows=1 width=xxx)
-                                             ->  Hash  (cost=xxx rows=1 width=xxx)
-                                                   ->  CTE Scan on c1  (cost=xxx rows=1 width=xxx)
-                                       ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1 width=xxx)
-                                             Index Cond: (c1 = c1.c1)
-                           ->  Sort  (cost=xxx rows=100 width=xxx)
+                                 ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                                       Join Filter: ((max(b1t1.c1)) = bmt1.c1)
+                                       ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
+                                             Hash Cond: ((max(b2t1.c1)) = (max(b1t1.c1)))
+                                             ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                   Merge Cond: ((max(b2t1.c1)) = (max(b3t1.c1)))
+                                                   ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
+                                                         Sort Key: (max(b2t1.c1))
+                                                         ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+                                                               ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                                                                     ->  Hash Join  (cost=xxx..xxx rows=1000 width=xxx)
+                                                                           Hash Cond: (b2t3.c1 = b2t1.c1)
+                                                                           ->  Merge Join  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                                 Merge Cond: (b2t3.c1 = b2t4.c1)
+                                                                                 ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                                 ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                           ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+                                                                                 ->  Seq Scan on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+                                                                     ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           Index Cond: (c1 = b2t1.c1)
+                                                   ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
+                                                         Sort Key: (max(b3t1.c1))
+                                                         ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+                                                               ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                                                                     ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
+                                                                           Hash Cond: (b3t1.c1 = b3t2.c1)
+                                                                           ->  Merge Join  (cost=xxx..xxx rows=1000 width=xxx)
+                                                                                 Merge Cond: (b3t1.c1 = b3t4.c1)
+                                                                                 ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1000 width=xxx)
+                                                                                 ->  Index Only Scan using t4_i1 on t4 b3t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                           ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                                                                                 ->  Seq Scan on t2 b3t2  (cost=xxx..xxx rows=100 width=xxx)
+                                                                     ->  Index Only Scan using t3_i1 on t3 b3t3  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           Index Cond: (c1 = b3t1.c1)
+                                             ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                                                   ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+                                                         ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                                                               Join Filter: (b1t2.c1 = b1t1.c1)
+                                                               ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
+                                                                     Hash Cond: (b1t4.c1 = b1t2.c1)
+                                                                     ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                     ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                                                                           ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
+                                                                                 Merge Cond: (b1t3.c1 = b1t2.c1)
+                                                                                 ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                                 ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
+                                                                                       Sort Key: b1t2.c1
+                                                                                       ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                                                               ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
+                                                                     Index Cond: (c1 = b1t3.c1)
+                                       ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1 width=xxx)
+                                             Index Cond: (c1 = (max(b2t1.c1)))
+                           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                  Sort Key: bmt2.c1
-                                 ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = bmt3.c1)
-(75 rows)
+                                 ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = bmt1.c1)
 
 \o results/ut-R.tmpout
 /*+
@@ -2472,83 +2376,75 @@ error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                                                     QUERY PLAN                                                     
---------------------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   CTE c1
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                 Join Filter: (b1t2.c1 = b1t1.c1)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                       Hash Cond: (b1t4.c1 = b1t2.c1)
-                       ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                                   Merge Cond: (b1t3.c1 = b1t2.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Sort  (cost=xxx rows=100 width=xxx)
-                                         Sort Key: b1t2.c1
-                                         ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b1t3.c1)
-   CTE c2
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                       Hash Cond: (b2t1.c1 = b2t3.c1)
-                       ->  Seq Scan on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-                       ->  Hash  (cost=xxx rows=1 width=xxx)
-                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                                   Merge Cond: (b2t3.c1 = b2t4.c1)
-                                   ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                                   ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                 ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b2t1.c1)
-   CTE c3
-     ->  Aggregate  (cost=xxx rows=1 width=xxx)
-           ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                 Join Filter: (b3t1.c1 = b3t3.c1)
-                 ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                       Hash Cond: (b3t1.c1 = b3t2.c1)
-                       ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                             Merge Cond: (b3t1.c1 = b3t4.c1)
-                             ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1000 width=xxx)
-                             ->  Index Only Scan using t4_i1 on t4 b3t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Hash  (cost=xxx rows=100 width=xxx)
-                             ->  Seq Scan on t2 b3t2  (cost=xxx rows=100 width=xxx)
-                 ->  Index Only Scan using t3_i1 on t3 b3t3  (cost=xxx rows=1 width=xxx)
-                       Index Cond: (c1 = b3t4.c1)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-         Join Filter: (bmt1.c1 = bmt4.c1)
-         ->  Hash Join  (cost=xxx rows=1 width=xxx)
+                                                                               QUERY PLAN                                                                               
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                Hash Cond: (bmt3.c1 = bmt1.c1)
-               ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=1 width=xxx)
-                     ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                     ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                            Merge Cond: (bmt1.c1 = bmt2.c1)
-                           ->  Sort  (cost=xxx rows=1 width=xxx)
+                           ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                                  Sort Key: bmt1.c1
-                                 ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                                       ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                                             Hash Cond: (c2.c1 = c1.c1)
-                                             ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                                                   Merge Cond: (c2.c1 = c3.c1)
-                                                   ->  Sort  (cost=xxx rows=1 width=xxx)
-                                                         Sort Key: c2.c1
-                                                         ->  CTE Scan on c2  (cost=xxx rows=1 width=xxx)
-                                                   ->  Sort  (cost=xxx rows=1 width=xxx)
-                                                         Sort Key: c3.c1
-                                                         ->  CTE Scan on c3  (cost=xxx rows=1 width=xxx)
-                                             ->  Hash  (cost=xxx rows=1 width=xxx)
-                                                   ->  CTE Scan on c1  (cost=xxx rows=1 width=xxx)
-                                       ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1 width=xxx)
-                                             Index Cond: (c1 = c1.c1)
-                           ->  Sort  (cost=xxx rows=100 width=xxx)
+                                 ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                                       Join Filter: ((max(b1t1.c1)) = bmt1.c1)
+                                       ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
+                                             Hash Cond: ((max(b2t1.c1)) = (max(b1t1.c1)))
+                                             ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                   Merge Cond: ((max(b2t1.c1)) = (max(b3t1.c1)))
+                                                   ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
+                                                         Sort Key: (max(b2t1.c1))
+                                                         ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+                                                               ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                                                                     ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           Hash Cond: (b2t1.c1 = b2t3.c1)
+                                                                           ->  Seq Scan on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+                                                                           ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                                                                                 ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                                                       Merge Cond: (b2t3.c1 = b2t4.c1)
+                                                                                       ->  Index Only Scan using t3_i1 on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                                       ->  Index Only Scan using t4_i1 on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                     ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           Index Cond: (c1 = b2t1.c1)
+                                                   ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
+                                                         Sort Key: (max(b3t1.c1))
+                                                         ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+                                                               ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                                                                     ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           Hash Cond: (b3t1.c1 = b3t2.c1)
+                                                                           ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                                                 Merge Cond: (b3t1.c1 = b3t4.c1)
+                                                                                 ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1000 width=xxx)
+                                                                                 ->  Index Only Scan using t4_i1 on t4 b3t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                           ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                                                                                 ->  Seq Scan on t2 b3t2  (cost=xxx..xxx rows=100 width=xxx)
+                                                                     ->  Index Only Scan using t3_i1 on t3 b3t3  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           Index Cond: (c1 = b3t1.c1)
+                                             ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                                                   ->  Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+                                                         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                                                               Join Filter: (b1t2.c1 = b1t1.c1)
+                                                               ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                                     Hash Cond: (b1t4.c1 = b1t2.c1)
+                                                                     ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                     ->  Hash  (cost=xxx..xxx rows=1 width=xxx)
+                                                                           ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+                                                                                 Merge Cond: (b1t3.c1 = b1t2.c1)
+                                                                                 ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                                                                 ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
+                                                                                       Sort Key: b1t2.c1
+                                                                                       ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                                                               ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
+                                                                     Index Cond: (c1 = b1t3.c1)
+                                       ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1 width=xxx)
+                                             Index Cond: (c1 = (max(b2t1.c1)))
+                           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                                  Sort Key: bmt2.c1
-                                 ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = bmt3.c1)
-(75 rows)
+                                 ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = bmt1.c1)
 
 ----
 ---- No. R-2-2 the number of the tables per quiry block
@@ -2572,8 +2468,8 @@ SELECT b3t1.c1 FROM s1.t1 b3t1 WHERE b3t1.c1 = 1
 );
 LOG:  pg_hint_plan:
 used hint:
-Leading(c1 bmt1)
 not used hint:
+Leading(c1 bmt1)
 duplication hint:
 error hint:
 
@@ -2581,22 +2477,18 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                     QUERY PLAN                                    
 ----------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
-   CTE c1
-     ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+   InitPlan 1 (returns $0)
+     ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx..xxx rows=1 width=xxx)
            Index Cond: (c1 = 1)
    InitPlan 2 (returns $1)
-     ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx rows=1 width=xxx)
+     ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1 width=xxx)
            Index Cond: (c1 = 1)
-   InitPlan 3 (returns $2)
-     ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1 width=xxx)
-           Index Cond: (c1 = 1)
-   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1 width=xxx)
+   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = 1)
+         Filter: (c1 <> $1)
+   ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
          Index Cond: (c1 = 1)
-         Filter: (c1 <> $2)
-   ->  CTE Scan on c1  (cost=xxx rows=1 width=xxx)
-         Filter: (c1 = 1)
-(16 rows)
 
 \o results/ut-R.tmpout
 /*+
@@ -2620,12 +2512,12 @@ SELECT b3t1.c1 FROM s1.t1 b3t1 WHERE b3t1.c1 = 1
 );
 LOG:  pg_hint_plan:
 used hint:
-Leading(c1 bmt1)
-Rows(bmt1 c1 #1)
 not used hint:
+Leading(c1 bmt1)
 Rows(b1t1 c1 #1)
 Rows(b2t1 c1 #1)
 Rows(b3t1 c1 #1)
+Rows(bmt1 c1 #1)
 duplication hint:
 error hint:
 
@@ -2633,22 +2525,18 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                     QUERY PLAN                                    
 ----------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
-   CTE c1
-     ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+   InitPlan 1 (returns $0)
+     ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx..xxx rows=1 width=xxx)
            Index Cond: (c1 = 1)
    InitPlan 2 (returns $1)
-     ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx rows=1 width=xxx)
+     ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1 width=xxx)
            Index Cond: (c1 = 1)
-   InitPlan 3 (returns $2)
-     ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1 width=xxx)
-           Index Cond: (c1 = 1)
-   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1 width=xxx)
+   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = 1)
+         Filter: (c1 <> $1)
+   ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
          Index Cond: (c1 = 1)
-         Filter: (c1 <> $2)
-   ->  CTE Scan on c1  (cost=xxx rows=1 width=xxx)
-         Filter: (c1 = 1)
-(16 rows)
 
 -- No. R-2-2-2
 \o results/ut-R.tmpout
@@ -2680,55 +2568,48 @@ used hint:
 MergeJoin(b1t1 b1t2)
 MergeJoin(b2t1 b2t2)
 MergeJoin(b3t1 b3t2)
-MergeJoin(bmt2 c1)
-HashJoin(bmt1 bmt2 c1)
-Leading(c1 bmt2 bmt1)
 Leading(b1t2 b1t1)
 Leading(b2t2 b2t1)
 Leading(b3t2 b3t1)
 not used hint:
+MergeJoin(bmt2 c1)
+HashJoin(bmt1 bmt2 c1)
+Leading(c1 bmt2 bmt1)
 duplication hint:
 error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                                         QUERY PLAN                                         
---------------------------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=10 width=xxx)
-   Hash Cond: (bmt1.c1 = bmt2.c1)
-   CTE c1
-     ->  Merge Join  (cost=xxx rows=100 width=xxx)
-           Merge Cond: (b1t1.c1 = b1t2.c1)
-           ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1000 width=xxx)
-           ->  Sort  (cost=xxx rows=100 width=xxx)
-                 Sort Key: b1t2.c1
-                 ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-   InitPlan 2 (returns $1)
-     ->  Merge Join  (cost=xxx rows=100 width=xxx)
+                                           QUERY PLAN                                           
+------------------------------------------------------------------------------------------------
+ Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+   Join Filter: (bmt1.c1 = bmt2.c1)
+   InitPlan 1 (returns $0)
+     ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
            Merge Cond: (b2t1.c1 = b2t2.c1)
-           ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-           ->  Sort  (cost=xxx rows=100 width=xxx)
+           ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                  Sort Key: b2t2.c1
-                 ->  Seq Scan on t2 b2t2  (cost=xxx rows=100 width=xxx)
-   InitPlan 3 (returns $2)
-     ->  Merge Join  (cost=xxx rows=100 width=xxx)
+                 ->  Seq Scan on t2 b2t2  (cost=xxx..xxx rows=100 width=xxx)
+   InitPlan 2 (returns $1)
+     ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
            Merge Cond: (b3t1.c1 = b3t2.c1)
-           ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1000 width=xxx)
-           ->  Sort  (cost=xxx rows=100 width=xxx)
+           ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1000 width=xxx)
+           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                  Sort Key: b3t2.c1
-                 ->  Seq Scan on t2 b3t2  (cost=xxx rows=100 width=xxx)
-   ->  Seq Scan on t1 bmt1  (cost=xxx rows=999 width=xxx)
-         Filter: (c1 <> $2)
-   ->  Hash  (cost=xxx rows=100 width=xxx)
-         ->  Merge Join  (cost=xxx rows=100 width=xxx)
-               Merge Cond: (bmt2.c1 = c1.c1)
-               ->  Sort  (cost=xxx rows=100 width=xxx)
-                     Sort Key: bmt2.c1
-                     ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-               ->  Sort  (cost=xxx rows=100 width=xxx)
-                     Sort Key: c1.c1
-                     ->  CTE Scan on c1  (cost=xxx rows=100 width=xxx)
-(35 rows)
+                 ->  Seq Scan on t2 b3t2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Nested Loop  (cost={inf}..{inf} rows=100 width=xxx)
+         ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
+               Merge Cond: (b1t1.c1 = b1t2.c1)
+               ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1000 width=xxx)
+               ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
+                     Sort Key: b1t2.c1
+                     ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = b1t1.c1)
+               Filter: (c1 <> $1)
+   ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = b1t1.c1)
 
 \o results/ut-R.tmpout
 /*+
@@ -2765,60 +2646,53 @@ used hint:
 MergeJoin(b1t1 b1t2)
 MergeJoin(b2t1 b2t2)
 MergeJoin(b3t1 b3t2)
-MergeJoin(bmt2 c1)
-HashJoin(bmt1 bmt2 c1)
-Leading(c1 bmt2 bmt1)
 Leading(b1t2 b1t1)
 Leading(b2t2 b2t1)
 Leading(b3t2 b3t1)
 Rows(b1t1 b1t2 #1)
 Rows(b2t1 b2t2 #1)
 Rows(b3t1 b3t2 #1)
+not used hint:
+MergeJoin(bmt2 c1)
+HashJoin(bmt1 bmt2 c1)
+Leading(c1 bmt2 bmt1)
 Rows(bmt2 c1 #1)
 Rows(bmt1 bmt2 c1 #1)
-not used hint:
 duplication hint:
 error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                                         QUERY PLAN                                         
---------------------------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1 width=xxx)
-   Hash Cond: (bmt1.c1 = bmt2.c1)
-   CTE c1
-     ->  Merge Join  (cost=xxx rows=1 width=xxx)
-           Merge Cond: (b1t1.c1 = b1t2.c1)
-           ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1000 width=xxx)
-           ->  Sort  (cost=xxx rows=100 width=xxx)
-                 Sort Key: b1t2.c1
-                 ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-   InitPlan 2 (returns $1)
-     ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                                           QUERY PLAN                                           
+------------------------------------------------------------------------------------------------
+ Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+   Join Filter: (bmt1.c1 = bmt2.c1)
+   InitPlan 1 (returns $0)
+     ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
            Merge Cond: (b2t1.c1 = b2t2.c1)
-           ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-           ->  Sort  (cost=xxx rows=100 width=xxx)
+           ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                  Sort Key: b2t2.c1
-                 ->  Seq Scan on t2 b2t2  (cost=xxx rows=100 width=xxx)
-   InitPlan 3 (returns $2)
-     ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                 ->  Seq Scan on t2 b2t2  (cost=xxx..xxx rows=100 width=xxx)
+   InitPlan 2 (returns $1)
+     ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
            Merge Cond: (b3t1.c1 = b3t2.c1)
-           ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1000 width=xxx)
-           ->  Sort  (cost=xxx rows=100 width=xxx)
+           ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1000 width=xxx)
+           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                  Sort Key: b3t2.c1
-                 ->  Seq Scan on t2 b3t2  (cost=xxx rows=100 width=xxx)
-   ->  Seq Scan on t1 bmt1  (cost=xxx rows=999 width=xxx)
-         Filter: (c1 <> $2)
-   ->  Hash  (cost=xxx rows=1 width=xxx)
-         ->  Merge Join  (cost=xxx rows=1 width=xxx)
-               Merge Cond: (bmt2.c1 = c1.c1)
-               ->  Sort  (cost=xxx rows=100 width=xxx)
-                     Sort Key: bmt2.c1
-                     ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-               ->  Sort  (cost=xxx rows=1 width=xxx)
-                     Sort Key: c1.c1
-                     ->  CTE Scan on c1  (cost=xxx rows=1 width=xxx)
-(35 rows)
+                 ->  Seq Scan on t2 b3t2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Nested Loop  (cost={inf}..{inf} rows=100 width=xxx)
+         ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+               Merge Cond: (b1t1.c1 = b1t2.c1)
+               ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1000 width=xxx)
+               ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
+                     Sort Key: b1t2.c1
+                     ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = b1t1.c1)
+               Filter: (c1 <> $1)
+   ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = b1t1.c1)
 
 -- No. R-2-2-3
 \o results/ut-R.tmpout
@@ -2857,90 +2731,86 @@ used hint:
 HashJoin(b1t3 b1t4)
 HashJoin(b2t3 b2t4)
 HashJoin(b3t3 b3t4)
-MergeJoin(bmt4 c1)
 NestLoop(b1t2 b1t3 b1t4)
 NestLoop(b2t2 b2t3 b2t4)
 NestLoop(b3t2 b3t3 b3t4)
-HashJoin(bmt3 bmt4 c1)
 MergeJoin(b1t1 b1t2 b1t3 b1t4)
 MergeJoin(b2t1 b2t2 b2t3 b2t4)
 MergeJoin(b3t1 b3t2 b3t3 b3t4)
-NestLoop(bmt2 bmt3 bmt4 c1)
-MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
-Leading(c1 bmt4 bmt3 bmt2 bmt1)
 Leading(b1t4 b1t3 b1t2 b1t1)
 Leading(b2t4 b2t3 b2t2 b2t1)
 Leading(b3t4 b3t3 b3t2 b3t1)
 not used hint:
+MergeJoin(bmt4 c1)
+HashJoin(bmt3 bmt4 c1)
+NestLoop(bmt2 bmt3 bmt4 c1)
+MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
+Leading(c1 bmt4 bmt3 bmt2 bmt1)
 duplication hint:
 error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                                                    QUERY PLAN                                                    
-------------------------------------------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=10 width=xxx)
-   Merge Cond: (bmt1.c1 = bmt2.c1)
-   CTE c1
-     ->  Merge Join  (cost=xxx rows=100 width=xxx)
-           Merge Cond: (b1t1.c1 = b1t2.c1)
-           ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1000 width=xxx)
-           ->  Sort  (cost=xxx rows=100 width=xxx)
-                 Sort Key: b1t2.c1
-                 ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                       ->  Hash Join  (cost=xxx rows=1100 width=xxx)
-                             Hash Cond: (b1t3.c1 = b1t4.c1)
-                             ->  Seq Scan on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                             ->  Hash  (cost=xxx rows=1100 width=xxx)
-                                   ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Index Only Scan using t2_i1 on t2 b1t2  (cost=xxx rows=1 width=xxx)
-                             Index Cond: (c1 = b1t3.c1)
-   InitPlan 2 (returns $3)
-     ->  Merge Join  (cost=xxx rows=100 width=xxx)
+                                                     QUERY PLAN                                                     
+--------------------------------------------------------------------------------------------------------------------
+ Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+   Join Filter: (bmt1.c1 = bmt4.c1)
+   InitPlan 1 (returns $1)
+     ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
            Merge Cond: (b2t1.c1 = b2t2.c1)
-           ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-           ->  Sort  (cost=xxx rows=100 width=xxx)
+           ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                  Sort Key: b2t2.c1
-                 ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                       ->  Hash Join  (cost=xxx rows=1100 width=xxx)
+                 ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                       ->  Hash Join  (cost=xxx..xxx rows=1130 width=xxx)
                              Hash Cond: (b2t3.c1 = b2t4.c1)
-                             ->  Seq Scan on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                             ->  Hash  (cost=xxx rows=1100 width=xxx)
-                                   ->  Seq Scan on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                             ->  Seq Scan on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                             ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Seq Scan on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                              Index Cond: (c1 = b2t3.c1)
-   InitPlan 3 (returns $5)
-     ->  Merge Join  (cost=xxx rows=100 width=xxx)
+   InitPlan 2 (returns $3)
+     ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
            Merge Cond: (b3t1.c1 = b3t2.c1)
-           ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1000 width=xxx)
-           ->  Sort  (cost=xxx rows=100 width=xxx)
+           ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1000 width=xxx)
+           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                  Sort Key: b3t2.c1
-                 ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-                       ->  Hash Join  (cost=xxx rows=1100 width=xxx)
+                 ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                       ->  Hash Join  (cost=xxx..xxx rows=1130 width=xxx)
                              Hash Cond: (b3t3.c1 = b3t4.c1)
-                             ->  Seq Scan on t3 b3t3  (cost=xxx rows=1100 width=xxx)
-                             ->  Hash  (cost=xxx rows=1100 width=xxx)
-                                   ->  Seq Scan on t4 b3t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Index Only Scan using t2_i1 on t2 b3t2  (cost=xxx rows=1 width=xxx)
+                             ->  Seq Scan on t3 b3t3  (cost=xxx..xxx rows=1130 width=xxx)
+                             ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Seq Scan on t4 b3t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Index Only Scan using t2_i1 on t2 b3t2  (cost=xxx..xxx rows=1 width=xxx)
                              Index Cond: (c1 = b3t3.c1)
-   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=999 width=xxx)
-         Filter: (c1 <> $5)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
-         Sort Key: bmt2.c1
-         ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-               ->  Hash Join  (cost=xxx rows=100 width=xxx)
-                     Hash Cond: (bmt3.c1 = bmt4.c1)
-                     ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                     ->  Hash  (cost=xxx rows=100 width=xxx)
-                           ->  Merge Join  (cost=xxx rows=100 width=xxx)
-                                 Merge Cond: (bmt4.c1 = c1.c1)
-                                 ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-                                 ->  Sort  (cost=xxx rows=100 width=xxx)
-                                       Sort Key: c1.c1
-                                       ->  CTE Scan on c1  (cost=xxx rows=100 width=xxx)
-               ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx rows=1 width=xxx)
-                     Index Cond: (c1 = bmt3.c1)
-(62 rows)
+   ->  Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+         Join Filter: (bmt1.c1 = bmt3.c1)
+         ->  Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+               Join Filter: (bmt1.c1 = bmt2.c1)
+               ->  Nested Loop  (cost={inf}..{inf} rows=100 width=xxx)
+                     Join Filter: (b1t1.c1 = bmt1.c1)
+                     ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
+                           Merge Cond: (b1t1.c1 = b1t2.c1)
+                           ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1000 width=xxx)
+                           ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
+                                 Sort Key: b1t2.c1
+                                 ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                                       ->  Hash Join  (cost=xxx..xxx rows=1130 width=xxx)
+                                             Hash Cond: (b1t3.c1 = b1t4.c1)
+                                             ->  Seq Scan on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                             ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                                                   ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                       ->  Index Only Scan using t2_i1 on t2 b1t2  (cost=xxx..xxx rows=1 width=xxx)
+                                             Index Cond: (c1 = b1t3.c1)
+                     ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1 width=xxx)
+                           Index Cond: (c1 = b1t3.c1)
+                           Filter: (c1 <> $3)
+               ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx..xxx rows=1 width=xxx)
+                     Index Cond: (c1 = b1t3.c1)
+         ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = b1t3.c1)
+   ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = bmt3.c1)
 
 \o results/ut-R.tmpout
 /*+
@@ -2991,103 +2861,99 @@ used hint:
 HashJoin(b1t3 b1t4)
 HashJoin(b2t3 b2t4)
 HashJoin(b3t3 b3t4)
-MergeJoin(bmt4 c1)
 NestLoop(b1t2 b1t3 b1t4)
 NestLoop(b2t2 b2t3 b2t4)
 NestLoop(b3t2 b3t3 b3t4)
-HashJoin(bmt3 bmt4 c1)
 MergeJoin(b1t1 b1t2 b1t3 b1t4)
 MergeJoin(b2t1 b2t2 b2t3 b2t4)
 MergeJoin(b3t1 b3t2 b3t3 b3t4)
-NestLoop(bmt2 bmt3 bmt4 c1)
-MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
-Leading(c1 bmt4 bmt3 bmt2 bmt1)
 Leading(b1t4 b1t3 b1t2 b1t1)
 Leading(b2t4 b2t3 b2t2 b2t1)
 Leading(b3t4 b3t3 b3t2 b3t1)
 Rows(b1t3 b1t4 #1)
 Rows(b2t3 b2t4 #1)
 Rows(b3t3 b3t4 #1)
-Rows(bmt4 c1 #1)
 Rows(b1t2 b1t3 b1t4 #1)
 Rows(b2t2 b2t3 b2t4 #1)
 Rows(b3t2 b3t3 b3t4 #1)
-Rows(bmt3 bmt4 c1 #1)
 Rows(b1t1 b1t2 b1t3 b1t4 #1)
 Rows(b2t1 b2t2 b2t3 b2t4 #1)
 Rows(b3t1 b3t2 b3t3 b3t4 #1)
+not used hint:
+MergeJoin(bmt4 c1)
+HashJoin(bmt3 bmt4 c1)
+NestLoop(bmt2 bmt3 bmt4 c1)
+MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
+Leading(c1 bmt4 bmt3 bmt2 bmt1)
+Rows(bmt4 c1 #1)
+Rows(bmt3 bmt4 c1 #1)
 Rows(bmt2 bmt3 bmt4 c1 #1)
 Rows(bmt1 bmt2 bmt3 bmt4 c1 #1)
-not used hint:
 duplication hint:
 error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                                                    QUERY PLAN                                                    
-------------------------------------------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
-   Merge Cond: (bmt1.c1 = bmt2.c1)
-   CTE c1
-     ->  Merge Join  (cost=xxx rows=1 width=xxx)
-           Merge Cond: (b1t1.c1 = b1t2.c1)
-           ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1000 width=xxx)
-           ->  Sort  (cost=xxx rows=1 width=xxx)
-                 Sort Key: b1t2.c1
-                 ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                       ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                             Hash Cond: (b1t3.c1 = b1t4.c1)
-                             ->  Seq Scan on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                             ->  Hash  (cost=xxx rows=1100 width=xxx)
-                                   ->  Seq Scan on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Index Only Scan using t2_i1 on t2 b1t2  (cost=xxx rows=1 width=xxx)
-                             Index Cond: (c1 = b1t3.c1)
-   InitPlan 2 (returns $3)
-     ->  Merge Join  (cost=xxx rows=1 width=xxx)
+                                                     QUERY PLAN                                                     
+--------------------------------------------------------------------------------------------------------------------
+ Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+   Join Filter: (bmt1.c1 = bmt4.c1)
+   InitPlan 1 (returns $1)
+     ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
            Merge Cond: (b2t1.c1 = b2t2.c1)
-           ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx rows=1000 width=xxx)
-           ->  Sort  (cost=xxx rows=1 width=xxx)
+           ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx..xxx rows=1000 width=xxx)
+           ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                  Sort Key: b2t2.c1
-                 ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                       ->  Hash Join  (cost=xxx rows=1 width=xxx)
+                 ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                       ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                              Hash Cond: (b2t3.c1 = b2t4.c1)
-                             ->  Seq Scan on t3 b2t3  (cost=xxx rows=1100 width=xxx)
-                             ->  Hash  (cost=xxx rows=1100 width=xxx)
-                                   ->  Seq Scan on t4 b2t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                             ->  Seq Scan on t3 b2t3  (cost=xxx..xxx rows=1130 width=xxx)
+                             ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Seq Scan on t4 b2t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Index Only Scan using t2_i1 on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                              Index Cond: (c1 = b2t3.c1)
-   InitPlan 3 (returns $5)
-     ->  Merge Join  (cost=xxx rows=1 width=xxx)
+   InitPlan 2 (returns $3)
+     ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
            Merge Cond: (b3t1.c1 = b3t2.c1)
-           ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1000 width=xxx)
-           ->  Sort  (cost=xxx rows=1 width=xxx)
+           ->  Index Only Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1000 width=xxx)
+           ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                  Sort Key: b3t2.c1
-                 ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-                       ->  Hash Join  (cost=xxx rows=1 width=xxx)
+                 ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                       ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
                              Hash Cond: (b3t3.c1 = b3t4.c1)
-                             ->  Seq Scan on t3 b3t3  (cost=xxx rows=1100 width=xxx)
-                             ->  Hash  (cost=xxx rows=1100 width=xxx)
-                                   ->  Seq Scan on t4 b3t4  (cost=xxx rows=1100 width=xxx)
-                       ->  Index Only Scan using t2_i1 on t2 b3t2  (cost=xxx rows=1 width=xxx)
+                             ->  Seq Scan on t3 b3t3  (cost=xxx..xxx rows=1130 width=xxx)
+                             ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                                   ->  Seq Scan on t4 b3t4  (cost=xxx..xxx rows=1130 width=xxx)
+                       ->  Index Only Scan using t2_i1 on t2 b3t2  (cost=xxx..xxx rows=1 width=xxx)
                              Index Cond: (c1 = b3t3.c1)
-   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=999 width=xxx)
-         Filter: (c1 <> $5)
-   ->  Sort  (cost=xxx rows=1 width=xxx)
-         Sort Key: bmt2.c1
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-               ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                     Hash Cond: (bmt3.c1 = bmt4.c1)
-                     ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                     ->  Hash  (cost=xxx rows=1 width=xxx)
-                           ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                                 Merge Cond: (bmt4.c1 = c1.c1)
-                                 ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-                                 ->  Sort  (cost=xxx rows=1 width=xxx)
-                                       Sort Key: c1.c1
-                                       ->  CTE Scan on c1  (cost=xxx rows=1 width=xxx)
-               ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx rows=1 width=xxx)
-                     Index Cond: (c1 = bmt3.c1)
-(62 rows)
+   ->  Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+         Join Filter: (bmt1.c1 = bmt3.c1)
+         ->  Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+               Join Filter: (bmt1.c1 = bmt2.c1)
+               ->  Nested Loop  (cost={inf}..{inf} rows=100 width=xxx)
+                     Join Filter: (b1t1.c1 = bmt1.c1)
+                     ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+                           Merge Cond: (b1t1.c1 = b1t2.c1)
+                           ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1000 width=xxx)
+                           ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
+                                 Sort Key: b1t2.c1
+                                 ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                                       ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
+                                             Hash Cond: (b1t3.c1 = b1t4.c1)
+                                             ->  Seq Scan on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                             ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                                                   ->  Seq Scan on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                       ->  Index Only Scan using t2_i1 on t2 b1t2  (cost=xxx..xxx rows=1 width=xxx)
+                                             Index Cond: (c1 = b1t3.c1)
+                     ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1 width=xxx)
+                           Index Cond: (c1 = b1t3.c1)
+                           Filter: (c1 <> $3)
+               ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx..xxx rows=1 width=xxx)
+                     Index Cond: (c1 = b1t3.c1)
+         ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = b1t3.c1)
+   ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = bmt3.c1)
 
 -- No. R-2-2-4
 \o results/ut-R.tmpout
@@ -3116,60 +2982,56 @@ SELECT b3t1.c1 FROM s1.t1 b3t1
 LOG:  pg_hint_plan:
 used hint:
 MergeJoin(b1t3 b1t4)
-MergeJoin(bmt4 c1)
 HashJoin(b1t2 b1t3 b1t4)
-HashJoin(bmt3 bmt4 c1)
 NestLoop(b1t1 b1t2 b1t3 b1t4)
+Leading(b1t4 b1t3 b1t2 b1t1)
+not used hint:
+MergeJoin(bmt4 c1)
+HashJoin(bmt3 bmt4 c1)
 NestLoop(bmt2 bmt3 bmt4 c1)
 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
 Leading(c1 bmt4 bmt3 bmt2 bmt1)
-Leading(b1t4 b1t3 b1t2 b1t1)
-not used hint:
 duplication hint:
 error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                                                    QUERY PLAN                                                    
-------------------------------------------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=10 width=xxx)
-   Merge Cond: (bmt1.c1 = bmt2.c1)
-   CTE c1
-     ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-           Join Filter: (b1t2.c1 = b1t1.c1)
-           ->  Hash Join  (cost=xxx rows=100 width=xxx)
-                 Hash Cond: (b1t3.c1 = b1t2.c1)
-                 ->  Merge Join  (cost=xxx rows=1100 width=xxx)
-                       Merge Cond: (b1t3.c1 = b1t4.c1)
-                       ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                       ->  Index Only Scan using t4_i1 on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                 ->  Hash  (cost=xxx rows=100 width=xxx)
-                       ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-           ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
-                 Index Cond: (c1 = b1t3.c1)
-   InitPlan 2 (returns $2)
-     ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx rows=1 width=xxx)
+                                                          QUERY PLAN                                                          
+------------------------------------------------------------------------------------------------------------------------------
+ Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+   Join Filter: (bmt1.c1 = bmt4.c1)
+   InitPlan 1 (returns $0)
+     ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx..xxx rows=1 width=xxx)
            Index Cond: (c1 = 1)
-   InitPlan 3 (returns $3)
-     ->  Seq Scan on t1 b3t1  (cost=xxx rows=1000 width=xxx)
-   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=999 width=xxx)
-         Filter: (c1 <> $3)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
-         Sort Key: bmt2.c1
-         ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-               ->  Hash Join  (cost=xxx rows=100 width=xxx)
-                     Hash Cond: (bmt3.c1 = bmt4.c1)
-                     ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                     ->  Hash  (cost=xxx rows=100 width=xxx)
-                           ->  Merge Join  (cost=xxx rows=100 width=xxx)
-                                 Merge Cond: (bmt4.c1 = c1.c1)
-                                 ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-                                 ->  Sort  (cost=xxx rows=100 width=xxx)
-                                       Sort Key: c1.c1
-                                       ->  CTE Scan on c1  (cost=xxx rows=100 width=xxx)
-               ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx rows=1 width=xxx)
-                     Index Cond: (c1 = bmt3.c1)
-(38 rows)
+   InitPlan 2 (returns $1)
+     ->  Seq Scan on t1 b3t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+         Join Filter: (bmt1.c1 = bmt3.c1)
+         ->  Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+               Join Filter: (bmt2.c1 = bmt1.c1)
+               ->  Nested Loop  (cost={inf}..{inf} rows=100 width=xxx)
+                     Join Filter: (b1t1.c1 = bmt2.c1)
+                     ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+                     ->  Materialize  (cost=xxx..xxx rows=100 width=xxx)
+                           ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+                                 Join Filter: (b1t2.c1 = b1t1.c1)
+                                 ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
+                                       Hash Cond: (b1t3.c1 = b1t2.c1)
+                                       ->  Merge Join  (cost=xxx..xxx rows=1130 width=xxx)
+                                             Merge Cond: (b1t3.c1 = b1t4.c1)
+                                             ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                             ->  Index Only Scan using t4_i1 on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                       ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                                             ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
+                                       Index Cond: (c1 = b1t3.c1)
+               ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1 width=xxx)
+                     Index Cond: (c1 = b1t3.c1)
+                     Filter: (c1 <> $1)
+         ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = b1t3.c1)
+   ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = bmt3.c1)
 
 \o results/ut-R.tmpout
 /*+
@@ -3204,67 +3066,63 @@ SELECT b3t1.c1 FROM s1.t1 b3t1
 LOG:  pg_hint_plan:
 used hint:
 MergeJoin(b1t3 b1t4)
-MergeJoin(bmt4 c1)
 HashJoin(b1t2 b1t3 b1t4)
-HashJoin(bmt3 bmt4 c1)
 NestLoop(b1t1 b1t2 b1t3 b1t4)
+Leading(b1t4 b1t3 b1t2 b1t1)
+Rows(b1t3 b1t4 #1)
+Rows(b1t2 b1t3 b1t4 #1)
+Rows(b1t1 b1t2 b1t3 b1t4 #1)
+not used hint:
+MergeJoin(bmt4 c1)
+HashJoin(bmt3 bmt4 c1)
 NestLoop(bmt2 bmt3 bmt4 c1)
 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
 Leading(c1 bmt4 bmt3 bmt2 bmt1)
-Leading(b1t4 b1t3 b1t2 b1t1)
-Rows(b1t3 b1t4 #1)
 Rows(bmt4 c1 #1)
-Rows(b1t2 b1t3 b1t4 #1)
 Rows(bmt3 bmt4 c1 #1)
-Rows(b1t1 b1t2 b1t3 b1t4 #1)
 Rows(bmt2 bmt3 bmt4 c1 #1)
 Rows(bmt1 bmt2 bmt3 bmt4 c1 #1)
-not used hint:
 duplication hint:
 error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                                                    QUERY PLAN                                                    
-------------------------------------------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
-   Merge Cond: (bmt1.c1 = bmt2.c1)
-   CTE c1
-     ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-           Join Filter: (b1t2.c1 = b1t1.c1)
-           ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                 Hash Cond: (b1t3.c1 = b1t2.c1)
-                 ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                       Merge Cond: (b1t3.c1 = b1t4.c1)
-                       ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx rows=1100 width=xxx)
-                       ->  Index Only Scan using t4_i1 on t4 b1t4  (cost=xxx rows=1100 width=xxx)
-                 ->  Hash  (cost=xxx rows=100 width=xxx)
-                       ->  Seq Scan on t2 b1t2  (cost=xxx rows=100 width=xxx)
-           ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
-                 Index Cond: (c1 = b1t3.c1)
-   InitPlan 2 (returns $2)
-     ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx rows=1 width=xxx)
+                                                          QUERY PLAN                                                          
+------------------------------------------------------------------------------------------------------------------------------
+ Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+   Join Filter: (bmt1.c1 = bmt4.c1)
+   InitPlan 1 (returns $0)
+     ->  Index Only Scan using t1_i1 on t1 b2t1  (cost=xxx..xxx rows=1 width=xxx)
            Index Cond: (c1 = 1)
-   InitPlan 3 (returns $3)
-     ->  Seq Scan on t1 b3t1  (cost=xxx rows=1000 width=xxx)
-   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=999 width=xxx)
-         Filter: (c1 <> $3)
-   ->  Sort  (cost=xxx rows=1 width=xxx)
-         Sort Key: bmt2.c1
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-               ->  Hash Join  (cost=xxx rows=1 width=xxx)
-                     Hash Cond: (bmt3.c1 = bmt4.c1)
-                     ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                     ->  Hash  (cost=xxx rows=1 width=xxx)
-                           ->  Merge Join  (cost=xxx rows=1 width=xxx)
-                                 Merge Cond: (bmt4.c1 = c1.c1)
-                                 ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-                                 ->  Sort  (cost=xxx rows=1 width=xxx)
-                                       Sort Key: c1.c1
-                                       ->  CTE Scan on c1  (cost=xxx rows=1 width=xxx)
-               ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx rows=1 width=xxx)
-                     Index Cond: (c1 = bmt3.c1)
-(38 rows)
+   InitPlan 2 (returns $1)
+     ->  Seq Scan on t1 b3t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+         Join Filter: (bmt1.c1 = bmt3.c1)
+         ->  Nested Loop  (cost=xxx..xxx rows=10 width=xxx)
+               Join Filter: (bmt2.c1 = bmt1.c1)
+               ->  Nested Loop  (cost={inf}..{inf} rows=100 width=xxx)
+                     Join Filter: (b1t1.c1 = bmt2.c1)
+                     ->  Index Only Scan using t2_i1 on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+                     ->  Materialize  (cost=xxx..xxx rows=1 width=xxx)
+                           ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+                                 Join Filter: (b1t2.c1 = b1t1.c1)
+                                 ->  Hash Join  (cost=xxx..xxx rows=1 width=xxx)
+                                       Hash Cond: (b1t3.c1 = b1t2.c1)
+                                       ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
+                                             Merge Cond: (b1t3.c1 = b1t4.c1)
+                                             ->  Index Only Scan using t3_i1 on t3 b1t3  (cost=xxx..xxx rows=1130 width=xxx)
+                                             ->  Index Only Scan using t4_i1 on t4 b1t4  (cost=xxx..xxx rows=1130 width=xxx)
+                                       ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                                             ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=100 width=xxx)
+                                 ->  Index Only Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
+                                       Index Cond: (c1 = b1t3.c1)
+               ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1 width=xxx)
+                     Index Cond: (c1 = b1t3.c1)
+                     Filter: (c1 <> $1)
+         ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = b1t3.c1)
+   ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = bmt3.c1)
 
 ----
 ---- No. R-2-3 RULE or VIEW
@@ -3286,27 +3144,26 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                           QUERY PLAN                                           
 -----------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (t1.c1 = t4.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                Join Filter: (t1.c1 = t3.c1)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (t1.c1 = t2.c1)
-                     ->  Nested Loop  (cost=xxx rows=6 width=xxx)
-                           ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=6 width=xxx)
+                           ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r1  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r1  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: t2.c1
-                           ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+                           ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-               ->  Tid Scan on t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-         ->  Tid Scan on t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-(21 rows)
 
 \o results/ut-R.tmpout
 /*+
@@ -3332,25 +3189,24 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                    QUERY PLAN                                    
 ---------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
          Join Filter: (t1.c1 = t4.c1)
-         ->  Tid Scan on t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-         ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                Join Filter: (t1.c1 = t3.c1)
-               ->  Tid Scan on t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-               ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+               ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                      Join Filter: (t1.c1 = t2.c1)
-                     ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
                            Filter: (ctid = '(1,1)'::tid)
-                     ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-                           ->  Tid Scan on t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+                           ->  Tid Scan on t1  (cost=xxx..xxx rows=1 width=xxx)
                                  TID Cond: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r1  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r1  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-(19 rows)
 
 \o results/ut-R.tmpout
 /*+
@@ -3368,27 +3224,26 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                              QUERY PLAN                                             
 ----------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (b1t1.c1 = b1t4.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                Join Filter: (b1t1.c1 = b1t3.c1)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (b1t1.c1 = b1t2.c1)
-                     ->  Nested Loop  (cost=xxx rows=6 width=xxx)
-                           ->  Index Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=6 width=xxx)
+                           ->  Index Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r1_  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r1_  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: b1t2.c1
-                           ->  Seq Scan on t2 b1t2  (cost=xxx rows=1 width=xxx)
+                           ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-               ->  Tid Scan on t3 b1t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3 b1t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-         ->  Tid Scan on t4 b1t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4 b1t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-(21 rows)
 
 \o results/ut-R.tmpout
 /*+
@@ -3414,25 +3269,24 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                      QUERY PLAN                                      
 -------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
          Join Filter: (b1t1.c1 = b1t4.c1)
-         ->  Tid Scan on t4 b1t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4 b1t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-         ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                Join Filter: (b1t1.c1 = b1t3.c1)
-               ->  Tid Scan on t3 b1t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3 b1t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-               ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+               ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                      Join Filter: (b1t1.c1 = b1t2.c1)
-                     ->  Seq Scan on t2 b1t2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=1 width=xxx)
                            Filter: (ctid = '(1,1)'::tid)
-                     ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-                           ->  Tid Scan on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+                           ->  Tid Scan on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                                  TID Cond: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r1_  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r1_  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-(19 rows)
 
 -- No. R-2-3-2
 \o results/ut-R.tmpout
@@ -3458,48 +3312,47 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                           QUERY PLAN                                           
 -----------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (t1.c1 = t4.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                Join Filter: (t1.c1 = t3.c1)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (t1.c1 = t2.c1)
-                     ->  Nested Loop  (cost=xxx rows=6 width=xxx)
-                           ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=6 width=xxx)
+                           ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r2  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r2  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: t2.c1
-                           ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+                           ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-               ->  Tid Scan on t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-         ->  Tid Scan on t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
  
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (t1.c1 = t4.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                Join Filter: (t1.c1 = t3.c1)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (t1.c1 = t2.c1)
-                     ->  Nested Loop  (cost=xxx rows=6 width=xxx)
-                           ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=6 width=xxx)
+                           ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r2  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r2  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: t2.c1
-                           ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+                           ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-               ->  Tid Scan on t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-         ->  Tid Scan on t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-(43 rows)
 
 \o results/ut-R.tmpout
 /*+
@@ -3536,44 +3389,43 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                    QUERY PLAN                                    
 ---------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
          Join Filter: (t1.c1 = t4.c1)
-         ->  Tid Scan on t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-         ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                Join Filter: (t1.c1 = t3.c1)
-               ->  Tid Scan on t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-               ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+               ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                      Join Filter: (t1.c1 = t2.c1)
-                     ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
                            Filter: (ctid = '(1,1)'::tid)
-                     ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-                           ->  Tid Scan on t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+                           ->  Tid Scan on t1  (cost=xxx..xxx rows=1 width=xxx)
                                  TID Cond: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r2  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r2  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
  
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
          Join Filter: (t1.c1 = t4.c1)
-         ->  Tid Scan on t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-         ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                Join Filter: (t1.c1 = t3.c1)
-               ->  Tid Scan on t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-               ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+               ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                      Join Filter: (t1.c1 = t2.c1)
-                     ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
                            Filter: (ctid = '(1,1)'::tid)
-                     ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-                           ->  Tid Scan on t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+                           ->  Tid Scan on t1  (cost=xxx..xxx rows=1 width=xxx)
                                  TID Cond: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r2  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r2  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-(39 rows)
 
 \o results/ut-R.tmpout
 /*+
@@ -3601,48 +3453,47 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                              QUERY PLAN                                             
 ----------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (b1t1.c1 = b1t4.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                Join Filter: (b1t1.c1 = b1t3.c1)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (b1t1.c1 = b1t2.c1)
-                     ->  Nested Loop  (cost=xxx rows=6 width=xxx)
-                           ->  Index Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=6 width=xxx)
+                           ->  Index Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r2_  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r2_  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: b1t2.c1
-                           ->  Seq Scan on t2 b1t2  (cost=xxx rows=1 width=xxx)
+                           ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-               ->  Tid Scan on t3 b1t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3 b1t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-         ->  Tid Scan on t4 b1t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4 b1t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
  
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (b2t1.c1 = b2t4.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                Join Filter: (b2t1.c1 = b2t3.c1)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (b2t1.c1 = b2t2.c1)
-                     ->  Nested Loop  (cost=xxx rows=6 width=xxx)
-                           ->  Index Scan using t1_i1 on t1 b2t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=6 width=xxx)
+                           ->  Index Scan using t1_i1 on t1 b2t1  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r2_  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r2_  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: b2t2.c1
-                           ->  Seq Scan on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                           ->  Seq Scan on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-               ->  Tid Scan on t3 b2t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3 b2t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-         ->  Tid Scan on t4 b2t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4 b2t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-(43 rows)
 
 \o results/ut-R.tmpout
 /*+
@@ -3694,44 +3545,43 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                      QUERY PLAN                                      
 -------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
          Join Filter: (b1t1.c1 = b1t4.c1)
-         ->  Tid Scan on t4 b1t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4 b1t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-         ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                Join Filter: (b1t1.c1 = b1t3.c1)
-               ->  Tid Scan on t3 b1t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3 b1t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-               ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+               ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                      Join Filter: (b1t1.c1 = b1t2.c1)
-                     ->  Seq Scan on t2 b1t2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=1 width=xxx)
                            Filter: (ctid = '(1,1)'::tid)
-                     ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-                           ->  Tid Scan on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+                           ->  Tid Scan on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                                  TID Cond: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r2_  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r2_  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
  
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
          Join Filter: (b2t1.c1 = b2t4.c1)
-         ->  Tid Scan on t4 b2t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4 b2t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-         ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                Join Filter: (b2t1.c1 = b2t3.c1)
-               ->  Tid Scan on t3 b2t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3 b2t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-               ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+               ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                      Join Filter: (b2t1.c1 = b2t2.c1)
-                     ->  Seq Scan on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                            Filter: (ctid = '(1,1)'::tid)
-                     ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-                           ->  Tid Scan on t1 b2t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+                           ->  Tid Scan on t1 b2t1  (cost=xxx..xxx rows=1 width=xxx)
                                  TID Cond: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r2_  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r2_  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-(39 rows)
 
 -- No. R-2-3-3
 \o results/ut-R.tmpout
@@ -3764,69 +3614,68 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                           QUERY PLAN                                           
 -----------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (t1.c1 = t4.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                Join Filter: (t1.c1 = t3.c1)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (t1.c1 = t2.c1)
-                     ->  Nested Loop  (cost=xxx rows=6 width=xxx)
-                           ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=6 width=xxx)
+                           ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r3  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r3  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: t2.c1
-                           ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+                           ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-               ->  Tid Scan on t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-         ->  Tid Scan on t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
  
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (t1.c1 = t4.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                Join Filter: (t1.c1 = t3.c1)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (t1.c1 = t2.c1)
-                     ->  Nested Loop  (cost=xxx rows=6 width=xxx)
-                           ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=6 width=xxx)
+                           ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r3  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r3  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: t2.c1
-                           ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+                           ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-               ->  Tid Scan on t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-         ->  Tid Scan on t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
  
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (t1.c1 = t4.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                Join Filter: (t1.c1 = t3.c1)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (t1.c1 = t2.c1)
-                     ->  Nested Loop  (cost=xxx rows=6 width=xxx)
-                           ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=6 width=xxx)
+                           ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r3  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r3  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: t2.c1
-                           ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+                           ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-               ->  Tid Scan on t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-         ->  Tid Scan on t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-(65 rows)
 
 \o results/ut-R.tmpout
 /*+
@@ -3874,63 +3723,62 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                    QUERY PLAN                                    
 ---------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
          Join Filter: (t1.c1 = t4.c1)
-         ->  Tid Scan on t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-         ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                Join Filter: (t1.c1 = t3.c1)
-               ->  Tid Scan on t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-               ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+               ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                      Join Filter: (t1.c1 = t2.c1)
-                     ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
                            Filter: (ctid = '(1,1)'::tid)
-                     ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-                           ->  Tid Scan on t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+                           ->  Tid Scan on t1  (cost=xxx..xxx rows=1 width=xxx)
                                  TID Cond: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r3  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r3  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
  
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
          Join Filter: (t1.c1 = t4.c1)
-         ->  Tid Scan on t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-         ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                Join Filter: (t1.c1 = t3.c1)
-               ->  Tid Scan on t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-               ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+               ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                      Join Filter: (t1.c1 = t2.c1)
-                     ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
                            Filter: (ctid = '(1,1)'::tid)
-                     ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-                           ->  Tid Scan on t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+                           ->  Tid Scan on t1  (cost=xxx..xxx rows=1 width=xxx)
                                  TID Cond: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r3  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r3  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
  
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
          Join Filter: (t1.c1 = t4.c1)
-         ->  Tid Scan on t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-         ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                Join Filter: (t1.c1 = t3.c1)
-               ->  Tid Scan on t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-               ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+               ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                      Join Filter: (t1.c1 = t2.c1)
-                     ->  Seq Scan on t2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t2  (cost=xxx..xxx rows=1 width=xxx)
                            Filter: (ctid = '(1,1)'::tid)
-                     ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-                           ->  Tid Scan on t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+                           ->  Tid Scan on t1  (cost=xxx..xxx rows=1 width=xxx)
                                  TID Cond: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r3  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r3  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-(59 rows)
 
 \o results/ut-R.tmpout
 /*+
@@ -3970,69 +3818,68 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                              QUERY PLAN                                             
 ----------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (b1t1.c1 = b1t4.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                Join Filter: (b1t1.c1 = b1t3.c1)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (b1t1.c1 = b1t2.c1)
-                     ->  Nested Loop  (cost=xxx rows=6 width=xxx)
-                           ->  Index Scan using t1_i1 on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=6 width=xxx)
+                           ->  Index Scan using t1_i1 on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r3_  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r3_  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: b1t2.c1
-                           ->  Seq Scan on t2 b1t2  (cost=xxx rows=1 width=xxx)
+                           ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-               ->  Tid Scan on t3 b1t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3 b1t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-         ->  Tid Scan on t4 b1t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4 b1t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
  
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (b2t1.c1 = b2t4.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                Join Filter: (b2t1.c1 = b2t3.c1)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (b2t1.c1 = b2t2.c1)
-                     ->  Nested Loop  (cost=xxx rows=6 width=xxx)
-                           ->  Index Scan using t1_i1 on t1 b2t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=6 width=xxx)
+                           ->  Index Scan using t1_i1 on t1 b2t1  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r3_  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r3_  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: b2t2.c1
-                           ->  Seq Scan on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                           ->  Seq Scan on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-               ->  Tid Scan on t3 b2t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3 b2t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-         ->  Tid Scan on t4 b2t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4 b2t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
  
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
          Join Filter: (b3t1.c1 = b3t4.c1)
-         ->  Nested Loop  (cost=xxx rows=1 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
                Join Filter: (b3t1.c1 = b3t3.c1)
-               ->  Merge Join  (cost=xxx rows=1 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1 width=xxx)
                      Merge Cond: (b3t1.c1 = b3t2.c1)
-                     ->  Nested Loop  (cost=xxx rows=6 width=xxx)
-                           ->  Index Scan using t1_i1 on t1 b3t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=6 width=xxx)
+                           ->  Index Scan using t1_i1 on t1 b3t1  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r3_  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r3_  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-                     ->  Sort  (cost=xxx rows=1 width=xxx)
+                     ->  Sort  (cost=xxx..xxx rows=1 width=xxx)
                            Sort Key: b3t2.c1
-                           ->  Seq Scan on t2 b3t2  (cost=xxx rows=1 width=xxx)
+                           ->  Seq Scan on t2 b3t2  (cost=xxx..xxx rows=1 width=xxx)
                                  Filter: (ctid = '(1,1)'::tid)
-               ->  Tid Scan on t3 b3t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3 b3t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-         ->  Tid Scan on t4 b3t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4 b3t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-(65 rows)
 
 \o results/ut-R.tmpout
 /*+
@@ -4120,63 +3967,62 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                      QUERY PLAN                                      
 -------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
          Join Filter: (b1t1.c1 = b1t4.c1)
-         ->  Tid Scan on t4 b1t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4 b1t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-         ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                Join Filter: (b1t1.c1 = b1t3.c1)
-               ->  Tid Scan on t3 b1t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3 b1t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-               ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+               ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                      Join Filter: (b1t1.c1 = b1t2.c1)
-                     ->  Seq Scan on t2 b1t2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t2 b1t2  (cost=xxx..xxx rows=1 width=xxx)
                            Filter: (ctid = '(1,1)'::tid)
-                     ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-                           ->  Tid Scan on t1 b1t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+                           ->  Tid Scan on t1 b1t1  (cost=xxx..xxx rows=1 width=xxx)
                                  TID Cond: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r3_  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r3_  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
  
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
          Join Filter: (b2t1.c1 = b2t4.c1)
-         ->  Tid Scan on t4 b2t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4 b2t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-         ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                Join Filter: (b2t1.c1 = b2t3.c1)
-               ->  Tid Scan on t3 b2t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3 b2t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-               ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+               ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                      Join Filter: (b2t1.c1 = b2t2.c1)
-                     ->  Seq Scan on t2 b2t2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t2 b2t2  (cost=xxx..xxx rows=1 width=xxx)
                            Filter: (ctid = '(1,1)'::tid)
-                     ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-                           ->  Tid Scan on t1 b2t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+                           ->  Tid Scan on t1 b2t1  (cost=xxx..xxx rows=1 width=xxx)
                                  TID Cond: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r3_  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r3_  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
  
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
          Join Filter: (b3t1.c1 = b3t4.c1)
-         ->  Tid Scan on t4 b3t4  (cost=xxx rows=1 width=xxx)
+         ->  Tid Scan on t4 b3t4  (cost=xxx..xxx rows=1 width=xxx)
                TID Cond: (ctid = '(1,1)'::tid)
-         ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+         ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                Join Filter: (b3t1.c1 = b3t3.c1)
-               ->  Tid Scan on t3 b3t3  (cost=xxx rows=1 width=xxx)
+               ->  Tid Scan on t3 b3t3  (cost=xxx..xxx rows=1 width=xxx)
                      TID Cond: (ctid = '(1,1)'::tid)
-               ->  Nested Loop  (cost=xxx rows=2 width=xxx)
+               ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
                      Join Filter: (b3t1.c1 = b3t2.c1)
-                     ->  Seq Scan on t2 b3t2  (cost=xxx rows=1 width=xxx)
+                     ->  Seq Scan on t2 b3t2  (cost=xxx..xxx rows=1 width=xxx)
                            Filter: (ctid = '(1,1)'::tid)
-                     ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-                           ->  Tid Scan on t1 b3t1  (cost=xxx rows=1 width=xxx)
+                     ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+                           ->  Tid Scan on t1 b3t1  (cost=xxx..xxx rows=1 width=xxx)
                                  TID Cond: (ctid = '(1,1)'::tid)
-                           ->  Seq Scan on r3_  (cost=xxx rows=6 width=xxx)
+                           ->  Seq Scan on r3_  (cost=xxx..xxx rows=6 width=xxx)
                                  Filter: (c1 = 1)
-(59 rows)
 
 -- No. R-2-3-4
 \o results/ut-R.tmpout
@@ -4195,12 +4041,11 @@ HashJoin(v1t1 v1t1)
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                
 --------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1000 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1000 width=xxx)
    Hash Cond: (v1t1.c1 = v1t1_1.c1)
-   ->  Seq Scan on t1 v1t1  (cost=xxx rows=1000 width=xxx)
-   ->  Hash  (cost=xxx rows=1000 width=xxx)
-         ->  Seq Scan on t1 v1t1_1  (cost=xxx rows=1000 width=xxx)
-(6 rows)
+   ->  Seq Scan on t1 v1t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+         ->  Seq Scan on t1 v1t1_1  (cost=xxx..xxx rows=1000 width=xxx)
 
 \o results/ut-R.tmpout
 /*+HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)*/
@@ -4221,12 +4066,11 @@ Rows(v1t1 v1t1 #1)
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                
 --------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1000 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1000 width=xxx)
    Hash Cond: (v1t1.c1 = v1t1_1.c1)
-   ->  Seq Scan on t1 v1t1  (cost=xxx rows=1000 width=xxx)
-   ->  Hash  (cost=xxx rows=1000 width=xxx)
-         ->  Seq Scan on t1 v1t1_1  (cost=xxx rows=1000 width=xxx)
-(6 rows)
+   ->  Seq Scan on t1 v1t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+         ->  Seq Scan on t1 v1t1_1  (cost=xxx..xxx rows=1000 width=xxx)
 
 -- No. R-2-3-5
 \o results/ut-R.tmpout
@@ -4243,11 +4087,10 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                  QUERY PLAN                                  
 -----------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1000 width=xxx)
-   ->  Seq Scan on t1 v1t1  (cost=xxx rows=1000 width=xxx)
-   ->  Index Scan using t1_i1 on t1 v1t1_  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Seq Scan on t1 v1t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Index Scan using t1_i1 on t1 v1t1_  (cost=xxx..xxx rows=1 width=xxx)
          Index Cond: (c1 = v1t1.c1)
-(5 rows)
 
 \o results/ut-R.tmpout
 /*+NestLoop(v1t1 v1t1_)Rows(v1t1 v1t1_ #1)*/
@@ -4264,11 +4107,10 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                  QUERY PLAN                                  
 -----------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
-   ->  Seq Scan on t1 v1t1  (cost=xxx rows=1000 width=xxx)
-   ->  Index Scan using t1_i1 on t1 v1t1_  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Seq Scan on t1 v1t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Index Scan using t1_i1 on t1 v1t1_  (cost=xxx..xxx rows=1 width=xxx)
          Index Cond: (c1 = v1t1.c1)
-(5 rows)
 
 -- No. R-2-3-6
 \o results/ut-R.tmpout
@@ -4280,12 +4122,11 @@ DETAIL:  Unrecognized hint keyword "RowsHashJoin".
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                
 --------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1000 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1000 width=xxx)
    Hash Cond: (r4t1.c1 = r4t1_1.c1)
-   ->  Seq Scan on t1 r4t1  (cost=xxx rows=1000 width=xxx)
-   ->  Hash  (cost=xxx rows=1000 width=xxx)
-         ->  Seq Scan on t1 r4t1_1  (cost=xxx rows=1000 width=xxx)
-(6 rows)
+   ->  Seq Scan on t1 r4t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+         ->  Seq Scan on t1 r4t1_1  (cost=xxx..xxx rows=1000 width=xxx)
 
 \o results/ut-R.tmpout
 /*+RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)*/
@@ -4296,12 +4137,11 @@ DETAIL:  Unrecognized hint keyword "RowsHashJoin".
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                
 --------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1000 width=xxx)
+ Hash Join  (cost=xxx..xxx rows=1000 width=xxx)
    Hash Cond: (r4t1.c1 = r4t1_1.c1)
-   ->  Seq Scan on t1 r4t1  (cost=xxx rows=1000 width=xxx)
-   ->  Hash  (cost=xxx rows=1000 width=xxx)
-         ->  Seq Scan on t1 r4t1_1  (cost=xxx rows=1000 width=xxx)
-(6 rows)
+   ->  Seq Scan on t1 r4t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=1000 width=xxx)
+         ->  Seq Scan on t1 r4t1_1  (cost=xxx..xxx rows=1000 width=xxx)
 
 -- No. R-2-3-7
 \o results/ut-R.tmpout
@@ -4318,11 +4158,10 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                  QUERY PLAN                                 
 ----------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1000 width=xxx)
-   ->  Seq Scan on t1 r4t1  (cost=xxx rows=1000 width=xxx)
-   ->  Index Scan using t1_i1 on t1 r5t1  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Seq Scan on t1 r4t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Index Scan using t1_i1 on t1 r5t1  (cost=xxx..xxx rows=1 width=xxx)
          Index Cond: (c1 = r4t1.c1)
-(5 rows)
 
 \o results/ut-R.tmpout
 /*+NestLoop(r4t1 r5t1)Rows(r4t1 r5t1 #1)*/
@@ -4339,35 +4178,33 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                  QUERY PLAN                                 
 ----------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
-   ->  Seq Scan on t1 r4t1  (cost=xxx rows=1000 width=xxx)
-   ->  Index Scan using t1_i1 on t1 r5t1  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Seq Scan on t1 r4t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Index Scan using t1_i1 on t1 r5t1  (cost=xxx..xxx rows=1 width=xxx)
          Index Cond: (c1 = r4t1.c1)
-(5 rows)
 
 ----
 ---- No. R-2-4 VALUES clause
 ----
 -- No. R-2-4-1
 \o results/ut-R.tmpout
-EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
+EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
 \o
 \! sql/maskout.sh results/ut-R.tmpout
                                    QUERY PLAN                                   
 --------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
-   ->  Hash Join  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Hash Join  (cost=xxx..xxx rows=2 width=xxx)
          Hash Cond: (t2.c1 = "*VALUES*".column1)
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-         ->  Hash  (cost=xxx rows=1 width=xxx)
-               ->  Values Scan on "*VALUES*"  (cost=xxx rows=1 width=xxx)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Hash  (cost=xxx..xxx rows=2 width=xxx)
+               ->  Values Scan on "*VALUES*"  (cost=xxx..xxx rows=2 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
          Index Cond: (c1 = t2.c1)
-(9 rows)
 
 \o results/ut-R.tmpout
 /*+ Leading(t3 t1 t2) Rows(t3 t1 #2)Rows(t3 t1 t2 #2)*/
-EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
+EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
 LOG:  pg_hint_plan:
 used hint:
 not used hint:
@@ -4381,19 +4218,18 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                    QUERY PLAN                                   
 --------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
-   ->  Hash Join  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Hash Join  (cost=xxx..xxx rows=2 width=xxx)
          Hash Cond: (t2.c1 = "*VALUES*".column1)
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-         ->  Hash  (cost=xxx rows=1 width=xxx)
-               ->  Values Scan on "*VALUES*"  (cost=xxx rows=1 width=xxx)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Hash  (cost=xxx..xxx rows=2 width=xxx)
+               ->  Values Scan on "*VALUES*"  (cost=xxx..xxx rows=2 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
          Index Cond: (c1 = t2.c1)
-(9 rows)
 
 \o results/ut-R.tmpout
 /*+ Leading(*VALUES* t1 t2) Rows(*VALUES* t1 #2)Rows(*VALUES* t1 t2 #20)*/
-EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
+EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
 LOG:  pg_hint_plan:
 used hint:
 Leading(*VALUES* t1 t2)
@@ -4407,38 +4243,37 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                  QUERY PLAN                                  
 -----------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=20 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=2 width=xxx)
-         ->  Values Scan on "*VALUES*"  (cost=xxx rows=1 width=xxx)
-         ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=20 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=2 width=xxx)
+         ->  Values Scan on "*VALUES*"  (cost=xxx..xxx rows=2 width=xxx)
+         ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
                Index Cond: (c1 = "*VALUES*".column1)
-   ->  Index Scan using t2_i1 on t2  (cost=xxx rows=1 width=xxx)
+   ->  Index Scan using t2_i1 on t2  (cost=xxx..xxx rows=1 width=xxx)
          Index Cond: (c1 = t1.c1)
-(8 rows)
 
 -- No. R-2-4-2
 \o results/ut-R.tmpout
-EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
+EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
 \o
 \! sql/maskout.sh results/ut-R.tmpout
                                       QUERY PLAN                                      
 --------------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
-   Join Filter: (t1.c1 = "*VALUES*_1".column1)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-         ->  Hash Join  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+         Join Filter: (t2.c1 = "*VALUES*_1".column1)
+         ->  Hash Join  (cost=xxx..xxx rows=2 width=xxx)
                Hash Cond: (t2.c1 = "*VALUES*".column1)
-               ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-               ->  Hash  (cost=xxx rows=1 width=xxx)
-                     ->  Values Scan on "*VALUES*"  (cost=xxx rows=1 width=xxx)
-         ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = t2.c1)
-   ->  Values Scan on "*VALUES*_1"  (cost=xxx rows=2 width=xxx)
-(12 rows)
+               ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=2 width=xxx)
+                     ->  Values Scan on "*VALUES*"  (cost=xxx..xxx rows=2 width=xxx)
+         ->  Materialize  (cost=xxx..xxx rows=2 width=xxx)
+               ->  Values Scan on "*VALUES*_1"  (cost=xxx..xxx rows=2 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = t2.c1)
 
 \o results/ut-R.tmpout
 /*+ Leading(t4 t3 t2 t1) Rows(t4 t3 #2) Rows(t4 t3 t2 #2)Rows(t4 t3 t2 t1 #2)*/
-EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
+EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
 LOG:  pg_hint_plan:
 used hint:
 not used hint:
@@ -4453,22 +4288,22 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                       QUERY PLAN                                      
 --------------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
-   Join Filter: (t1.c1 = "*VALUES*_1".column1)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-         ->  Hash Join  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+         Join Filter: (t2.c1 = "*VALUES*_1".column1)
+         ->  Hash Join  (cost=xxx..xxx rows=2 width=xxx)
                Hash Cond: (t2.c1 = "*VALUES*".column1)
-               ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-               ->  Hash  (cost=xxx rows=1 width=xxx)
-                     ->  Values Scan on "*VALUES*"  (cost=xxx rows=1 width=xxx)
-         ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = t2.c1)
-   ->  Values Scan on "*VALUES*_1"  (cost=xxx rows=2 width=xxx)
-(12 rows)
+               ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=2 width=xxx)
+                     ->  Values Scan on "*VALUES*"  (cost=xxx..xxx rows=2 width=xxx)
+         ->  Materialize  (cost=xxx..xxx rows=2 width=xxx)
+               ->  Values Scan on "*VALUES*_1"  (cost=xxx..xxx rows=2 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = t2.c1)
 
 \o results/ut-R.tmpout
 /*+ Leading(*VALUES* t3 t2 t1) Rows(t4 t3 #2)Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)*/
-EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
+EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
 INFO:  pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)"
 DETAIL:  Relation name "*VALUES*" is ambiguous.
 INFO:  pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 t1 #2)"
@@ -4489,18 +4324,18 @@ Rows(*VALUES* t1 t2 t3 #2)
 \! sql/maskout.sh results/ut-R.tmpout
                                       QUERY PLAN                                      
 --------------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=1 width=xxx)
-   Join Filter: (t1.c1 = "*VALUES*_1".column1)
-   ->  Nested Loop  (cost=xxx rows=1 width=xxx)
-         ->  Hash Join  (cost=xxx rows=1 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=1 width=xxx)
+         Join Filter: (t2.c1 = "*VALUES*_1".column1)
+         ->  Hash Join  (cost=xxx..xxx rows=2 width=xxx)
                Hash Cond: (t2.c1 = "*VALUES*".column1)
-               ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-               ->  Hash  (cost=xxx rows=1 width=xxx)
-                     ->  Values Scan on "*VALUES*"  (cost=xxx rows=1 width=xxx)
-         ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = t2.c1)
-   ->  Values Scan on "*VALUES*_1"  (cost=xxx rows=2 width=xxx)
-(12 rows)
+               ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=2 width=xxx)
+                     ->  Values Scan on "*VALUES*"  (cost=xxx..xxx rows=2 width=xxx)
+         ->  Materialize  (cost=xxx..xxx rows=2 width=xxx)
+               ->  Values Scan on "*VALUES*_1"  (cost=xxx..xxx rows=2 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = t2.c1)
 
 ----
 ---- No. R-2-5
@@ -4512,21 +4347,19 @@ EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sb
 \! sql/maskout.sh results/ut-R.tmpout
                                               QUERY PLAN                                              
 ------------------------------------------------------------------------------------------------------
- Aggregate  (cost=xxx rows=1 width=xxx)
-   ->  Nested Loop  (cost=xxx rows=100 width=xxx)
-         Join Filter: (bmt1.c1 = bmt4.c1)
-         ->  Merge Join  (cost=xxx rows=100 width=xxx)
+ Aggregate  (cost=xxx..xxx rows=1 width=xxx)
+   ->  Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
                Merge Cond: (bmt1.c1 = bmt2.c1)
-               ->  Merge Join  (cost=xxx rows=1000 width=xxx)
+               ->  Merge Join  (cost=xxx..xxx rows=1000 width=xxx)
                      Merge Cond: (bmt1.c1 = bmt3.c1)
-                     ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-                     ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-               ->  Sort  (cost=xxx rows=100 width=xxx)
+                     ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+                     ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                      Sort Key: bmt2.c1
-                     ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-               Index Cond: (c1 = bmt3.c1)
-(15 rows)
+                     ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+         ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+               Index Cond: (c1 = bmt1.c1)
 
 \o results/ut-R.tmpout
 /*+
@@ -4546,21 +4379,20 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                        QUERY PLAN                                        
 -----------------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=70 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=70 width=xxx)
    Merge Cond: (bmt1.c1 = bmt2.c1)
-   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: bmt2.c1
-         ->  Hash Join  (cost=xxx rows=100 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                Hash Cond: (bmt3.c1 = bmt2.c1)
-               ->  Hash Join  (cost=xxx rows=1100 width=xxx)
+               ->  Hash Join  (cost=xxx..xxx rows=1130 width=xxx)
                      Hash Cond: (bmt3.c1 = bmt4.c1)
-                     ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                     ->  Hash  (cost=xxx rows=1100 width=xxx)
-                           ->  Seq Scan on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=100 width=xxx)
-                     ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-(15 rows)
+                     ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+                     ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                           ->  Seq Scan on t4 bmt4  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                     ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-2-5-2
 \o results/ut-R.tmpout
@@ -4569,20 +4401,18 @@ EXPLAIN SELECT bmt1.c1 FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2,
 \! sql/maskout.sh results/ut-R.tmpout
                                            QUERY PLAN                                           
 ------------------------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=100 width=xxx)
-   Join Filter: (bmt1.c1 = bmt4.c1)
-   ->  Merge Join  (cost=xxx rows=100 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
          Merge Cond: (bmt1.c1 = bmt2.c1)
-         ->  Merge Join  (cost=xxx rows=1000 width=xxx)
+         ->  Merge Join  (cost=xxx..xxx rows=1000 width=xxx)
                Merge Cond: (bmt1.c1 = bmt3.c1)
-               ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-               ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-         ->  Sort  (cost=xxx rows=100 width=xxx)
+               ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+               ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+         ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                Sort Key: bmt2.c1
-               ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-   ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-         Index Cond: (c1 = bmt3.c1)
-(14 rows)
+               ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = bmt1.c1)
 
 \o results/ut-R.tmpout
 /*+
@@ -4602,21 +4432,20 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                        QUERY PLAN                                        
 -----------------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=60 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=60 width=xxx)
    Merge Cond: (bmt1.c1 = bmt2.c1)
-   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=60 width=xxx)
+   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=60 width=xxx)
          Sort Key: bmt2.c1
-         ->  Hash Join  (cost=xxx rows=60 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=60 width=xxx)
                Hash Cond: (bmt3.c1 = bmt2.c1)
-               ->  Hash Join  (cost=xxx rows=660 width=xxx)
+               ->  Hash Join  (cost=xxx..xxx rows=678 width=xxx)
                      Hash Cond: (bmt3.c1 = bmt4.c1)
-                     ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                     ->  Hash  (cost=xxx rows=1100 width=xxx)
-                           ->  Seq Scan on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=100 width=xxx)
-                     ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-(15 rows)
+                     ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+                     ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                           ->  Seq Scan on t4 bmt4  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                     ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-2-5-3
 \o results/ut-R.tmpout
@@ -4625,20 +4454,18 @@ EXPLAIN SELECT bmt1.c1 FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2,
 \! sql/maskout.sh results/ut-R.tmpout
                                            QUERY PLAN                                           
 ------------------------------------------------------------------------------------------------
- Nested Loop  (cost=xxx rows=100 width=xxx)
-   Join Filter: (bmt1.c1 = bmt4.c1)
-   ->  Merge Join  (cost=xxx rows=100 width=xxx)
+ Nested Loop  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Merge Join  (cost=xxx..xxx rows=100 width=xxx)
          Merge Cond: (bmt1.c1 = bmt2.c1)
-         ->  Merge Join  (cost=xxx rows=1000 width=xxx)
+         ->  Merge Join  (cost=xxx..xxx rows=1000 width=xxx)
                Merge Cond: (bmt1.c1 = bmt3.c1)
-               ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-               ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-         ->  Sort  (cost=xxx rows=100 width=xxx)
+               ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+               ->  Index Only Scan using t3_i1 on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+         ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
                Sort Key: bmt2.c1
-               ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-   ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx rows=1 width=xxx)
-         Index Cond: (c1 = bmt3.c1)
-(14 rows)
+               ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
+   ->  Index Only Scan using t4_i1 on t4 bmt4  (cost=xxx..xxx rows=1 width=xxx)
+         Index Cond: (c1 = bmt1.c1)
 
 \o results/ut-R.tmpout
 /*+
@@ -4658,21 +4485,20 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                        QUERY PLAN                                        
 -----------------------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=50 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=50 width=xxx)
    Merge Cond: (bmt1.c1 = bmt2.c1)
-   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Only Scan using t1_i1 on t1 bmt1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: bmt2.c1
-         ->  Hash Join  (cost=xxx rows=100 width=xxx)
+         ->  Hash Join  (cost=xxx..xxx rows=100 width=xxx)
                Hash Cond: (bmt3.c1 = bmt2.c1)
-               ->  Hash Join  (cost=xxx rows=1100 width=xxx)
+               ->  Hash Join  (cost=xxx..xxx rows=1130 width=xxx)
                      Hash Cond: (bmt3.c1 = bmt4.c1)
-                     ->  Seq Scan on t3 bmt3  (cost=xxx rows=1100 width=xxx)
-                     ->  Hash  (cost=xxx rows=1100 width=xxx)
-                           ->  Seq Scan on t4 bmt4  (cost=xxx rows=1100 width=xxx)
-               ->  Hash  (cost=xxx rows=100 width=xxx)
-                     ->  Seq Scan on t2 bmt2  (cost=xxx rows=100 width=xxx)
-(15 rows)
+                     ->  Seq Scan on t3 bmt3  (cost=xxx..xxx rows=1130 width=xxx)
+                     ->  Hash  (cost=xxx..xxx rows=1130 width=xxx)
+                           ->  Seq Scan on t4 bmt4  (cost=xxx..xxx rows=1130 width=xxx)
+               ->  Hash  (cost=xxx..xxx rows=100 width=xxx)
+                     ->  Seq Scan on t2 bmt2  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-3-1 abusolute value
@@ -4693,13 +4519,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-3-1-2
 \o results/ut-R.tmpout
@@ -4716,13 +4541,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=5 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=5 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-3-2 increase or decrease value
@@ -4742,13 +4566,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=101 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=101 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-3-2-2
 \o results/ut-R.tmpout
@@ -4765,13 +4588,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=99 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=99 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-3-2-3
 \o results/ut-R.tmpout
@@ -4789,13 +4611,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-3-3 multiple 
@@ -4816,13 +4637,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-3-3-2
 \o results/ut-R.tmpout
@@ -4839,13 +4659,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=200 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=200 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-3-3-3
 \o results/ut-R.tmpout
@@ -4862,13 +4681,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=10 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=10 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-3-4 join inherit tables
@@ -4878,28 +4696,27 @@ error hint:
 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                               QUERY PLAN                                
--------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=301 width=xxx)
+                                  QUERY PLAN                                  
+------------------------------------------------------------------------------
+ Hash Join  (cost=xxx..xxx rows=301 width=xxx)
    Hash Cond: (p2.c1 = p1.c1)
-   ->  Append  (cost=xxx rows=304 width=xxx)
-         ->  Seq Scan on p2  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c1  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c2  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c3  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c1c1  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c1c2  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c2c1  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c2c2  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c3c1  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c3c2  (cost=xxx rows=50 width=xxx)
-   ->  Hash  (cost=xxx rows=301 width=xxx)
-         ->  Append  (cost=xxx rows=301 width=xxx)
-               ->  Seq Scan on p1  (cost=xxx rows=1 width=xxx)
-               ->  Seq Scan on p1c1  (cost=xxx rows=100 width=xxx)
-               ->  Seq Scan on p1c2  (cost=xxx rows=100 width=xxx)
-               ->  Seq Scan on p1c3  (cost=xxx rows=100 width=xxx)
-(20 rows)
+   ->  Append  (cost=xxx..xxx rows=304 width=xxx)
+         ->  Seq Scan on p2 p2_1  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c1 p2_2  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c2 p2_3  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c3 p2_4  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c1c1 p2_5  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c1c2 p2_6  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c2c1 p2_7  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c2c2 p2_8  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c3c1 p2_9  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c3c2 p2_10  (cost=xxx..xxx rows=50 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=301 width=xxx)
+         ->  Append  (cost=xxx..xxx rows=301 width=xxx)
+               ->  Seq Scan on p1 p1_1  (cost=xxx..xxx rows=1 width=xxx)
+               ->  Seq Scan on p1c1 p1_2  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Seq Scan on p1c2 p1_3  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Seq Scan on p1c3 p1_4  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(p1 p2 #1)*/
@@ -4913,56 +4730,54 @@ error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                               QUERY PLAN                                
--------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=1 width=xxx)
+                                  QUERY PLAN                                  
+------------------------------------------------------------------------------
+ Hash Join  (cost=xxx..xxx rows=1 width=xxx)
    Hash Cond: (p2.c1 = p1.c1)
-   ->  Append  (cost=xxx rows=304 width=xxx)
-         ->  Seq Scan on p2  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c1  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c2  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c3  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c1c1  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c1c2  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c2c1  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c2c2  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c3c1  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c3c2  (cost=xxx rows=50 width=xxx)
-   ->  Hash  (cost=xxx rows=301 width=xxx)
-         ->  Append  (cost=xxx rows=301 width=xxx)
-               ->  Seq Scan on p1  (cost=xxx rows=1 width=xxx)
-               ->  Seq Scan on p1c1  (cost=xxx rows=100 width=xxx)
-               ->  Seq Scan on p1c2  (cost=xxx rows=100 width=xxx)
-               ->  Seq Scan on p1c3  (cost=xxx rows=100 width=xxx)
-(20 rows)
+   ->  Append  (cost=xxx..xxx rows=304 width=xxx)
+         ->  Seq Scan on p2 p2_1  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c1 p2_2  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c2 p2_3  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c3 p2_4  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c1c1 p2_5  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c1c2 p2_6  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c2c1 p2_7  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c2c2 p2_8  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c3c1 p2_9  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c3c2 p2_10  (cost=xxx..xxx rows=50 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=301 width=xxx)
+         ->  Append  (cost=xxx..xxx rows=301 width=xxx)
+               ->  Seq Scan on p1 p1_1  (cost=xxx..xxx rows=1 width=xxx)
+               ->  Seq Scan on p1c1 p1_2  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Seq Scan on p1c2 p1_3  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Seq Scan on p1c3 p1_4  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-3-4-2
 \o results/ut-R.tmpout
 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                               QUERY PLAN                                
--------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=301 width=xxx)
+                                  QUERY PLAN                                  
+------------------------------------------------------------------------------
+ Hash Join  (cost=xxx..xxx rows=301 width=xxx)
    Hash Cond: (p2.c1 = p1.c1)
-   ->  Append  (cost=xxx rows=304 width=xxx)
-         ->  Seq Scan on p2  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c1  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c2  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c3  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c1c1  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c1c2  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c2c1  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c2c2  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c3c1  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c3c2  (cost=xxx rows=50 width=xxx)
-   ->  Hash  (cost=xxx rows=301 width=xxx)
-         ->  Append  (cost=xxx rows=301 width=xxx)
-               ->  Seq Scan on p1  (cost=xxx rows=1 width=xxx)
-               ->  Seq Scan on p1c1  (cost=xxx rows=100 width=xxx)
-               ->  Seq Scan on p1c2  (cost=xxx rows=100 width=xxx)
-               ->  Seq Scan on p1c3  (cost=xxx rows=100 width=xxx)
-(20 rows)
+   ->  Append  (cost=xxx..xxx rows=304 width=xxx)
+         ->  Seq Scan on p2 p2_1  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c1 p2_2  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c2 p2_3  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c3 p2_4  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c1c1 p2_5  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c1c2 p2_6  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c2c1 p2_7  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c2c2 p2_8  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c3c1 p2_9  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c3c2 p2_10  (cost=xxx..xxx rows=50 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=301 width=xxx)
+         ->  Append  (cost=xxx..xxx rows=301 width=xxx)
+               ->  Seq Scan on p1 p1_1  (cost=xxx..xxx rows=1 width=xxx)
+               ->  Seq Scan on p1c1 p1_2  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Seq Scan on p1c2 p1_3  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Seq Scan on p1c3 p1_4  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(p1c1 p2c1 #1)*/
@@ -4976,28 +4791,27 @@ error hint:
 
 \o
 \! sql/maskout.sh results/ut-R.tmpout
-                               QUERY PLAN                                
--------------------------------------------------------------------------
- Hash Join  (cost=xxx rows=301 width=xxx)
+                                  QUERY PLAN                                  
+------------------------------------------------------------------------------
+ Hash Join  (cost=xxx..xxx rows=301 width=xxx)
    Hash Cond: (p2.c1 = p1.c1)
-   ->  Append  (cost=xxx rows=304 width=xxx)
-         ->  Seq Scan on p2  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c1  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c2  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c3  (cost=xxx rows=1 width=xxx)
-         ->  Seq Scan on p2c1c1  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c1c2  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c2c1  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c2c2  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c3c1  (cost=xxx rows=50 width=xxx)
-         ->  Seq Scan on p2c3c2  (cost=xxx rows=50 width=xxx)
-   ->  Hash  (cost=xxx rows=301 width=xxx)
-         ->  Append  (cost=xxx rows=301 width=xxx)
-               ->  Seq Scan on p1  (cost=xxx rows=1 width=xxx)
-               ->  Seq Scan on p1c1  (cost=xxx rows=100 width=xxx)
-               ->  Seq Scan on p1c2  (cost=xxx rows=100 width=xxx)
-               ->  Seq Scan on p1c3  (cost=xxx rows=100 width=xxx)
-(20 rows)
+   ->  Append  (cost=xxx..xxx rows=304 width=xxx)
+         ->  Seq Scan on p2 p2_1  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c1 p2_2  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c2 p2_3  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c3 p2_4  (cost=xxx..xxx rows=1 width=xxx)
+         ->  Seq Scan on p2c1c1 p2_5  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c1c2 p2_6  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c2c1 p2_7  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c2c2 p2_8  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c3c1 p2_9  (cost=xxx..xxx rows=50 width=xxx)
+         ->  Seq Scan on p2c3c2 p2_10  (cost=xxx..xxx rows=50 width=xxx)
+   ->  Hash  (cost=xxx..xxx rows=301 width=xxx)
+         ->  Append  (cost=xxx..xxx rows=301 width=xxx)
+               ->  Seq Scan on p1 p1_1  (cost=xxx..xxx rows=1 width=xxx)
+               ->  Seq Scan on p1c1 p1_2  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Seq Scan on p1c2 p1_3  (cost=xxx..xxx rows=100 width=xxx)
+               ->  Seq Scan on p1c3 p1_4  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-3-5 conflict join method hint
@@ -5009,13 +4823,12 @@ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)Rows(t1 t2 #1)*/
@@ -5034,13 +4847,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-3-5-2
 \o results/ut-R.tmpout
@@ -5049,13 +4861,12 @@ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)*/
@@ -5077,13 +4888,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-3-5-3
 \o results/ut-R.tmpout
@@ -5092,13 +4902,12 @@ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 #1)Rows(t2 t1 #1)*/
@@ -5117,13 +4926,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 -- No. R-3-5-4
 \o results/ut-R.tmpout
@@ -5132,13 +4940,12 @@ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)*/
@@ -5160,13 +4967,12 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=1 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=1 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 ----
 ---- No. R-3-6 hint state output
@@ -5179,13 +4985,12 @@ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=100 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=100 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 \o results/ut-R.tmpout
 /*+Rows(t1 t2 +1)*/
@@ -5202,12 +5007,11 @@ error hint:
 \! sql/maskout.sh results/ut-R.tmpout
                                 QUERY PLAN                                 
 ---------------------------------------------------------------------------
- Merge Join  (cost=xxx rows=101 width=xxx)
+ Merge Join  (cost=xxx..xxx rows=101 width=xxx)
    Merge Cond: (t1.c1 = t2.c1)
-   ->  Index Scan using t1_i1 on t1  (cost=xxx rows=1000 width=xxx)
-   ->  Sort  (cost=xxx rows=100 width=xxx)
+   ->  Index Scan using t1_i1 on t1  (cost=xxx..xxx rows=1000 width=xxx)
+   ->  Sort  (cost=xxx..xxx rows=100 width=xxx)
          Sort Key: t2.c1
-         ->  Seq Scan on t2  (cost=xxx rows=100 width=xxx)
-(7 rows)
+         ->  Seq Scan on t2  (cost=xxx..xxx rows=100 width=xxx)
 
 \! rm results/ut-R.tmpout