PostgreSQL Source Code: src/backend/executor/nodeNestloop.c Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
23
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
61{
72
74
75
76
77
79
86
87
88
89
90
92
93
94
95
96
98
99 for (;;)
100 {
101
102
103
104
106 {
109
110
111
112
114 {
115 ENL1_printf("no outer tuple, ending join");
116 return NULL;
117 }
118
119 ENL1_printf("saving new outer tuple information");
123
124
125
126
127
129 {
131 int paramno = nlp->paramno;
133
135
142
144 paramno);
145 }
146
147
148
149
152 }
153
154
155
156
158
161
163 {
164 ENL1_printf("no inner tuple, need new outer tuple");
165
167
171 {
172
173
174
175
176
177
179
180 ENL1_printf("testing qualification for outer-join tuple");
181
182 if (otherqual == NULL || ExecQual(otherqual, econtext))
183 {
184
185
186
187
188
189 ENL1_printf("qualification succeeded, projecting tuple");
190
192 }
193 else
195 }
196
197
198
199
200 continue;
201 }
202
203
204
205
206
207
208
209
210
212
213 if (ExecQual(joinqual, econtext))
214 {
216
217
219 {
221 continue;
222 }
223
224
225
226
227
228
231
232 if (otherqual == NULL || ExecQual(otherqual, econtext))
233 {
234
235
236
237
238 ENL1_printf("qualification succeeded, projecting tuple");
239
241 }
242 else
244 }
245 else
247
248
249
250
252
253 ENL1_printf("qualification failed, looping");
254 }
255}
256
257
258
259
260
263{
265
266
268
270 "initializing node");
271
272
273
274
279
280
281
282
283
284
286
287
288
289
290
291
292
293
294
295
299 else
300 eflags &= ~EXEC_FLAG_REWIND;
302
303
304
305
308
309
310
311
317
318
319
320
323
324
326 {
329 break;
336 break;
337 default:
338 elog(ERROR, "unrecognized join type: %d",
340 }
341
342
343
344
347
349 "node initialized");
350
351 return nlstate;
352}
353
354
355
356
357
358
359
360void
362{
364 "ending node processing");
365
366
367
368
371
373 "node processing ended");
374}
375
376
377
378
379
380void
382{
384
385
386
387
388
391
392
393
394
395
396
397
400}
Bitmapset * bms_add_member(Bitmapset *a, int x)
void ExecReScan(PlanState *node)
ExprState * ExecInitQual(List *qual, PlanState *parent)
void ExecEndNode(PlanState *node)
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
const TupleTableSlotOps TTSOpsVirtual
void ExecInitResultTupleSlotTL(PlanState *planstate, const TupleTableSlotOps *tts_ops)
TupleTableSlot * ExecInitNullTupleSlot(EState *estate, TupleDesc tupType, const TupleTableSlotOps *tts_ops)
TupleDesc ExecGetResultType(PlanState *planstate)
void ExecAssignExprContext(EState *estate, PlanState *planstate)
void ExecAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc)
#define ENL1_printf(message)
#define InstrCountFiltered1(node, delta)
#define outerPlanState(node)
#define InstrCountFiltered2(node, delta)
#define innerPlanState(node)
#define EXEC_FLAG_BACKWARD
static TupleTableSlot * ExecProject(ProjectionInfo *projInfo)
#define ResetExprContext(econtext)
static bool ExecQual(ExprState *state, ExprContext *econtext)
static TupleTableSlot * ExecProcNode(PlanState *node)
Assert(PointerIsAligned(start, uint64))
#define CHECK_FOR_INTERRUPTS()
static TupleTableSlot * ExecNestLoop(PlanState *pstate)
void ExecEndNestLoop(NestLoopState *node)
void ExecReScanNestLoop(NestLoopState *node)
NestLoopState * ExecInitNestLoop(NestLoop *node, EState *estate, int eflags)
#define IsA(nodeptr, _type_)
#define castNode(_type_, nodeptr)
TupleTableSlot * ecxt_innertuple
ParamExecData * ecxt_param_exec_vals
TupleTableSlot * ecxt_outertuple
TupleTableSlot * nl_NullInnerTupleSlot
ExprContext * ps_ExprContext
ProjectionInfo * ps_ProjInfo
ExecProcNodeMtd ExecProcNode
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)