diff options
author | Michael Paquier <michael@paquier.xyz> | 2018-07-19 09:55:32 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2018-07-19 09:55:32 +0900 |
commit | 3ecd6c4ab9ddfe22e0c6df0fba412c900614aa23 (patch) | |
tree | 8c24f8d8f43b1e72d0b817271cb42c225f987b53 | |
parent | a9793e07351eb47c926a9e885956bf2d10da66dd (diff) | |
download | postgresql-3ecd6c4ab9ddfe22e0c6df0fba412c900614aa23.tar.gz |
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.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 8fc1cfd15f..42d7aa6c3f 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -2564,12 +2564,27 @@ print_path(PlannerInfo *root, Path *path, int indent) case T_BitmapOrPath: ptype = "BitmapOrPath"; 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_TidPath: ptype = "TidScan"; break; case T_ForeignPath: ptype = "ForeignScan"; break; + case T_CustomPath: + ptype = "CustomScan"; + break; case T_AppendPath: ptype = "Append"; break; @@ -2587,18 +2602,6 @@ print_path(PlannerInfo *root, Path *path, int indent) ptype = "Unique"; subpath = ((UniquePath *) 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; |