diff --git a/src/test/regress/expected/partition_prune.out b/src/test/regress/expected/partition_prune.out index bcfe21f19a..8219abc813 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 825dedb5f0..61ef6e637e 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;