PostgreSQL Source Code: src/include/executor/execScan.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef EXECSCAN_H
14#define EXECSCAN_H
15
19
20
21
22
23
24
25
26
27
28
29
30
36{
38
39 if (epqstate != NULL)
40 {
41
42
43
44
45
47
48 if (scanrelid == 0)
49 {
50
51
52
53
54
55
56
58
59 if (!(*recheckMtd) (node, slot))
60 ExecClearTuple(slot);
61 return slot;
62 }
63 else if (epqstate->relsubs_done[scanrelid - 1])
64 {
65
66
67
68
69
71
73 }
74 else if (epqstate->relsubs_slot[scanrelid - 1] != NULL)
75 {
76
77
78
79
81
83
84
86
87
89 return NULL;
90
91
92 if (!(*recheckMtd) (node, slot))
93 return ExecClearTuple(slot);
94
95 return slot;
96 }
97 else if (epqstate->relsubs_rowmark[scanrelid - 1] != NULL)
98 {
99
100
101
102
104
105
106 epqstate->relsubs_done[scanrelid - 1] = true;
107
109 return NULL;
110
111
113 return NULL;
114
115
116 if (!(*recheckMtd) (node, slot))
117 return ExecClearTuple(slot);
118
119 return slot;
120 }
121 }
122
123
124
125
126 return (*accessMtd) (node);
127}
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
158{
160
161
162
163
164
165
166
167 if (!qual && !projInfo)
168 {
170 return ExecScanFetch(node, epqstate, accessMtd, recheckMtd);
171 }
172
173
174
175
176
178
179
180
181
182
183 for (;;)
184 {
186
187 slot = ExecScanFetch(node, epqstate, accessMtd, recheckMtd);
188
189
190
191
192
193
194
196 {
197 if (projInfo)
199 else
200 return slot;
201 }
202
203
204
205
207
208
209
210
211
212
213
214
215 if (qual == NULL || ExecQual(qual, econtext))
216 {
217
218
219
220 if (projInfo)
221 {
222
223
224
225
227 }
228 else
229 {
230
231
232
233 return slot;
234 }
235 }
236 else
238
239
240
241
243 }
244}
245
246#endif
#define pg_attribute_always_inline
bool EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot)
static pg_attribute_always_inline TupleTableSlot * ExecScanFetch(ScanState *node, EPQState *epqstate, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd)
static pg_attribute_always_inline TupleTableSlot * ExecScanExtended(ScanState *node, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd, EPQState *epqstate, ExprState *qual, ProjectionInfo *projInfo)
#define InstrCountFiltered1(node, delta)
static TupleTableSlot * ExecProject(ProjectionInfo *projInfo)
#define ResetExprContext(econtext)
static bool ExecQual(ExprState *state, ExprContext *econtext)
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
Assert(PointerIsAligned(start, uint64))
#define CHECK_FOR_INTERRUPTS()
ExecAuxRowMark ** relsubs_rowmark
TupleTableSlot ** relsubs_slot
TupleTableSlot * ecxt_scantuple
TupleTableSlot * resultslot
ExprContext * ps_ExprContext
TupleTableSlot * ss_ScanTupleSlot
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)