aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtsuro Fujita <efujita@postgresql.org>2019-12-16 17:00:17 +0900
committerEtsuro Fujita <efujita@postgresql.org>2019-12-16 17:00:17 +0900
commit06b9f38d35d1426d91101c16ed9717118ebcec66 (patch)
tree23208e3d26fc59fe0405f8df0767809af0984010
parent332584da9cfdbe91a651427a9fc3ed76dffaa529 (diff)
downloadpostgresql-06b9f38d35d1426d91101c16ed9717118ebcec66.tar.gz
postgresql-06b9f38d35d1426d91101c16ed9717118ebcec66.zip
Clean up some misplaced comments in partition_join.sql regression test.
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
-rw-r--r--src/test/regress/expected/partition_join.out10
-rw-r--r--src/test/regress/sql/partition_join.sql11
2 files changed, 13 insertions, 8 deletions
diff --git a/src/test/regress/expected/partition_join.out b/src/test/regress/expected/partition_join.out
index bd0c3041c9d..8479756b8d2 100644
--- a/src/test/regress/expected/partition_join.out
+++ b/src/test/regress/expected/partition_join.out
@@ -1857,8 +1857,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_2
(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
@@ -1874,6 +1874,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_1
(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
@@ -1896,8 +1898,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_1
(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
diff --git a/src/test/regress/sql/partition_join.sql b/src/test/regress/sql/partition_join.sql
index 5608569a70e..0d9280435ad 100644
--- a/src/test/regress/sql/partition_join.sql
+++ b/src/test/regress/sql/partition_join.sql
@@ -394,14 +394,17 @@ 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);