PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
g
h
i
k
l
m
p
r
s
t
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
c
d
f
h
i
n
o
p
r
s
t
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
execdesc.h
Go to the documentation of this file.
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-2025, PostgreSQL Global Development Group
9
* Portions Copyright (c) 1994, Regents of the University of California
10
*
11
* src/include/executor/execdesc.h
12
*
13
*-------------------------------------------------------------------------
14
*/
15
#ifndef EXECDESC_H
16
#define EXECDESC_H
17
18
#include "
nodes/execnodes.h
"
19
#include "
tcop/dest.h
"
20
21
22
/* ----------------
23
* query descriptor:
24
*
25
* a QueryDesc encapsulates everything that the executor
26
* needs to execute the query.
27
*
28
* For the convenience of SQL-language functions, we also support QueryDescs
29
* containing utility statements; these must not be passed to the executor
30
* however.
31
* ---------------------
32
*/
33
typedef
struct
QueryDesc
34
{
35
/* These fields are provided by CreateQueryDesc */
36
CmdType
operation
;
/* CMD_SELECT, CMD_UPDATE, etc. */
37
PlannedStmt
*
plannedstmt
;
/* planner's output (could be utility, too) */
38
CachedPlan
*
cplan
;
/* CachedPlan that supplies the plannedstmt */
39
const
char
*
sourceText
;
/* source text of the query */
40
Snapshot
snapshot
;
/* snapshot to use for query */
41
Snapshot
crosscheck_snapshot
;
/* crosscheck for RI update/delete */
42
DestReceiver
*
dest
;
/* the destination for tuple output */
43
ParamListInfo
params
;
/* param values being passed in */
44
QueryEnvironment
*
queryEnv
;
/* query environment passed in */
45
int
instrument_options
;
/* OR of InstrumentOption flags */
46
47
/* These fields are set by ExecutorStart */
48
TupleDesc
tupDesc
;
/* descriptor for result tuples */
49
EState
*
estate
;
/* executor's query-wide state */
50
PlanState
*
planstate
;
/* tree of per-plan-node state */
51
52
/* This field is set by ExecutePlan */
53
bool
already_executed
;
/* true if previously executed */
54
55
/* This is always set NULL by the core system, but plugins can change it */
56
struct
Instrumentation
*
totaltime
;
/* total time spent in ExecutorRun */
57
}
QueryDesc
;
58
59
/* in pquery.c */
60
extern
QueryDesc
*
CreateQueryDesc
(
PlannedStmt
*plannedstmt,
61
CachedPlan
*cplan,
62
const
char
*sourceText,
63
Snapshot
snapshot,
64
Snapshot
crosscheck_snapshot,
65
DestReceiver
*
dest
,
66
ParamListInfo
params,
67
QueryEnvironment
*queryEnv,
68
int
instrument_options);
69
70
extern
void
FreeQueryDesc
(
QueryDesc
*qdesc);
71
72
#endif
/* EXECDESC_H */
dest.h
FreeQueryDesc
void FreeQueryDesc(QueryDesc *qdesc)
Definition:
pquery.c:112
CreateQueryDesc
QueryDesc * CreateQueryDesc(PlannedStmt *plannedstmt, CachedPlan *cplan, const char *sourceText, Snapshot snapshot, Snapshot crosscheck_snapshot, DestReceiver *dest, ParamListInfo params, QueryEnvironment *queryEnv, int instrument_options)
Definition:
pquery.c:72
QueryDesc
struct QueryDesc QueryDesc
execnodes.h
generate_unaccent_rules.dest
dest
Definition:
generate_unaccent_rules.py:285
CmdType
CmdType
Definition:
nodes.h:269
CachedPlan
Definition:
plancache.h:163
EState
Definition:
execnodes.h:652
Instrumentation
Definition:
instrument.h:70
ParamListInfoData
Definition:
params.h:111
PlanState
Definition:
execnodes.h:1154
PlannedStmt
Definition:
plannodes.h:47
QueryDesc
Definition:
execdesc.h:34
QueryDesc::sourceText
const char * sourceText
Definition:
execdesc.h:39
QueryDesc::params
ParamListInfo params
Definition:
execdesc.h:43
QueryDesc::dest
DestReceiver * dest
Definition:
execdesc.h:42
QueryDesc::instrument_options
int instrument_options
Definition:
execdesc.h:45
QueryDesc::estate
EState * estate
Definition:
execdesc.h:49
QueryDesc::cplan
CachedPlan * cplan
Definition:
execdesc.h:38
QueryDesc::operation
CmdType operation
Definition:
execdesc.h:36
QueryDesc::snapshot
Snapshot snapshot
Definition:
execdesc.h:40
QueryDesc::already_executed
bool already_executed
Definition:
execdesc.h:53
QueryDesc::plannedstmt
PlannedStmt * plannedstmt
Definition:
execdesc.h:37
QueryDesc::totaltime
struct Instrumentation * totaltime
Definition:
execdesc.h:56
QueryDesc::queryEnv
QueryEnvironment * queryEnv
Definition:
execdesc.h:44
QueryDesc::tupDesc
TupleDesc tupDesc
Definition:
execdesc.h:48
QueryDesc::crosscheck_snapshot
Snapshot crosscheck_snapshot
Definition:
execdesc.h:41
QueryDesc::planstate
PlanState * planstate
Definition:
execdesc.h:50
QueryEnvironment
Definition:
queryenvironment.c:33
SnapshotData
Definition:
snapshot.h:139
TupleDescData
Definition:
tupdesc.h:136
_DestReceiver
Definition:
dest.h:116
src
include
executor
execdesc.h
Generated on Tue Apr 22 2025 00:13:26 for PostgreSQL Source Code by
1.9.4