From: Michael Paquier Date: Thu, 19 Jul 2018 00:54:39 +0000 (+0900) Subject: Fix print of Path nodes when using OPTIMIZER_DEBUG X-Git-Tag: REL_12_BETA1~1854 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b33ef397a1698ddd06f325d0f92a6643ec55577f;p=postgresql 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 --- diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 3ada379f8b..f04c30af45 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -3689,6 +3689,21 @@ print_path(PlannerInfo *root, Path *path, int indent) case T_ForeignPath: ptype = "ForeignScan"; break; + case T_CustomPath: + ptype = "CustomScan"; + break; + case T_NestPath: + ptype = "NestLoop"; + join = true; + break; + case T_MergePath: + ptype = "MergeJoin"; + join = true; + break; + case T_HashPath: + ptype = "HashJoin"; + join = true; + break; case T_AppendPath: ptype = "Append"; break; @@ -3710,6 +3725,10 @@ print_path(PlannerInfo *root, Path *path, int indent) ptype = "Gather"; subpath = ((GatherPath *) path)->subpath; break; + case T_GatherMergePath: + ptype = "GatherMerge"; + subpath = ((GatherMergePath *) path)->subpath; + break; case T_ProjectionPath: ptype = "Projection"; subpath = ((ProjectionPath *) path)->subpath; @@ -3763,18 +3782,6 @@ print_path(PlannerInfo *root, Path *path, int indent) ptype = "Limit"; subpath = ((LimitPath *) path)->subpath; break; - case T_NestPath: - ptype = "NestLoop"; - join = true; - break; - case T_MergePath: - ptype = "MergeJoin"; - join = true; - break; - case T_HashPath: - ptype = "HashJoin"; - join = true; - break; default: ptype = "???Path"; break;