↑↓ 选择 ↵ 打开 ⌫ 改范围 完整检索页

pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。

文档 / 扩展钩子 / 查询规划

get_relation_info_hook

关系规划信息

在关系的目录与索引信息装入规划器后介入。

当前查看 PostgreSQL 18。

说明

get_relation_info 从系统目录收集表及其索引的规划信息后调用此钩子。扩展拿到关系 OID、继承标志和 RelOptInfo,可调整规划器看到的关系信息。

接口类型
get_relation_info_hook_type
声明头文件
src/include/optimizer/plancat.h
调用阶段
查询规划
初始值
NULL(未安装钩子)

接口签名

typedef void (*get_relation_info_hook_type) (PlannerInfo *root, Oid relationObjectId, bool inhparent, RelOptInfo *rel);
extern PGDLLIMPORT get_relation_info_hook_type get_relation_info_hook;

调用位置

src/backend/optimizer/util/plancat.c:575

相关条目

文档与源码

查看来源构建
版本
18
构建
REL_18_STABLE
来源指纹
753057e340da8f22e57c9a409ea7a235fd6a46bd

同类条目

返回扩展钩子 · 此条目的收录范围为 PostgreSQL 10 至 18;起点不一定是实际引入版本。