"...postgres-fd-implementation.git" did not exist on "eeaf5f04ae3fca446b43851fb9a612fe0c980994"
execdesc.h 1.7 KB
Newer Older
1 2
/*-------------------------------------------------------------------------
 *
3
 * execdesc.h
4 5
 *	  plan and query descriptor accessor macros used by the executor
 *	  and related modules.
6 7
 *
 *
Bruce Momjian's avatar
Bruce Momjian committed
8
 * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
9
 * Portions Copyright (c) 1994, Regents of the University of California
10
 *
11
 * $Id: execdesc.h,v 1.22 2002/12/15 16:17:54 tgl Exp $
12 13 14 15 16 17
 *
 *-------------------------------------------------------------------------
 */
#ifndef EXECDESC_H
#define EXECDESC_H

18
#include "nodes/parsenodes.h"
19
#include "nodes/execnodes.h"
Bruce Momjian's avatar
Bruce Momjian committed
20
#include "tcop/dest.h"
21

22

23
/* ----------------
24
 *		query descriptor:
25
 *
26 27
 *	a QueryDesc encapsulates everything that the executor
 *	needs to execute the query
28 29
 * ---------------------
 */
30 31
typedef struct QueryDesc
{
32
	/* These fields are provided by CreateQueryDesc */
33
	CmdType		operation;		/* CMD_SELECT, CMD_UPDATE, etc. */
34 35
	Query	   *parsetree;		/* rewritten parsetree */
	Plan	   *plantree;		/* planner's output */
36
	CommandDest dest;			/* the destination output of the execution */
37
	const char *portalName;		/* name of portal, or NULL */
38 39
	ParamListInfo params;		/* param values being passed in */
	bool		doInstrument;	/* TRUE requests runtime instrumentation */
40

41 42 43 44
	/* These fields are set by ExecutorStart */
	TupleDesc	tupDesc;		/* descriptor for result tuples */
	EState	   *estate;			/* executor's query-wide state */
	PlanState  *planstate;		/* tree of per-plan-node state */
45
} QueryDesc;
46 47

/* in pquery.c */
48
extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree,
49 50 51
								  CommandDest dest, const char *portalName,
								  ParamListInfo params,
								  bool doInstrument);
52

53 54
extern void FreeQueryDesc(QueryDesc *qdesc);

55
#endif   /* EXECDESC_H  */