Skip to content

Commit b33ef39

Browse files
committed
Fix print of Path nodes when using OPTIMIZER_DEBUG
GatherMergePath (introduced in 10) and CustomPath (introduced in 9.5) have gone missing. The order of the Path nodes was inconsistent with what is listed in nodes.h, so make the order consistent at the same time to ease future checks and additions. Author: Sawada Masahiko Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CAD21AoBQMLoc=ohH-oocuAPsELrmk8_EsRJjOyR8FQLZkbE0wA@mail.gmail.com
1 parent c6598b8 commit b33ef39

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

src/backend/optimizer/path/allpaths.c

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3689,6 +3689,21 @@ print_path(PlannerInfo *root, Path *path, int indent)
36893689
case T_ForeignPath:
36903690
ptype = "ForeignScan";
36913691
break;
3692+
case T_CustomPath:
3693+
ptype = "CustomScan";
3694+
break;
3695+
case T_NestPath:
3696+
ptype = "NestLoop";
3697+
join = true;
3698+
break;
3699+
case T_MergePath:
3700+
ptype = "MergeJoin";
3701+
join = true;
3702+
break;
3703+
case T_HashPath:
3704+
ptype = "HashJoin";
3705+
join = true;
3706+
break;
36923707
case T_AppendPath:
36933708
ptype = "Append";
36943709
break;
@@ -3710,6 +3725,10 @@ print_path(PlannerInfo *root, Path *path, int indent)
37103725
ptype = "Gather";
37113726
subpath = ((GatherPath *) path)->subpath;
37123727
break;
3728+
case T_GatherMergePath:
3729+
ptype = "GatherMerge";
3730+
subpath = ((GatherMergePath *) path)->subpath;
3731+
break;
37133732
case T_ProjectionPath:
37143733
ptype = "Projection";
37153734
subpath = ((ProjectionPath *) path)->subpath;
@@ -3763,18 +3782,6 @@ print_path(PlannerInfo *root, Path *path, int indent)
37633782
ptype = "Limit";
37643783
subpath = ((LimitPath *) path)->subpath;
37653784
break;
3766-
case T_NestPath:
3767-
ptype = "NestLoop";
3768-
join = true;
3769-
break;
3770-
case T_MergePath:
3771-
ptype = "MergeJoin";
3772-
join = true;
3773-
break;
3774-
case T_HashPath:
3775-
ptype = "HashJoin";
3776-
join = true;
3777-
break;
37783785
default:
37793786
ptype = "???Path";
37803787
break;

0 commit comments

Comments
 (0)