set_join_pathlist_hook
连接访问路径
供插件在 add_paths_to_joinrel() 中接管处理的钩子。
当前查看 PostgreSQL 18。
中文定义与说明
供插件在 add_paths_to_joinrel() 中接管处理的钩子。
以下中文为本站依据所列 PostgreSQL 源码注释编译的说明。
接口声明
typedef void (*set_join_pathlist_hook_type) (PlannerInfo *root, RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel, JoinType jointype, JoinPathExtraData *extra); extern PGDLLIMPORT set_join_pathlist_hook_type set_join_pathlist_hook;
源码说明
6. 最后,允许扩展调整路径列表。扩展可调用 add_path() 添加新路径(例如 CustomPaths);若支持并行,则可调用 add_partial_path()。也可以删除或修改核心代码添加的路径。
调用位置
src/backend/optimizer/path/joinpath.c:343
核心调用上下文:src/backend/optimizer/path/joinpath.c:337–351
* 6. Finally, give extensions a chance to manipulate the path list. They * could add new paths (such as CustomPaths) by calling add_path(), or * add_partial_path() if parallel aware. They could also delete or modify * paths added by the core code. */ if (set_join_pathlist_hook) set_join_pathlist_hook(root, joinrel, outerrel, innerrel, jointype, &extra); } /* * We override the param_source_rels heuristic to accept nestloop paths in * which the outer rel satisfies some but not all of the inner path's * parameterization. This is necessary to get good plans for star-schema * scenarios, in which a parameterized path for a large table may require
说明
供插件在 add_paths_to_joinrel() 中接管处理的钩子。
- 接口类型
- set_join_pathlist_hook_type
- 声明头文件
- src/include/optimizer/paths.h
- 调用阶段
- 查询规划
- 初始值
- NULL(未安装钩子)
接口签名
typedef void (*set_join_pathlist_hook_type) (PlannerInfo *root, RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel, JoinType jointype, JoinPathExtraData *extra);
extern PGDLLIMPORT set_join_pathlist_hook_type set_join_pathlist_hook;调用位置
src/backend/optimizer/path/joinpath.c:343
相关条目
文档与源码
查看来源构建
- 版本
- 18
- 构建
- REL_18_STABLE
- 来源指纹
753057e340da8f22e57c9a409ea7a235fd6a46bd
同类条目
create_upper_paths_hook上层查询路径get_relation_info_hook关系规划信息join_search_hook连接顺序搜索planner_hook查询规划入口set_rel_pathlist_hook关系访问路径
返回扩展钩子 · 此条目的收录范围为 PostgreSQL 10 至 20;起点不一定是实际引入版本。