Skip to content

Commit 49d506d

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 5c513db commit 49d506d

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
@@ -3282,6 +3282,21 @@ print_path(PlannerInfo *root, Path *path, int indent)
32823282
case T_ForeignPath:
32833283
ptype = "ForeignScan";
32843284
break;
3285+
case T_CustomPath:
3286+
ptype = "CustomScan";
3287+
break;
3288+
case T_NestPath:
3289+
ptype = "NestLoop";
3290+
join = true;
3291+
break;
3292+
case T_MergePath:
3293+
ptype = "MergeJoin";
3294+
join = true;
3295+
break;
3296+
case T_HashPath:
3297+
ptype = "HashJoin";
3298+
join = true;
3299+
break;
32853300
case T_AppendPath:
32863301
ptype = "Append";
32873302
break;
@@ -3303,6 +3318,10 @@ print_path(PlannerInfo *root, Path *path, int indent)
33033318
ptype = "Gather";
33043319
subpath = ((GatherPath *) path)->subpath;
33053320
break;
3321+
case T_GatherMergePath:
3322+
ptype = "GatherMerge";
3323+
subpath = ((GatherMergePath *) path)->subpath;
3324+
break;
33063325
case T_ProjectionPath:
33073326
ptype = "Projection";
33083327
subpath = ((ProjectionPath *) path)->subpath;
@@ -3356,18 +3375,6 @@ print_path(PlannerInfo *root, Path *path, int indent)
33563375
ptype = "Limit";
33573376
subpath = ((LimitPath *) path)->subpath;
33583377
break;
3359-
case T_NestPath:
3360-
ptype = "NestLoop";
3361-
join = true;
3362-
break;
3363-
case T_MergePath:
3364-
ptype = "MergeJoin";
3365-
join = true;
3366-
break;
3367-
case T_HashPath:
3368-
ptype = "HashJoin";
3369-
join = true;
3370-
break;
33713378
default:
33723379
ptype = "???Path";
33733380
break;

0 commit comments

Comments
 (0)