diff options
Diffstat (limited to 'src/include/executor')
-rw-r--r-- | src/include/executor/execdesc.h | 5 | ||||
-rw-r--r-- | src/include/executor/executor.h | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/include/executor/execdesc.h b/src/include/executor/execdesc.h index 4f386029874..2ffccc783f4 100644 --- a/src/include/executor/execdesc.h +++ b/src/include/executor/execdesc.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/executor/execdesc.h,v 1.37 2008/01/01 19:45:57 momjian Exp $ + * $PostgreSQL: pgsql/src/include/executor/execdesc.h,v 1.38 2008/11/19 01:10:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -47,6 +47,9 @@ typedef struct QueryDesc TupleDesc tupDesc; /* descriptor for result tuples */ EState *estate; /* executor's query-wide state */ PlanState *planstate; /* tree of per-plan-node state */ + + /* This is always set NULL by the core system, but plugins can change it */ + struct Instrumentation *totaltime; /* total time spent in ExecutorRun */ } QueryDesc; /* in pquery.c */ diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 2fdaddda4da..47792df10c9 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.152 2008/10/31 21:07:55 tgl Exp $ + * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.153 2008/11/19 01:10:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -60,12 +60,20 @@ ((*(expr)->evalfunc) (expr, econtext, isNull, isDone)) +/* Hook for plugins to get control in ExecutorStart() */ +typedef void (*ExecutorStart_hook_type) (QueryDesc *queryDesc, int eflags); +extern PGDLLIMPORT ExecutorStart_hook_type ExecutorStart_hook; + /* Hook for plugins to get control in ExecutorRun() */ typedef void (*ExecutorRun_hook_type) (QueryDesc *queryDesc, ScanDirection direction, long count); extern PGDLLIMPORT ExecutorRun_hook_type ExecutorRun_hook; +/* Hook for plugins to get control in ExecutorEnd() */ +typedef void (*ExecutorEnd_hook_type) (QueryDesc *queryDesc); +extern PGDLLIMPORT ExecutorEnd_hook_type ExecutorEnd_hook; + /* * prototypes from functions in execAmi.c @@ -140,11 +148,13 @@ extern HeapTuple ExecRemoveJunk(JunkFilter *junkfilter, TupleTableSlot *slot); * prototypes from functions in execMain.c */ extern void ExecutorStart(QueryDesc *queryDesc, int eflags); +extern void standard_ExecutorStart(QueryDesc *queryDesc, int eflags); extern void ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, long count); extern void standard_ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, long count); extern void ExecutorEnd(QueryDesc *queryDesc); +extern void standard_ExecutorEnd(QueryDesc *queryDesc); extern void ExecutorRewind(QueryDesc *queryDesc); extern void InitResultRelInfo(ResultRelInfo *resultRelInfo, Relation resultRelationDesc, |