diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index c7fcb80..6201a97 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -392,7 +392,7 @@ set_plain_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte) create_tidscan_paths(root, rel); /* Consider Custom scans */ - add_custom_scan_paths(root,rel,rte); + add_custom_scan_paths(root, rel, rte); /* Now find the cheapest of the paths for this rel */ set_cheapest(rel); @@ -423,7 +423,7 @@ set_foreign_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte) rel->fdwroutine->GetForeignPaths(root, rel, rte->relid); /* Consider Custom scans */ - add_custom_scan_paths(root,rel,rte); + add_custom_scan_paths(root, rel, rte); /* Select cheapest path */ set_cheapest(rel); @@ -1245,7 +1245,7 @@ set_subquery_pathlist(PlannerInfo *root, RelOptInfo *rel, add_path(rel, create_subqueryscan_path(root, rel, pathkeys, required_outer)); /* Consider Custom scans */ - add_custom_scan_paths(root,rel,rte); + add_custom_scan_paths(root, rel, rte); /* Select cheapest path (pretty easy in this case...) */ set_cheapest(rel); @@ -1319,7 +1319,7 @@ set_function_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte) pathkeys, required_outer)); /* Consider Custom scans */ - add_custom_scan_paths(root,rel,rte); + add_custom_scan_paths(root, rel, rte); /* Select cheapest path (pretty easy in this case...) */ set_cheapest(rel); @@ -1345,7 +1345,7 @@ set_values_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte) add_path(rel, create_valuesscan_path(root, rel, required_outer)); /* Consider Custom scans */ - add_custom_scan_paths(root,rel,rte); + add_custom_scan_paths(root, rel, rte); /* Select cheapest path (pretty easy in this case...) */ set_cheapest(rel); @@ -1417,7 +1417,7 @@ set_cte_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte) add_path(rel, create_ctescan_path(root, rel, required_outer)); /* Consider Custom scans */ - add_custom_scan_paths(root,rel,rte); + add_custom_scan_paths(root, rel, rte); /* Select cheapest path (pretty easy in this case...) */ set_cheapest(rel); @@ -1473,7 +1473,7 @@ set_worktable_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte) add_path(rel, create_worktablescan_path(root, rel, required_outer)); /* Consider Custom scans */ - add_custom_scan_paths(root,rel,rte); + add_custom_scan_paths(root, rel, rte); /* Select cheapest path (pretty easy in this case...) */ set_cheapest(rel); diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index a561387..b613946 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -35,10 +35,10 @@ typedef void (*add_scan_path_hook_type)(PlannerInfo *root, RangeTblEntry *rte); extern PGDLLIMPORT add_scan_path_hook_type add_scan_path_hook; -#define add_custom_scan_paths(root,baserel,rte) \ +#define add_custom_scan_paths(root, baserel, rte) \ do { \ - if (add_scan_path_hook) \ - (*add_scan_path_hook)((root),(baserel),(rte)); \ + if (add_scan_path_hook) \ + (*add_scan_path_hook)((root), (baserel), (rte)); \ } while(0) /* Hook for plugins to add custom join path, in addition to default ones */ diff --git a/src/test/regress/expected/.gitignore b/src/test/regress/expected/.gitignore index 93c56c8..7e35e74 100644 --- a/src/test/regress/expected/.gitignore +++ b/src/test/regress/expected/.gitignore @@ -2,6 +2,7 @@ /copy.out /create_function_1.out /create_function_2.out +/custom_scan.out /largeobject.out /largeobject_1.out /misc.out diff --git a/src/test/regress/sql/.gitignore b/src/test/regress/sql/.gitignore index 46c8112..8eeb461 100644 --- a/src/test/regress/sql/.gitignore +++ b/src/test/regress/sql/.gitignore @@ -2,6 +2,7 @@ /copy.sql /create_function_1.sql /create_function_2.sql +/custom_scan.sql /largeobject.sql /misc.sql /security_label.sql