1 /*-------------------------------------------------------------------------
4 * plan and query descriptor accessor macros used by the executor
8 * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * $Id: execdesc.h,v 1.22 2002/12/15 16:17:54 tgl Exp $
13 *-------------------------------------------------------------------------
18 #include "nodes/parsenodes.h"
19 #include "nodes/execnodes.h"
20 #include "tcop/dest.h"
26 * a QueryDesc encapsulates everything that the executor
27 * needs to execute the query
28 * ---------------------
30 typedef struct QueryDesc
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 CommandDest dest; /* the destination output of the execution */
37 const char *portalName; /* name of portal, or NULL */
38 ParamListInfo params; /* param values being passed in */
39 bool doInstrument; /* TRUE requests runtime instrumentation */
41 /* These fields are set by ExecutorStart */
42 TupleDesc tupDesc; /* descriptor for result tuples */
43 EState *estate; /* executor's query-wide state */
44 PlanState *planstate; /* tree of per-plan-node state */
48 extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree,
49 CommandDest dest, const char *portalName,
53 extern void FreeQueryDesc(QueryDesc *qdesc);
55 #endif /* EXECDESC_H */