aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/partition_prune.out13
-rw-r--r--src/test/regress/sql/partition_prune.sql7
2 files changed, 20 insertions, 0 deletions
diff --git a/src/test/regress/expected/partition_prune.out b/src/test/regress/expected/partition_prune.out
index bcfe21f19a3..8219abc813e 100644
--- a/src/test/regress/expected/partition_prune.out
+++ b/src/test/regress/expected/partition_prune.out
@@ -3161,6 +3161,19 @@ execute mt_q1(35);
(0 rows)
deallocate mt_q1;
+prepare mt_q2 (int) as select * from ma_test where a >= $1 order by b limit 1;
+-- Ensure output list looks sane when the MergeAppend has no subplans.
+explain (verbose, costs off) execute mt_q2 (35);
+ QUERY PLAN
+--------------------------------
+ Limit
+ Output: ma_test.a, ma_test.b
+ -> Merge Append
+ Sort Key: ma_test.b
+ Subplans Removed: 3
+(5 rows)
+
+deallocate mt_q2;
-- ensure initplan params properly prune partitions
explain (analyze, costs off, summary off, timing off) select * from ma_test where a >= (select min(b) from ma_test_p2) order by b;
QUERY PLAN
diff --git a/src/test/regress/sql/partition_prune.sql b/src/test/regress/sql/partition_prune.sql
index 825dedb5f07..61ef6e637e4 100644
--- a/src/test/regress/sql/partition_prune.sql
+++ b/src/test/regress/sql/partition_prune.sql
@@ -838,6 +838,13 @@ execute mt_q1(35);
deallocate mt_q1;
+prepare mt_q2 (int) as select * from ma_test where a >= $1 order by b limit 1;
+
+-- Ensure output list looks sane when the MergeAppend has no subplans.
+explain (verbose, costs off) execute mt_q2 (35);
+
+deallocate mt_q2;
+
-- ensure initplan params properly prune partitions
explain (analyze, costs off, summary off, timing off) select * from ma_test where a >= (select min(b) from ma_test_p2) order by b;