Documentation / Extension Hooks / Query execution
ExecutorStart_hook
ExecutorStart_hook
Hook for plugins to get control in ExecutorStart()
Reading PostgreSQL 18.
Description
Hook for plugins to get control in ExecutorStart()
- Interface type
- ExecutorStart_hook_type
- Header
- src/include/executor/executor.h
- Subsystem
- Query execution
- Initial value
- NULL (no hook installed)
C interface
typedef void (*ExecutorStart_hook_type) (QueryDesc *queryDesc, int eflags);
extern PGDLLIMPORT ExecutorStart_hook_type ExecutorStart_hook;Core source comments
Hooks for plugins to get control in ExecutorStart/Run/Finish/End
Call sites
src/backend/executor/execMain.c:135
Core call context: src/backend/executor/execMain.c:129–143
* call will be ignored if the top level query_id has already been
* reported.
*/
pgstat_report_query_id(queryDesc->plannedstmt->queryId, false);
if (ExecutorStart_hook)
(*ExecutorStart_hook) (queryDesc, eflags);
else
standard_ExecutorStart(queryDesc, eflags);
}
void
standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
{
EState *estate;Related entries
Documentation and source
Source build
- Version
- 18
- Build
- REL_18_STABLE
- Source fingerprint
753057e340da8f22e57c9a409ea7a235fd6a46bd
Related entries
ExecutorEnd_hookExecutorEnd_hookExecutorFinish_hookExecutorFinish_hookExecutorRun_hookExecutorRun_hook
Back to Extension Hooks · Recorded in PostgreSQL 10 through 20; the first sample is not necessarily its introduction.