Wiki / Hooks / Query execution
ExecutorRun_hook
ExecutorRun_hook
Hook for plugins to get control in ExecutorRun()
Reading PostgreSQL 18.
Description
Hook for plugins to get control in ExecutorRun()
- Interface type
- ExecutorRun_hook_type
- Header
- src/include/executor/executor.h
- Subsystem
- Query execution
- Initial value
- NULL (no hook installed)
C interface
typedef void (*ExecutorRun_hook_type) (QueryDesc *queryDesc, ScanDirection direction, uint64 count);
extern PGDLLIMPORT ExecutorRun_hook_type ExecutorRun_hook;Call sites
src/backend/executor/execMain.c:301
Core call context: src/backend/executor/execMain.c:295–309
*/
void
ExecutorRun(QueryDesc *queryDesc,
ScanDirection direction, uint64 count)
{
if (ExecutorRun_hook)
(*ExecutorRun_hook) (queryDesc, direction, count);
else
standard_ExecutorRun(queryDesc, direction, count);
}
void
standard_ExecutorRun(QueryDesc *queryDesc,
ScanDirection direction, uint64 count)
{Related entries
Documentation and source
Source build
- Version
- 18
- Build
- REL_18_STABLE
- Source fingerprint
753057e340da8f22e57c9a409ea7a235fd6a46bd
Compare versions
PostgreSQL 17 → 18: changed.
--- PostgreSQL 17
+++ PostgreSQL 18
@@ -17,6 +17,6 @@
"value": "NULL (no hook installed)"
}
],
- "signature": "typedef void (*ExecutorRun_hook_type) (QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once);\nextern PGDLLIMPORT ExecutorRun_hook_type ExecutorRun_hook;",
+ "signature": "typedef void (*ExecutorRun_hook_type) (QueryDesc *queryDesc, ScanDirection direction, uint64 count);\nextern PGDLLIMPORT ExecutorRun_hook_type ExecutorRun_hook;",
"tables": null
}
Compares recorded interfaces and attributes. Source fingerprints and build metadata are excluded; an absent sample is not proof of the introduction or removal release.
Related entries
ExecutorEnd_hookExecutorEnd_hookExecutorFinish_hookExecutorFinish_hookExecutorStart_hookExecutorStart_hook
Export JSON · Back to Hooks · Recorded in PostgreSQL 10 through 20; the first sample is not necessarily its introduction.