Documentation / Extension Hooks / Query planning
set_rel_pathlist_hook
set_rel_pathlist_hook
Hook for plugins to get control in set_rel_pathlist()
Reading PostgreSQL 18.
Description
Hook for plugins to get control in set_rel_pathlist()
- Interface type
- set_rel_pathlist_hook_type
- Header
- src/include/optimizer/paths.h
- Subsystem
- Query planning
- Initial value
- NULL (no hook installed)
C interface
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;Core source comments
Allow a plugin to editorialize on the set of Paths for this base relation. It could add new paths (such as CustomPaths) by calling add_path(), or add_partial_path() if parallel aware. It could also delete or modify paths added by the core code.
Call sites
src/backend/optimizer/path/allpaths.c:543
Core call context: src/backend/optimizer/path/allpaths.c:537–551
* Allow a plugin to editorialize on the set of Paths for this base
* relation. It could add new paths (such as CustomPaths) by calling
* add_path(), or add_partial_path() if parallel aware. It could also
* delete or modify paths added by the core code.
*/
if (set_rel_pathlist_hook)
(*set_rel_pathlist_hook) (root, rel, rti, rte);
/*
* If this is a baserel, we should normally consider gathering any partial
* paths we may have created for it. We have to do this after calling the
* set_rel_pathlist_hook, else it cannot add partial paths to be included
* here.
*
* However, if this is an inheritance child, skip it. Otherwise, we couldRelated entries
Documentation and source
Source build
- Version
- 18
- Build
- REL_18_STABLE
- Source fingerprint
753057e340da8f22e57c9a409ea7a235fd6a46bd
Related entries
create_upper_paths_hookcreate_upper_paths_hookget_relation_info_hookget_relation_info_hookjoin_search_hookjoin_search_hookplanner_hookplanner_hookset_join_pathlist_hookset_join_pathlist_hook
Back to Extension Hooks · Recorded in PostgreSQL 10 through 20; the first sample is not necessarily its introduction.