{"Entry":{"collection":"hook","key":"executorcheckperms_hook","name":"ExecutorCheckPerms_hook","aliases":[],"metadata":{"aliases":[],"category":"Permissions and object access","content_hash":"0777188db0fa95d49ba8cd74a37f33b7eb8ae6c5a8c8546b4c0d6239518374d5","derived_content_hash":"72f7c11c3d239f40f4e53b450e14e6717e8c27eb15f9db52a949edbcbbbbe5a1","imported_at":"2026-09-27T17:57:58.851572+08:00","name":"ExecutorCheckPerms_hook","name_zh":"ExecutorCheckPerms_hook","repair_provenance":{"original_source_revision":"","receipt_sha256":"55adffe73786895b2b3f2c56c879a968f4931ab5b04ec74cec7d1cd0c60447f1","repair":"wiki-repair-20261023"},"slug":"executorcheckperms_hook","source_rev":"wiki-repair-20261023:e6d97fc03d364780e0d8c764110fa8dd4341fcc8856e544acc8c46d602b035c4","summary":"Hook for plugins to get control in ExecCheckPermissions()"}},"Definition":{"Collection":"hook","Key":"executorcheckperms_hook","SourceDatabase":"center","Version":"18","SourceTable":"hook","SourceKey":"executorcheckperms_hook","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","Facts":{"description":["Hook for plugins to get control in ExecCheckPermissions()"],"description_zh":"供插件在 ExecCheckPermissions() 中接管处理的钩子。","description_zh_html":"\u003cp\u003e供插件在 ExecCheckPermissions() 中接管处理的钩子。\u003c/p\u003e\u003cp\u003e以下中文为本站依据所列 PostgreSQL 源码注释编译的说明。\u003c/p\u003e\u003ch3\u003e接口声明\u003c/h3\u003e\u003cpre\u003etypedef bool (*ExecutorCheckPerms_hook_type) (List *rangeTable, List *rtePermInfos, bool ereport_on_violation);\nextern PGDLLIMPORT ExecutorCheckPerms_hook_type ExecutorCheckPerms_hook;\u003c/pre\u003e\u003ch3\u003e源码说明\u003c/h3\u003e\u003cp\u003e供插件在 ExecCheckPermissions() 中接管处理的钩子。\u003c/p\u003e\u003ch3\u003e调用位置\u003c/h3\u003e\u003cul\u003e\u003cli\u003e\u003ccode\u003esrc/backend/executor/execMain.c:636\u003c/code\u003e\u003c/li\u003e\u003c/ul\u003e\u003ch3\u003e核心调用上下文：src/backend/executor/execMain.c:630–644\u003c/h3\u003e\u003cpre\u003e\t\t\t\t\t\t\t   get_rel_name(perminfo-\u0026gt;relid));\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ExecutorCheckPerms_hook)\n\t\tresult = (*ExecutorCheckPerms_hook) (rangeTable, rteperminfos,\n\t\t\t\t\t\t\t\t\t\t\t ereport_on_violation);\n\treturn result;\n}\n\n/*\n * ExecCheckOneRelPerms\n *\t\tCheck access permissions for a single relation.\n */\u003c/pre\u003e","facts":[{"label":"Interface type","value":"ExecutorCheckPerms_hook_type"},{"label":"Header","value":"src/include/executor/executor.h"},{"label":"Subsystem","value":"Permissions and object access"},{"label":"Initial value","value":"NULL (no hook installed)"}],"related":[],"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sections":[{"paragraphs":["Hook for plugin to get control in ExecCheckPermissions()"],"title":"Core source comments"},{"paragraphs":["src/backend/executor/execMain.c:636"],"title":"Call sites"},{"code":"\t\t\t\t\t\t\t   get_rel_name(perminfo-\u003erelid));\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ExecutorCheckPerms_hook)\n\t\tresult = (*ExecutorCheckPerms_hook) (rangeTable, rteperminfos,\n\t\t\t\t\t\t\t\t\t\t\t ereport_on_violation);\n\treturn result;\n}\n\n/*\n * ExecCheckOneRelPerms\n *\t\tCheck access permissions for a single relation.\n */","paragraphs":[],"title":"Core call context: src/backend/executor/execMain.c:630–644"}],"signature":"typedef bool (*ExecutorCheckPerms_hook_type) (List *rangeTable, List *rtePermInfos, bool ereport_on_violation);\nextern PGDLLIMPORT ExecutorCheckPerms_hook_type ExecutorCheckPerms_hook;","sources":[{"label":"Interface declaration","path":"src/include/executor/executor.h","sha256":"65710b17bb91a8fe6367654bb27b67ef7a7c238f79ba46248f92a3b8302cd4bb","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/executor/executor.h#L93"},{"label":"Core definition","path":"src/backend/executor/execMain.c","sha256":"a0407447270840acd8a9902c444693d97c765fd8e056dbadc66d36a3327fb0ef","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/executor/execMain.c#L74"},{"label":"Call sites","path":"src/backend/executor/execMain.c","sha256":"a0407447270840acd8a9902c444693d97c765fd8e056dbadc66d36a3327fb0ef","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/executor/execMain.c#L636"}],"translation_provenance":{"inputs":[{"label":"Interface declaration","path":"src/include/executor/executor.h","sha256":"65710b17bb91a8fe6367654bb27b67ef7a7c238f79ba46248f92a3b8302cd4bb","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/executor/executor.h#L93"},{"label":"Core definition","path":"src/backend/executor/execMain.c","sha256":"a0407447270840acd8a9902c444693d97c765fd8e056dbadc66d36a3327fb0ef","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/executor/execMain.c#L74"},{"label":"Call sites","path":"src/backend/executor/execMain.c","sha256":"a0407447270840acd8a9902c444693d97c765fd8e056dbadc66d36a3327fb0ef","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/executor/execMain.c#L636"}],"kind":"authored-source-translation","locale":"zh-Hans","source_revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","translated_source_sha256":"920f49f43da47257d0e5bbf26744fce38d9db530ef6ea045b1746f1acf0d6db5","version":"18"},"zh_from":"authored-source-translation"},"ManualEvidence":{"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sources":[{"label":"Interface declaration","path":"src/include/executor/executor.h","sha256":"65710b17bb91a8fe6367654bb27b67ef7a7c238f79ba46248f92a3b8302cd4bb","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/executor/executor.h#L93"},{"label":"Core definition","path":"src/backend/executor/execMain.c","sha256":"a0407447270840acd8a9902c444693d97c765fd8e056dbadc66d36a3327fb0ef","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/executor/execMain.c#L74"},{"label":"Call sites","path":"src/backend/executor/execMain.c","sha256":"a0407447270840acd8a9902c444693d97c765fd8e056dbadc66d36a3327fb0ef","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/executor/execMain.c#L636"}]},"MeasuredEvidence":{}},"Text":{"Collection":"hook","Key":"executorcheckperms_hook","SourceDatabase":"center","Version":"18","Locale":"en","Title":"ExecutorCheckPerms_hook","Summary":"Hook for plugins to get control in ExecCheckPermissions()","BodyHTML":"\u003cp\u003eHook for plugins to get control in ExecCheckPermissions()\u003c/p\u003e","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","ContentHash":"736f7ff8e04215e8d688b066b918f5643ad7c0b72db6fd494395a60f14327fc5","Payload":{"description":["Hook for plugins to get control in ExecCheckPermissions()"],"related":[],"sections":[{"paragraphs":["Hook for plugin to get control in ExecCheckPermissions()"],"title":"Core source comments"},{"paragraphs":["src/backend/executor/execMain.c:636"],"title":"Call sites"},{"code":"\t\t\t\t\t\t\t   get_rel_name(perminfo-\u003erelid));\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (ExecutorCheckPerms_hook)\n\t\tresult = (*ExecutorCheckPerms_hook) (rangeTable, rteperminfos,\n\t\t\t\t\t\t\t\t\t\t\t ereport_on_violation);\n\treturn result;\n}\n\n/*\n * ExecCheckOneRelPerms\n *\t\tCheck access permissions for a single relation.\n */","paragraphs":[],"title":"Core call context: src/backend/executor/execMain.c:630–644"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
