ExecutorEnd_hook
执行器结束
供插件在 ExecutorEnd() 中接管处理的钩子。
当前查看 PostgreSQL 18。
中文定义与说明
供插件在 ExecutorEnd() 中接管处理的钩子。
以下中文为本站依据所列 PostgreSQL 源码注释编译的说明。
接口声明
typedef void (*ExecutorEnd_hook_type) (QueryDesc *queryDesc); extern PGDLLIMPORT ExecutorEnd_hook_type ExecutorEnd_hook;
调用位置
src/backend/executor/execMain.c:469
核心调用上下文:src/backend/executor/execMain.c:463–477
* ----------------------------------------------------------------
*/
void
ExecutorEnd(QueryDesc *queryDesc)
{
if (ExecutorEnd_hook)
(*ExecutorEnd_hook) (queryDesc);
else
standard_ExecutorEnd(queryDesc);
}
void
standard_ExecutorEnd(QueryDesc *queryDesc)
{
EState *estate;说明
供插件在 ExecutorEnd() 中接管处理的钩子。
- 接口类型
- ExecutorEnd_hook_type
- 声明头文件
- src/include/executor/executor.h
- 调用阶段
- 查询执行
- 初始值
- NULL(未安装钩子)
接口签名
typedef void (*ExecutorEnd_hook_type) (QueryDesc *queryDesc);
extern PGDLLIMPORT ExecutorEnd_hook_type ExecutorEnd_hook;串接已有钩子
钩子变量只保存一个函数指针。扩展安装时应保存旧值;需要保留原行为时先调用旧钩子,旧值为空则调用相应的 standard_ 实现。直接再次调用同名公共入口可能重新进入自己的钩子。
调用位置
src/backend/executor/execMain.c:469
相关条目
文档与源码
查看来源构建
- 版本
- 18
- 构建
- REL_18_STABLE
- 来源指纹
753057e340da8f22e57c9a409ea7a235fd6a46bd
同类条目
ExecutorFinish_hook执行器完成ExecutorRun_hook执行器运行ExecutorStart_hook执行器启动
返回扩展钩子 · 此条目的收录范围为 PostgreSQL 10 至 20;起点不一定是实际引入版本。