Skip to content

Commit 8ccd9e8

Browse files
authored
Merge pull request #258 from postgrespro/PGPRO-4997
[PGPRO-4997] Integrated two vanilla commits for EXPLAIN correction (v…
2 parents af25d1a + a9e82f4 commit 8ccd9e8

28 files changed

+5916
-482
lines changed

Diff for: expected/pathman_array_qual_2.out

+2,398
Large diffs are not rendered by default.

Diff for: expected/pathman_basic_2.out

+182-182
Large diffs are not rendered by default.

Diff for: expected/pathman_calamity_2.out

+24-24
Original file line numberDiff line numberDiff line change
@@ -603,25 +603,25 @@ NOTICE: merging column "val" with inherited definition
603603
SELECT add_to_pathman_config('calamity.part_test', 'val');
604604
ERROR: constraint "pathman_wrong_partition_check" of partition "wrong_partition" does not exist
605605
EXPLAIN (COSTS OFF) SELECT * FROM calamity.part_ok; /* check that pathman is enabled */
606-
QUERY PLAN
607-
-----------------------------
606+
QUERY PLAN
607+
---------------------------------------
608608
Append
609-
-> Seq Scan on part_ok_0
610-
-> Seq Scan on part_ok_1
611-
-> Seq Scan on part_ok_2
612-
-> Seq Scan on part_ok_3
609+
-> Seq Scan on part_ok_0 part_ok_1
610+
-> Seq Scan on part_ok_1 part_ok_2
611+
-> Seq Scan on part_ok_2 part_ok_3
612+
-> Seq Scan on part_ok_3 part_ok_4
613613
(5 rows)
614614

615615
SELECT add_to_pathman_config('calamity.part_test', 'val', '10');
616616
ERROR: constraint "pathman_wrong_partition_check" of partition "wrong_partition" does not exist
617617
EXPLAIN (COSTS OFF) SELECT * FROM calamity.part_ok; /* check that pathman is enabled */
618-
QUERY PLAN
619-
-----------------------------
618+
QUERY PLAN
619+
---------------------------------------
620620
Append
621-
-> Seq Scan on part_ok_0
622-
-> Seq Scan on part_ok_1
623-
-> Seq Scan on part_ok_2
624-
-> Seq Scan on part_ok_3
621+
-> Seq Scan on part_ok_0 part_ok_1
622+
-> Seq Scan on part_ok_1 part_ok_2
623+
-> Seq Scan on part_ok_2 part_ok_3
624+
-> Seq Scan on part_ok_3 part_ok_4
625625
(5 rows)
626626

627627
ALTER TABLE calamity.wrong_partition
@@ -630,13 +630,13 @@ CHECK (val = 1 OR val = 2); /* wrong constraint */
630630
SELECT add_to_pathman_config('calamity.part_test', 'val', '10');
631631
ERROR: wrong constraint format for RANGE partition "wrong_partition"
632632
EXPLAIN (COSTS OFF) SELECT * FROM calamity.part_ok; /* check that pathman is enabled */
633-
QUERY PLAN
634-
-----------------------------
633+
QUERY PLAN
634+
---------------------------------------
635635
Append
636-
-> Seq Scan on part_ok_0
637-
-> Seq Scan on part_ok_1
638-
-> Seq Scan on part_ok_2
639-
-> Seq Scan on part_ok_3
636+
-> Seq Scan on part_ok_0 part_ok_1
637+
-> Seq Scan on part_ok_1 part_ok_2
638+
-> Seq Scan on part_ok_2 part_ok_3
639+
-> Seq Scan on part_ok_3 part_ok_4
640640
(5 rows)
641641

642642
ALTER TABLE calamity.wrong_partition DROP CONSTRAINT pathman_wrong_partition_check;
@@ -646,13 +646,13 @@ CHECK (val >= 10 AND val = 2); /* wrong constraint */
646646
SELECT add_to_pathman_config('calamity.part_test', 'val', '10');
647647
ERROR: wrong constraint format for RANGE partition "wrong_partition"
648648
EXPLAIN (COSTS OFF) SELECT * FROM calamity.part_ok; /* check that pathman is enabled */
649-
QUERY PLAN
650-
-----------------------------
649+
QUERY PLAN
650+
---------------------------------------
651651
Append
652-
-> Seq Scan on part_ok_0
653-
-> Seq Scan on part_ok_1
654-
-> Seq Scan on part_ok_2
655-
-> Seq Scan on part_ok_3
652+
-> Seq Scan on part_ok_0 part_ok_1
653+
-> Seq Scan on part_ok_1 part_ok_2
654+
-> Seq Scan on part_ok_2 part_ok_3
655+
-> Seq Scan on part_ok_3 part_ok_4
656656
(5 rows)
657657

658658
ALTER TABLE calamity.wrong_partition DROP CONSTRAINT pathman_wrong_partition_check;

Diff for: expected/pathman_calamity_3.out

+24-24
Original file line numberDiff line numberDiff line change
@@ -607,25 +607,25 @@ NOTICE: merging column "val" with inherited definition
607607
SELECT add_to_pathman_config('calamity.part_test', 'val');
608608
ERROR: constraint "pathman_wrong_partition_check" of partition "wrong_partition" does not exist
609609
EXPLAIN (COSTS OFF) SELECT * FROM calamity.part_ok; /* check that pathman is enabled */
610-
QUERY PLAN
611-
-----------------------------
610+
QUERY PLAN
611+
---------------------------------------
612612
Append
613-
-> Seq Scan on part_ok_0
614-
-> Seq Scan on part_ok_1
615-
-> Seq Scan on part_ok_2
616-
-> Seq Scan on part_ok_3
613+
-> Seq Scan on part_ok_0 part_ok_1
614+
-> Seq Scan on part_ok_1 part_ok_2
615+
-> Seq Scan on part_ok_2 part_ok_3
616+
-> Seq Scan on part_ok_3 part_ok_4
617617
(5 rows)
618618

619619
SELECT add_to_pathman_config('calamity.part_test', 'val', '10');
620620
ERROR: constraint "pathman_wrong_partition_check" of partition "wrong_partition" does not exist
621621
EXPLAIN (COSTS OFF) SELECT * FROM calamity.part_ok; /* check that pathman is enabled */
622-
QUERY PLAN
623-
-----------------------------
622+
QUERY PLAN
623+
---------------------------------------
624624
Append
625-
-> Seq Scan on part_ok_0
626-
-> Seq Scan on part_ok_1
627-
-> Seq Scan on part_ok_2
628-
-> Seq Scan on part_ok_3
625+
-> Seq Scan on part_ok_0 part_ok_1
626+
-> Seq Scan on part_ok_1 part_ok_2
627+
-> Seq Scan on part_ok_2 part_ok_3
628+
-> Seq Scan on part_ok_3 part_ok_4
629629
(5 rows)
630630

631631
ALTER TABLE calamity.wrong_partition
@@ -634,13 +634,13 @@ CHECK (val = 1 OR val = 2); /* wrong constraint */
634634
SELECT add_to_pathman_config('calamity.part_test', 'val', '10');
635635
ERROR: wrong constraint format for RANGE partition "wrong_partition"
636636
EXPLAIN (COSTS OFF) SELECT * FROM calamity.part_ok; /* check that pathman is enabled */
637-
QUERY PLAN
638-
-----------------------------
637+
QUERY PLAN
638+
---------------------------------------
639639
Append
640-
-> Seq Scan on part_ok_0
641-
-> Seq Scan on part_ok_1
642-
-> Seq Scan on part_ok_2
643-
-> Seq Scan on part_ok_3
640+
-> Seq Scan on part_ok_0 part_ok_1
641+
-> Seq Scan on part_ok_1 part_ok_2
642+
-> Seq Scan on part_ok_2 part_ok_3
643+
-> Seq Scan on part_ok_3 part_ok_4
644644
(5 rows)
645645

646646
ALTER TABLE calamity.wrong_partition DROP CONSTRAINT pathman_wrong_partition_check;
@@ -650,13 +650,13 @@ CHECK (val >= 10 AND val = 2); /* wrong constraint */
650650
SELECT add_to_pathman_config('calamity.part_test', 'val', '10');
651651
ERROR: wrong constraint format for RANGE partition "wrong_partition"
652652
EXPLAIN (COSTS OFF) SELECT * FROM calamity.part_ok; /* check that pathman is enabled */
653-
QUERY PLAN
654-
-----------------------------
653+
QUERY PLAN
654+
---------------------------------------
655655
Append
656-
-> Seq Scan on part_ok_0
657-
-> Seq Scan on part_ok_1
658-
-> Seq Scan on part_ok_2
659-
-> Seq Scan on part_ok_3
656+
-> Seq Scan on part_ok_0 part_ok_1
657+
-> Seq Scan on part_ok_1 part_ok_2
658+
-> Seq Scan on part_ok_2 part_ok_3
659+
-> Seq Scan on part_ok_3 part_ok_4
660660
(5 rows)
661661

662662
ALTER TABLE calamity.wrong_partition DROP CONSTRAINT pathman_wrong_partition_check;

Diff for: expected/pathman_cte_2.out

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ SELECT * FROM ttt;
2929
QUERY PLAN
3030
--------------------------------------------------------------------------------
3131
Append
32-
-> Seq Scan on range_rel_2
33-
-> Seq Scan on range_rel_3
32+
-> Seq Scan on range_rel_2 range_rel_1
33+
-> Seq Scan on range_rel_3 range_rel_2
3434
Filter: (dt < 'Sun Mar 15 00:00:00 2015'::timestamp without time zone)
3535
(4 rows)
3636

@@ -52,9 +52,9 @@ SELECT create_hash_partitions('test_cte.hash_rel', 'value', 3);
5252
EXPLAIN (COSTS OFF)
5353
WITH ttt AS (SELECT * FROM test_cte.hash_rel WHERE value = 2)
5454
SELECT * FROM ttt;
55-
QUERY PLAN
56-
------------------------
57-
Seq Scan on hash_rel_1
55+
QUERY PLAN
56+
---------------------------------
57+
Seq Scan on hash_rel_1 hash_rel
5858
Filter: (value = 2)
5959
(2 rows)
6060

0 commit comments

Comments
 (0)