Clean up some misplaced comments in partition_join.sql regression test.
authorEtsuro Fujita <[email protected]>
Mon, 16 Dec 2019 08:00:15 +0000 (17:00 +0900)
committerEtsuro Fujita <[email protected]>
Mon, 16 Dec 2019 08:00:15 +0000 (17:00 +0900)
Also, add a comment explaining a test case.

Back-patch to 11 where the regression test was added.

Discussion: https://postgr.es/m/CAPmGK15adZPh2B%2BmGUjSOMH%2BH39ogDRWfCfm4G6jncZCAs9V_Q%40mail.gmail.com

src/test/regress/expected/partition_join.out
src/test/regress/sql/partition_join.sql

index 8e475bf44926a87fce558641971544deab4673ad..b3fbe47bde08357bd35ac59c1a4f3b4cb9debc94 100644 (file)
@@ -1996,8 +1996,8 @@ SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_m t1 LEFT JOIN prt2_m t2 ON t1.c = t2.c;
                ->  Seq Scan on prt2_m_p3 t2_3
 (11 rows)
 
--- partitionwise join can not be applied between tables with different
--- partition lists
+-- partitionwise join can not be applied for a join between list and range
+-- partitioned tables
 EXPLAIN (COSTS OFF)
 SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 LEFT JOIN prt2_n t2 ON (t1.c = t2.c);
                   QUERY PLAN                  
@@ -2013,6 +2013,8 @@ SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 LEFT JOIN prt2_n t2 ON (t1.c = t2.c
                ->  Seq Scan on prt1_n_p2 t1_2
 (9 rows)
 
+-- partitionwise join can not be applied between tables with different
+-- partition lists
 EXPLAIN (COSTS OFF)
 SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 JOIN prt2_n t2 ON (t1.c = t2.c) JOIN plt1 t3 ON (t1.c = t3.c);
                         QUERY PLAN                        
@@ -2035,8 +2037,8 @@ SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 JOIN prt2_n t2 ON (t1.c = t2.c) JOI
                            ->  Seq Scan on prt1_n_p2 t1_2
 (16 rows)
 
--- partitionwise join can not be applied for a join between list and range
--- partitioned tables
+-- partitionwise join can not be applied for a join between key column and
+-- non-key column
 EXPLAIN (COSTS OFF)
 SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 FULL JOIN prt1 t2 ON (t1.c = t2.c);
                   QUERY PLAN                  
index 92994b479bba982f58bc72b1b08e9d7362cdadc7..575ba7b8d4f5c93262284a5d23dc3274a6a921c1 100644 (file)
@@ -430,15 +430,18 @@ SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_m t1 LEFT JOIN prt2_m t2 ON t1.a = t2.b;
 EXPLAIN (COSTS OFF)
 SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_m t1 LEFT JOIN prt2_m t2 ON t1.c = t2.c;
 
--- partitionwise join can not be applied between tables with different
--- partition lists
+-- partitionwise join can not be applied for a join between list and range
+-- partitioned tables
 EXPLAIN (COSTS OFF)
 SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 LEFT JOIN prt2_n t2 ON (t1.c = t2.c);
+
+-- partitionwise join can not be applied between tables with different
+-- partition lists
 EXPLAIN (COSTS OFF)
 SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 JOIN prt2_n t2 ON (t1.c = t2.c) JOIN plt1 t3 ON (t1.c = t3.c);
 
--- partitionwise join can not be applied for a join between list and range
--- partitioned tables
+-- partitionwise join can not be applied for a join between key column and
+-- non-key column
 EXPLAIN (COSTS OFF)
 SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 FULL JOIN prt1 t2 ON (t1.c = t2.c);