mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Simplify API for initially hooking custom-path providers into the planner.
Instead of register_custom_path_provider and a CreateCustomScanPath callback, let's just provide a standard function hook in set_rel_pathlist. This is more flexible than what was previously committed, is more like the usual conventions for planner hooks, and requires less support code in the core. We had discussed this design (including centralizing the set_cheapest() calls) back in March or so, so I'm not sure why it wasn't done like this already.
This commit is contained in:
@@ -128,15 +128,6 @@ extern Path *reparameterize_path(PlannerInfo *root, Path *path,
|
||||
Relids required_outer,
|
||||
double loop_count);
|
||||
|
||||
/*
|
||||
* Interface definition of custom-scan providers
|
||||
*/
|
||||
extern void register_custom_path_provider(const CustomPathMethods *cpp_methods);
|
||||
|
||||
extern void create_customscan_paths(PlannerInfo *root,
|
||||
RelOptInfo *baserel,
|
||||
RangeTblEntry *rte);
|
||||
|
||||
/*
|
||||
* prototypes for relnode.c
|
||||
*/
|
||||
|
@@ -23,6 +23,13 @@
|
||||
extern bool enable_geqo;
|
||||
extern int geqo_threshold;
|
||||
|
||||
/* Hook for plugins to get control in set_rel_pathlist() */
|
||||
typedef void (*set_rel_pathlist_hook_type) (PlannerInfo *root,
|
||||
RelOptInfo *rel,
|
||||
Index rti,
|
||||
RangeTblEntry *rte);
|
||||
extern PGDLLIMPORT set_rel_pathlist_hook_type set_rel_pathlist_hook;
|
||||
|
||||
/* Hook for plugins to replace standard_join_search() */
|
||||
typedef RelOptInfo *(*join_search_hook_type) (PlannerInfo *root,
|
||||
int levels_needed,
|
||||
|
Reference in New Issue
Block a user