aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2018-07-19 09:55:15 +0900
committerMichael Paquier <michael@paquier.xyz>2018-07-19 09:55:15 +0900
commit49d506dd2162c1798150bab18d7c332d29b4aa93 (patch)
tree2c767e9cb0e4b76217d35c962d51f5f7eb0410d0
parent5c513db12c2921a1cf31348132ede42442517389 (diff)
downloadpostgresql-49d506dd2162c1798150bab18d7c332d29b4aa93.tar.gz
postgresql-49d506dd2162c1798150bab18d7c332d29b4aa93.zip
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
-rw-r--r--src/backend/optimizer/path/allpaths.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index a53b545bb19..fff2f4c8bad 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -3282,6 +3282,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;
@@ -3303,6 +3318,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;
@@ -3356,18 +3375,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;