Skip to content

Commit 164ed15

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 75459bc commit 164ed15

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/backend/optimizer/path/allpaths.c

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2958,6 +2958,21 @@ print_path(PlannerInfo *root, Path *path, int indent)
29582958
case T_ForeignPath:
29592959
ptype = "ForeignScan";
29602960
break;
2961+
case T_CustomPath:
2962+
ptype = "CustomScan";
2963+
break;
2964+
case T_NestPath:
2965+
ptype = "NestLoop";
2966+
join = true;
2967+
break;
2968+
case T_MergePath:
2969+
ptype = "MergeJoin";
2970+
join = true;
2971+
break;
2972+
case T_HashPath:
2973+
ptype = "HashJoin";
2974+
join = true;
2975+
break;
29612976
case T_AppendPath:
29622977
ptype = "Append";
29632978
break;
@@ -3028,18 +3043,6 @@ print_path(PlannerInfo *root, Path *path, int indent)
30283043
ptype = "Limit";
30293044
subpath = ((LimitPath *) path)->subpath;
30303045
break;
3031-
case T_NestPath:
3032-
ptype = "NestLoop";
3033-
join = true;
3034-
break;
3035-
case T_MergePath:
3036-
ptype = "MergeJoin";
3037-
join = true;
3038-
break;
3039-
case T_HashPath:
3040-
ptype = "HashJoin";
3041-
join = true;
3042-
break;
30433046
default:
30443047
ptype = "???Path";
30453048
break;

0 commit comments

Comments
 (0)