]> granicus.if.org Git - postgresql/blob - src/include/executor/execdesc.h
Sort reference of include files, "A" - "F".
[postgresql] / src / include / executor / execdesc.h
1 /*-------------------------------------------------------------------------
2  *
3  * execdesc.h
4  *        plan and query descriptor accessor macros used by the executor
5  *        and related modules.
6  *
7  *
8  * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * $PostgreSQL: pgsql/src/include/executor/execdesc.h,v 1.32 2006/07/11 16:35:33 momjian Exp $
12  *
13  *-------------------------------------------------------------------------
14  */
15 #ifndef EXECDESC_H
16 #define EXECDESC_H
17
18 #include "nodes/execnodes.h"
19 #include "nodes/parsenodes.h"
20 #include "tcop/dest.h"
21
22
23 /* ----------------
24  *              query descriptor:
25  *
26  *      a QueryDesc encapsulates everything that the executor
27  *      needs to execute the query
28  * ---------------------
29  */
30 typedef struct QueryDesc
31 {
32         /* These fields are provided by CreateQueryDesc */
33         CmdType         operation;              /* CMD_SELECT, CMD_UPDATE, etc. */
34         Query      *parsetree;          /* rewritten parsetree */
35         Plan       *plantree;           /* planner's output */
36         Snapshot        snapshot;               /* snapshot to use for query */
37         Snapshot        crosscheck_snapshot;    /* crosscheck for RI update/delete */
38         DestReceiver *dest;                     /* the destination for tuple output */
39         ParamListInfo params;           /* param values being passed in */
40         bool            doInstrument;   /* TRUE requests runtime instrumentation */
41
42         /* These fields are set by ExecutorStart */
43         TupleDesc       tupDesc;                /* descriptor for result tuples */
44         EState     *estate;                     /* executor's query-wide state */
45         PlanState  *planstate;          /* tree of per-plan-node state */
46 } QueryDesc;
47
48 /* in pquery.c */
49 extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree,
50                                 Snapshot snapshot,
51                                 Snapshot crosscheck_snapshot,
52                                 DestReceiver *dest,
53                                 ParamListInfo params,
54                                 bool doInstrument);
55
56 extern void FreeQueryDesc(QueryDesc *qdesc);
57
58 #endif   /* EXECDESC_H  */