{"Entry":{"collection":"hook","key":"processutility_hook","name":"ProcessUtility_hook","aliases":[],"metadata":{"aliases":[],"category":"Parsing and utility commands","content_hash":"fad7b2deaaf5285ba21b2da5819afd853f016c08943a874fe9c86f0b88cc9d80","imported_at":"2026-09-27T17:57:58.84927+08:00","name":"ProcessUtility_hook","name_zh":"ProcessUtility_hook","slug":"processutility_hook","summary":"Hook for plugins to get control in ProcessUtility()"}},"Definition":{"Collection":"hook","Key":"processutility_hook","SourceDatabase":"center","Version":"18","SourceTable":"hook","SourceKey":"processutility_hook","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","Facts":{"description":["Hook for plugins to get control in ProcessUtility()"],"facts":[{"label":"Interface type","value":"ProcessUtility_hook_type"},{"label":"Header","value":"src/include/tcop/utility.h"},{"label":"Subsystem","value":"Parsing and utility commands"},{"label":"Initial value","value":"NULL (no hook installed)"}],"related":[],"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sections":[{"paragraphs":["We provide a function hook variable that lets loadable plugins get control when ProcessUtility is called. Such a plugin would normally call standard_ProcessUtility()."],"title":"Core source comments"},{"paragraphs":["src/backend/tcop/utility.c:519"],"title":"Call sites"},{"code":"\t/*\n\t * We provide a function hook variable that lets loadable plugins get\n\t * control when ProcessUtility is called.  Such a plugin would normally\n\t * call standard_ProcessUtility().\n\t */\n\tif (ProcessUtility_hook)\n\t\t(*ProcessUtility_hook) (pstmt, queryString, readOnlyTree,\n\t\t\t\t\t\t\t\tcontext, params, queryEnv,\n\t\t\t\t\t\t\t\tdest, qc);\n\telse\n\t\tstandard_ProcessUtility(pstmt, queryString, readOnlyTree,\n\t\t\t\t\t\t\t\tcontext, params, queryEnv,\n\t\t\t\t\t\t\t\tdest, qc);\n}\n","paragraphs":[],"title":"Core call context: src/backend/tcop/utility.c:513–527"}],"signature":"typedef void (*ProcessUtility_hook_type) (PlannedStmt *pstmt, const char *queryString, bool readOnlyTree, ProcessUtilityContext context, ParamListInfo params, QueryEnvironment *queryEnv, DestReceiver *dest, QueryCompletion *qc);\nextern PGDLLIMPORT ProcessUtility_hook_type ProcessUtility_hook;","sources":[{"label":"Interface declaration","path":"src/include/tcop/utility.h","sha256":"726bfca02c8e0186b1b57f19c3319d11756d6b70a1b6f1cba7750c07aabdbbc3","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/tcop/utility.h#L71"},{"label":"Core definition","path":"src/backend/tcop/utility.c","sha256":"7aae5d07628b6debf8456d1d4ea96f28912232192e56ea25773b4c4b61235a00","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/tcop/utility.c#L70"},{"label":"Call sites","path":"src/backend/tcop/utility.c","sha256":"7aae5d07628b6debf8456d1d4ea96f28912232192e56ea25773b4c4b61235a00","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/tcop/utility.c#L519"}]},"ManualEvidence":{"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sources":[{"label":"Interface declaration","path":"src/include/tcop/utility.h","sha256":"726bfca02c8e0186b1b57f19c3319d11756d6b70a1b6f1cba7750c07aabdbbc3","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/tcop/utility.h#L71"},{"label":"Core definition","path":"src/backend/tcop/utility.c","sha256":"7aae5d07628b6debf8456d1d4ea96f28912232192e56ea25773b4c4b61235a00","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/tcop/utility.c#L70"},{"label":"Call sites","path":"src/backend/tcop/utility.c","sha256":"7aae5d07628b6debf8456d1d4ea96f28912232192e56ea25773b4c4b61235a00","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/tcop/utility.c#L519"}]},"MeasuredEvidence":{}},"Text":{"Collection":"hook","Key":"processutility_hook","SourceDatabase":"center","Version":"18","Locale":"en","Title":"ProcessUtility_hook","Summary":"Hook for plugins to get control in ProcessUtility()","BodyHTML":"\u003cp\u003eHook for plugins to get control in ProcessUtility()\u003c/p\u003e","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","ContentHash":"cf98ee1e0fe14d62d7e96fa5fd5639445a0cc51ca07332c8ad4da5e753cbd528","Payload":{"description":["Hook for plugins to get control in ProcessUtility()"],"related":[],"sections":[{"paragraphs":["We provide a function hook variable that lets loadable plugins get control when ProcessUtility is called. Such a plugin would normally call standard_ProcessUtility()."],"title":"Core source comments"},{"paragraphs":["src/backend/tcop/utility.c:519"],"title":"Call sites"},{"code":"\t/*\n\t * We provide a function hook variable that lets loadable plugins get\n\t * control when ProcessUtility is called.  Such a plugin would normally\n\t * call standard_ProcessUtility().\n\t */\n\tif (ProcessUtility_hook)\n\t\t(*ProcessUtility_hook) (pstmt, queryString, readOnlyTree,\n\t\t\t\t\t\t\t\tcontext, params, queryEnv,\n\t\t\t\t\t\t\t\tdest, qc);\n\telse\n\t\tstandard_ProcessUtility(pstmt, queryString, readOnlyTree,\n\t\t\t\t\t\t\t\tcontext, params, queryEnv,\n\t\t\t\t\t\t\t\tdest, qc);\n}\n","paragraphs":[],"title":"Core call context: src/backend/tcop/utility.c:513–527"}]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
