explain_per_node_hook
EXPLAIN 节点附加信息
供 EXPLAIN 插件在单个计划节点上输出额外字段的钩子。
当前查看 PostgreSQL 18。
中文定义与说明
供 EXPLAIN 插件在单个计划节点上输出额外字段的钩子。
以下中文为本站依据所列 PostgreSQL 源码注释编译的说明。
接口声明
typedef void (*explain_per_node_hook_type) (PlanState *planstate, List *ancestors, const char *relationship, const char *plan_name, struct ExplainState *es); extern PGDLLIMPORT explain_per_node_hook_type explain_per_node_hook;
源码说明
允许插件输出额外信息。
调用位置
src/backend/commands/explain.c:2319
核心调用上下文:src/backend/commands/explain.c:2313–2327
if (es->workers_state) ExplainFlushWorkersState(es); es->workers_state = save_workers_state; /* Allow plugins to print additional information */ if (explain_per_node_hook) (*explain_per_node_hook) (planstate, ancestors, relationship, plan_name, es); /* * If partition pruning was done during executor initialization, the * number of child plans we'll display below will be less than the number * of subplans that was specified in the plan. To make this a bit less * mysterious, emit an indication that this happened. Note that this * field is emitted now because we want it to be a property of the parent
说明
供 EXPLAIN 插件在单个计划节点上输出额外字段的钩子。
- 接口类型
- explain_per_node_hook_type
- 声明头文件
- src/include/commands/explain.h
- 调用阶段
- 执行计划说明
- 初始值
- NULL(未安装钩子)
接口签名
typedef void (*explain_per_node_hook_type) (PlanState *planstate, List *ancestors, const char *relationship, const char *plan_name, struct ExplainState *es);
extern PGDLLIMPORT explain_per_node_hook_type explain_per_node_hook;调用位置
src/backend/commands/explain.c:2319
相关条目
文档与源码
查看来源构建
- 版本
- 18
- 构建
- REL_18_STABLE
- 来源指纹
753057e340da8f22e57c9a409ea7a235fd6a46bd
同类条目
ExplainOneQuery_hook单条查询的 EXPLAINexplain_get_index_name_hookEXPLAIN 索引名称explain_per_plan_hookEXPLAIN 计划附加信息explain_validate_options_hookEXPLAIN 选项校验
返回扩展钩子 · 此条目的收录范围为 PostgreSQL 18 至 20;起点不一定是实际引入版本。