PostgreSQL Source Code: src/backend/executor/nodeRecursiveunion.c Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
20
25
26
27
28
29
30
31static void
33{
36
39
40
41
42
43
44
46 desc,
49 node->dupColIdx,
52 node->dupCollations,
54 0,
58 false);
59}
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
82{
88 bool isnew;
89
91
92
94 {
95 for (;;)
96 {
99 break;
100 if (plan->numCols > 0)
101 {
102
104
106
107 if (!isnew)
108 continue;
109 }
110
112
113 return slot;
114 }
116 }
117
118
119 for (;;)
120 {
123 {
125
126
128 break;
129
130
131
132
133
134
135
136
138
142
143
145
146
148 plan->wtParam);
149
150
151 continue;
152 }
153
154 if (plan->numCols > 0)
155 {
156
158
160
161 if (!isnew)
162 continue;
163 }
164
165
168
169 return slot;
170 }
171
172 return NULL;
173}
174
175
176
177
178
181{
184
185
187
188
189
190
193 rustate->ps.state = estate;
195
201
202
207
208
209
210
211
212
213
215 {
218 "RecursiveUnion",
222 "RecursiveUnion hash table",
224 }
225
226
227
228
229
233 prmdata->isnull = false;
234
235
236
237
238
239
240
242
243
244
245
246
248
249
250
251
252
253
255
256
257
258
261
262
263
264
265
267 {
269 node->dupOperators,
273 }
274
275 return rustate;
276}
277
278
279
280
281
282
283
284void
286{
287
290
291
296
297
298
299
302}
303
304
305
306
307
308
309
310void
312{
316
317
318
319
320
322
323
324
325
326
327
330
331
334
335
336 if (plan->numCols > 0)
338
339
344}
Bitmapset * bms_add_member(Bitmapset *a, int x)
void ExecReScan(PlanState *node)
void execTuplesHashPrepare(int numCols, const Oid *eqOperators, Oid **eqFuncOids, FmgrInfo **hashFunctions)
TupleHashEntry LookupTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot, bool *isnew, uint32 *hash)
TupleHashTable BuildTupleHashTable(PlanState *parent, TupleDesc inputDesc, const TupleTableSlotOps *inputOps, int numCols, AttrNumber *keyColIdx, const Oid *eqfuncoids, FmgrInfo *hashfunctions, Oid *collations, long nbuckets, Size additionalsize, MemoryContext metacxt, MemoryContext tablecxt, MemoryContext tempcxt, bool use_variable_hash_iv)
void ResetTupleHashTable(TupleHashTable hashtable)
void ExecEndNode(PlanState *node)
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
void ExecInitResultTypeTL(PlanState *planstate)
TupleDesc ExecGetResultType(PlanState *planstate)
const TupleTableSlotOps * ExecGetCommonChildSlotOps(PlanState *ps)
#define outerPlanState(node)
#define innerPlanState(node)
#define EXEC_FLAG_BACKWARD
static TupleTableSlot * ExecProcNode(PlanState *node)
Assert(PointerIsAligned(start, uint64))
void MemoryContextReset(MemoryContext context)
MemoryContext CurrentMemoryContext
void MemoryContextDelete(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
#define CHECK_FOR_INTERRUPTS()
static void build_hash_table(RecursiveUnionState *rustate)
static TupleTableSlot * ExecRecursiveUnion(PlanState *pstate)
void ExecEndRecursiveUnion(RecursiveUnionState *node)
RecursiveUnionState * ExecInitRecursiveUnion(RecursiveUnion *node, EState *estate, int eflags)
void ExecReScanRecursiveUnion(RecursiveUnionState *node)
#define castNode(_type_, nodeptr)
static Datum PointerGetDatum(const void *X)
ParamExecData * es_param_exec_vals
MemoryContext es_query_cxt
ProjectionInfo * ps_ProjInfo
ExecProcNodeMtd ExecProcNode
MemoryContext tempContext
MemoryContext tableContext
Tuplestorestate * working_table
Tuplestorestate * intermediate_table
void tuplestore_puttupleslot(Tuplestorestate *state, TupleTableSlot *slot)
void tuplestore_clear(Tuplestorestate *state)
Tuplestorestate * tuplestore_begin_heap(bool randomAccess, bool interXact, int maxKBytes)
void tuplestore_end(Tuplestorestate *state)