OSDN Git Service

Update copyright to 2004.
[pg-rex/syncrep.git] / 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-2004, 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.28 2004/08/29 04:13:06 momjian Exp $
12  *
13  *-------------------------------------------------------------------------
14  */
15 #ifndef EXECDESC_H
16 #define EXECDESC_H
17
18 #include "nodes/parsenodes.h"
19 #include "nodes/execnodes.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         DestReceiver *dest;                     /* the destination for tuple output */
37         ParamListInfo params;           /* param values being passed in */
38         bool            doInstrument;   /* TRUE requests runtime instrumentation */
39
40         /* These fields are set by ExecutorStart */
41         TupleDesc       tupDesc;                /* descriptor for result tuples */
42         EState     *estate;                     /* executor's query-wide state */
43         PlanState  *planstate;          /* tree of per-plan-node state */
44 } QueryDesc;
45
46 /* in pquery.c */
47 extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree,
48                                 DestReceiver *dest,
49                                 ParamListInfo params,
50                                 bool doInstrument);
51
52 extern void FreeQueryDesc(QueryDesc *qdesc);
53
54 #endif   /* EXECDESC_H  */