PostgreSQL Source Code  git master
executor.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * executor.h
4  * support for the POSTGRES executor module
5  *
6  *
7  * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/executor/executor.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef EXECUTOR_H
15 #define EXECUTOR_H
16 
17 #include "executor/execdesc.h"
18 #include "fmgr.h"
19 #include "nodes/lockoptions.h"
20 #include "nodes/parsenodes.h"
21 #include "utils/memutils.h"
22 
23 
24 /*
25  * The "eflags" argument to ExecutorStart and the various ExecInitNode
26  * routines is a bitwise OR of the following flag bits, which tell the
27  * called plan node what to expect. Note that the flags will get modified
28  * as they are passed down the plan tree, since an upper node may require
29  * functionality in its subnode not demanded of the plan as a whole
30  * (example: MergeJoin requires mark/restore capability in its inner input),
31  * or an upper node may shield its input from some functionality requirement
32  * (example: Materialize shields its input from needing to do backward scan).
33  *
34  * EXPLAIN_ONLY indicates that the plan tree is being initialized just so
35  * EXPLAIN can print it out; it will not be run. Hence, no side-effects
36  * of startup should occur. However, error checks (such as permission checks)
37  * should be performed.
38  *
39  * REWIND indicates that the plan node should try to efficiently support
40  * rescans without parameter changes. (Nodes must support ExecReScan calls
41  * in any case, but if this flag was not given, they are at liberty to do it
42  * through complete recalculation. Note that a parameter change forces a
43  * full recalculation in any case.)
44  *
45  * BACKWARD indicates that the plan node must respect the es_direction flag.
46  * When this is not passed, the plan node will only be run forwards.
47  *
48  * MARK indicates that the plan node must support Mark/Restore calls.
49  * When this is not passed, no Mark/Restore will occur.
50  *
51  * SKIP_TRIGGERS tells ExecutorStart/ExecutorFinish to skip calling
52  * AfterTriggerBeginQuery/AfterTriggerEndQuery. This does not necessarily
53  * mean that the plan can't queue any AFTER triggers; just that the caller
54  * is responsible for there being a trigger context for them to be queued in.
55  */
56 #define EXEC_FLAG_EXPLAIN_ONLY 0x0001 /* EXPLAIN, no ANALYZE */
57 #define EXEC_FLAG_REWIND 0x0002 /* need efficient rescan */
58 #define EXEC_FLAG_BACKWARD 0x0004 /* need backward scan */
59 #define EXEC_FLAG_MARK 0x0008 /* need mark/restore */
60 #define EXEC_FLAG_SKIP_TRIGGERS 0x0010 /* skip AfterTrigger calls */
61 #define EXEC_FLAG_WITH_NO_DATA 0x0020 /* rel scannability doesn't matter */
62 
63 
64 /* Hook for plugins to get control in ExecutorStart() */
65 typedef void (*ExecutorStart_hook_type) (QueryDesc *queryDesc, int eflags);
67 
68 /* Hook for plugins to get control in ExecutorRun() */
69 typedef void (*ExecutorRun_hook_type) (QueryDesc *queryDesc,
70  ScanDirection direction,
71  uint64 count,
72  bool execute_once);
74 
75 /* Hook for plugins to get control in ExecutorFinish() */
76 typedef void (*ExecutorFinish_hook_type) (QueryDesc *queryDesc);
78 
79 /* Hook for plugins to get control in ExecutorEnd() */
80 typedef void (*ExecutorEnd_hook_type) (QueryDesc *queryDesc);
82 
83 /* Hook for plugins to get control in ExecCheckRTPerms() */
86 
87 
88 /*
89  * prototypes from functions in execAmi.c
90  */
91 struct Path; /* avoid including pathnodes.h here */
92 
93 extern void ExecReScan(PlanState *node);
94 extern void ExecMarkPos(PlanState *node);
95 extern void ExecRestrPos(PlanState *node);
96 extern bool ExecSupportsMarkRestore(struct Path *pathnode);
97 extern bool ExecSupportsBackwardScan(Plan *node);
98 extern bool ExecMaterializesOutput(NodeTag plantype);
99 
100 /*
101  * prototypes from functions in execCurrent.c
102  */
103 extern bool execCurrentOf(CurrentOfExpr *cexpr,
104  ExprContext *econtext,
105  Oid table_oid,
106  ItemPointer current_tid);
107 
108 /*
109  * prototypes from functions in execGrouping.c
110  */
112  int numCols,
113  const AttrNumber *keyColIdx,
114  const Oid *eqOperators,
115  const Oid *collations,
116  PlanState *parent);
117 extern void execTuplesHashPrepare(int numCols,
118  const Oid *eqOperators,
119  Oid **eqFuncOids,
120  FmgrInfo **hashFunctions);
122  TupleDesc inputDesc,
123  int numCols, AttrNumber *keyColIdx,
124  const Oid *eqfuncoids,
125  FmgrInfo *hashfunctions,
126  Oid *collations,
127  long nbuckets, Size additionalsize,
128  MemoryContext tablecxt,
129  MemoryContext tempcxt, bool use_variable_hash_iv);
131  TupleDesc inputDesc,
132  int numCols, AttrNumber *keyColIdx,
133  const Oid *eqfuncoids,
134  FmgrInfo *hashfunctions,
135  Oid *collations,
136  long nbuckets, Size additionalsize,
137  MemoryContext metacxt,
138  MemoryContext tablecxt,
139  MemoryContext tempcxt, bool use_variable_hash_iv);
141  TupleTableSlot *slot,
142  bool *isnew, uint32 *hash);
143 extern uint32 TupleHashTableHash(TupleHashTable hashtable,
144  TupleTableSlot *slot);
146  TupleTableSlot *slot,
147  bool *isnew, uint32 hash);
149  TupleTableSlot *slot,
150  ExprState *eqcomp,
151  FmgrInfo *hashfunctions);
152 extern void ResetTupleHashTable(TupleHashTable hashtable);
153 
154 /*
155  * prototypes from functions in execJunk.c
156  */
157 extern JunkFilter *ExecInitJunkFilter(List *targetList,
158  TupleTableSlot *slot);
159 extern JunkFilter *ExecInitJunkFilterConversion(List *targetList,
160  TupleDesc cleanTupType,
161  TupleTableSlot *slot);
162 extern AttrNumber ExecFindJunkAttribute(JunkFilter *junkfilter,
163  const char *attrName);
164 extern AttrNumber ExecFindJunkAttributeInTlist(List *targetlist,
165  const char *attrName);
166 extern TupleTableSlot *ExecFilterJunk(JunkFilter *junkfilter,
167  TupleTableSlot *slot);
168 
169 /*
170  * ExecGetJunkAttribute
171  *
172  * Given a junk filter's input tuple (slot) and a junk attribute's number
173  * previously found by ExecFindJunkAttribute, extract & return the value and
174  * isNull flag of the attribute.
175  */
176 #ifndef FRONTEND
177 static inline Datum
178 ExecGetJunkAttribute(TupleTableSlot *slot, AttrNumber attno, bool *isNull)
179 {
180  Assert(attno > 0);
181  return slot_getattr(slot, attno, isNull);
182 }
183 #endif
184 
185 /*
186  * prototypes from functions in execMain.c
187  */
188 extern void ExecutorStart(QueryDesc *queryDesc, int eflags);
189 extern void standard_ExecutorStart(QueryDesc *queryDesc, int eflags);
190 extern void ExecutorRun(QueryDesc *queryDesc,
191  ScanDirection direction, uint64 count, bool execute_once);
192 extern void standard_ExecutorRun(QueryDesc *queryDesc,
193  ScanDirection direction, uint64 count, bool execute_once);
194 extern void ExecutorFinish(QueryDesc *queryDesc);
195 extern void standard_ExecutorFinish(QueryDesc *queryDesc);
196 extern void ExecutorEnd(QueryDesc *queryDesc);
197 extern void standard_ExecutorEnd(QueryDesc *queryDesc);
198 extern void ExecutorRewind(QueryDesc *queryDesc);
199 extern bool ExecCheckRTPerms(List *rangeTable, bool ereport_on_violation);
200 extern void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation);
201 extern void InitResultRelInfo(ResultRelInfo *resultRelInfo,
202  Relation resultRelationDesc,
203  Index resultRelationIndex,
204  ResultRelInfo *partition_root_rri,
205  int instrument_options);
206 extern ResultRelInfo *ExecGetTriggerResultRel(EState *estate, Oid relid);
207 extern void ExecConstraints(ResultRelInfo *resultRelInfo,
208  TupleTableSlot *slot, EState *estate);
209 extern bool ExecPartitionCheck(ResultRelInfo *resultRelInfo,
210  TupleTableSlot *slot, EState *estate, bool emitError);
211 extern void ExecPartitionCheckEmitError(ResultRelInfo *resultRelInfo,
212  TupleTableSlot *slot, EState *estate);
213 extern void ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo,
214  TupleTableSlot *slot, EState *estate);
215 extern LockTupleMode ExecUpdateLockMode(EState *estate, ResultRelInfo *relinfo);
216 extern ExecRowMark *ExecFindRowMark(EState *estate, Index rti, bool missing_ok);
217 extern ExecAuxRowMark *ExecBuildAuxRowMark(ExecRowMark *erm, List *targetlist);
218 extern TupleTableSlot *EvalPlanQual(EPQState *epqstate, Relation relation,
219  Index rti, TupleTableSlot *testslot);
220 extern void EvalPlanQualInit(EPQState *epqstate, EState *parentestate,
221  Plan *subplan, List *auxrowmarks, int epqParam);
222 extern void EvalPlanQualSetPlan(EPQState *epqstate,
223  Plan *subplan, List *auxrowmarks);
224 extern TupleTableSlot *EvalPlanQualSlot(EPQState *epqstate,
225  Relation relation, Index rti);
226 
227 #define EvalPlanQualSetSlot(epqstate, slot) ((epqstate)->origslot = (slot))
228 extern bool EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot);
229 extern TupleTableSlot *EvalPlanQualNext(EPQState *epqstate);
230 extern void EvalPlanQualBegin(EPQState *epqstate);
231 extern void EvalPlanQualEnd(EPQState *epqstate);
232 
233 /*
234  * functions in execProcnode.c
235  */
236 extern PlanState *ExecInitNode(Plan *node, EState *estate, int eflags);
237 extern void ExecSetExecProcNode(PlanState *node, ExecProcNodeMtd function);
238 extern Node *MultiExecProcNode(PlanState *node);
239 extern void ExecEndNode(PlanState *node);
240 extern bool ExecShutdownNode(PlanState *node);
241 extern void ExecSetTupleBound(int64 tuples_needed, PlanState *child_node);
242 
243 
244 /* ----------------------------------------------------------------
245  * ExecProcNode
246  *
247  * Execute the given node to return a(nother) tuple.
248  * ----------------------------------------------------------------
249  */
250 #ifndef FRONTEND
251 static inline TupleTableSlot *
253 {
254  if (node->chgParam != NULL) /* something changed? */
255  ExecReScan(node); /* let ReScan handle this */
256 
257  return node->ExecProcNode(node);
258 }
259 #endif
260 
261 /*
262  * prototypes from functions in execExpr.c
263  */
264 extern ExprState *ExecInitExpr(Expr *node, PlanState *parent);
265 extern ExprState *ExecInitExprWithParams(Expr *node, ParamListInfo ext_params);
266 extern ExprState *ExecInitQual(List *qual, PlanState *parent);
267 extern ExprState *ExecInitCheck(List *qual, PlanState *parent);
268 extern List *ExecInitExprList(List *nodes, PlanState *parent);
269 extern ExprState *ExecBuildAggTrans(AggState *aggstate, struct AggStatePerPhaseData *phase,
270  bool doSort, bool doHash, bool nullcheck);
272  const TupleTableSlotOps *lops, const TupleTableSlotOps *rops,
273  int numCols,
274  const AttrNumber *keyColIdx,
275  const Oid *eqfunctions,
276  const Oid *collations,
277  PlanState *parent);
279  const TupleTableSlotOps *lops,
280  const TupleTableSlotOps *rops,
281  const Oid *eqfunctions,
282  const Oid *collations,
283  const List *param_exprs,
284  PlanState *parent);
285 extern ProjectionInfo *ExecBuildProjectionInfo(List *targetList,
286  ExprContext *econtext,
287  TupleTableSlot *slot,
288  PlanState *parent,
289  TupleDesc inputDesc);
290 extern ProjectionInfo *ExecBuildUpdateProjection(List *targetList,
291  bool evalTargetList,
292  List *targetColnos,
293  TupleDesc relDesc,
294  ExprContext *econtext,
295  TupleTableSlot *slot,
296  PlanState *parent);
297 extern ExprState *ExecPrepareExpr(Expr *node, EState *estate);
298 extern ExprState *ExecPrepareQual(List *qual, EState *estate);
299 extern ExprState *ExecPrepareCheck(List *qual, EState *estate);
300 extern List *ExecPrepareExprList(List *nodes, EState *estate);
301 
302 /*
303  * ExecEvalExpr
304  *
305  * Evaluate expression identified by "state" in the execution context
306  * given by "econtext". *isNull is set to the is-null flag for the result,
307  * and the Datum value is the function result.
308  *
309  * The caller should already have switched into the temporary memory
310  * context econtext->ecxt_per_tuple_memory. The convenience entry point
311  * ExecEvalExprSwitchContext() is provided for callers who don't prefer to
312  * do the switch in an outer loop.
313  */
314 #ifndef FRONTEND
315 static inline Datum
317  ExprContext *econtext,
318  bool *isNull)
319 {
320  return state->evalfunc(state, econtext, isNull);
321 }
322 #endif
323 
324 /*
325  * ExecEvalExprSwitchContext
326  *
327  * Same as ExecEvalExpr, but get into the right allocation context explicitly.
328  */
329 #ifndef FRONTEND
330 static inline Datum
332  ExprContext *econtext,
333  bool *isNull)
334 {
335  Datum retDatum;
336  MemoryContext oldContext;
337 
338  oldContext = MemoryContextSwitchTo(econtext->ecxt_per_tuple_memory);
339  retDatum = state->evalfunc(state, econtext, isNull);
340  MemoryContextSwitchTo(oldContext);
341  return retDatum;
342 }
343 #endif
344 
345 /*
346  * ExecProject
347  *
348  * Projects a tuple based on projection info and stores it in the slot passed
349  * to ExecBuildProjectionInfo().
350  *
351  * Note: the result is always a virtual tuple; therefore it may reference
352  * the contents of the exprContext's scan tuples and/or temporary results
353  * constructed in the exprContext. If the caller wishes the result to be
354  * valid longer than that data will be valid, he must call ExecMaterializeSlot
355  * on the result slot.
356  */
357 #ifndef FRONTEND
358 static inline TupleTableSlot *
360 {
361  ExprContext *econtext = projInfo->pi_exprContext;
362  ExprState *state = &projInfo->pi_state;
363  TupleTableSlot *slot = state->resultslot;
364  bool isnull;
365 
366  /*
367  * Clear any former contents of the result slot. This makes it safe for
368  * us to use the slot's Datum/isnull arrays as workspace.
369  */
370  ExecClearTuple(slot);
371 
372  /* Run the expression, discarding scalar result from the last column. */
373  (void) ExecEvalExprSwitchContext(state, econtext, &isnull);
374 
375  /*
376  * Successfully formed a result row. Mark the result slot as containing a
377  * valid virtual tuple (inlined version of ExecStoreVirtualTuple()).
378  */
379  slot->tts_flags &= ~TTS_FLAG_EMPTY;
380  slot->tts_nvalid = slot->tts_tupleDescriptor->natts;
381 
382  return slot;
383 }
384 #endif
385 
386 /*
387  * ExecQual - evaluate a qual prepared with ExecInitQual (possibly via
388  * ExecPrepareQual). Returns true if qual is satisfied, else false.
389  *
390  * Note: ExecQual used to have a third argument "resultForNull". The
391  * behavior of this function now corresponds to resultForNull == false.
392  * If you want the resultForNull == true behavior, see ExecCheck.
393  */
394 #ifndef FRONTEND
395 static inline bool
397 {
398  Datum ret;
399  bool isnull;
400 
401  /* short-circuit (here and in ExecInitQual) for empty restriction list */
402  if (state == NULL)
403  return true;
404 
405  /* verify that expression was compiled using ExecInitQual */
406  Assert(state->flags & EEO_FLAG_IS_QUAL);
407 
408  ret = ExecEvalExprSwitchContext(state, econtext, &isnull);
409 
410  /* EEOP_QUAL should never return NULL */
411  Assert(!isnull);
412 
413  return DatumGetBool(ret);
414 }
415 #endif
416 
417 /*
418  * ExecQualAndReset() - evaluate qual with ExecQual() and reset expression
419  * context.
420  */
421 #ifndef FRONTEND
422 static inline bool
424 {
425  bool ret = ExecQual(state, econtext);
426 
427  /* inline ResetExprContext, to avoid ordering issue in this file */
429  return ret;
430 }
431 #endif
432 
433 extern bool ExecCheck(ExprState *state, ExprContext *context);
434 
435 /*
436  * prototypes from functions in execSRF.c
437  */
439  ExprContext *econtext, PlanState *parent);
441  ExprContext *econtext,
442  MemoryContext argContext,
443  TupleDesc expectedDesc,
444  bool randomAccess);
446  ExprContext *econtext, PlanState *parent);
448  ExprContext *econtext,
449  MemoryContext argContext,
450  bool *isNull,
451  ExprDoneCond *isDone);
452 
453 /*
454  * prototypes from functions in execScan.c
455  */
456 typedef TupleTableSlot *(*ExecScanAccessMtd) (ScanState *node);
458 
459 extern TupleTableSlot *ExecScan(ScanState *node, ExecScanAccessMtd accessMtd,
460  ExecScanRecheckMtd recheckMtd);
461 extern void ExecAssignScanProjectionInfo(ScanState *node);
462 extern void ExecAssignScanProjectionInfoWithVarno(ScanState *node, int varno);
463 extern void ExecScanReScan(ScanState *node);
464 
465 /*
466  * prototypes from functions in execTuples.c
467  */
468 extern void ExecInitResultTypeTL(PlanState *planstate);
469 extern void ExecInitResultSlot(PlanState *planstate,
470  const TupleTableSlotOps *tts_ops);
471 extern void ExecInitResultTupleSlotTL(PlanState *planstate,
472  const TupleTableSlotOps *tts_ops);
473 extern void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate,
474  TupleDesc tupleDesc,
475  const TupleTableSlotOps *tts_ops);
477  TupleDesc tupledesc,
478  const TupleTableSlotOps *tts_ops);
479 extern TupleTableSlot *ExecInitNullTupleSlot(EState *estate, TupleDesc tupType,
480  const TupleTableSlotOps *tts_ops);
481 extern TupleDesc ExecTypeFromTL(List *targetList);
482 extern TupleDesc ExecCleanTypeFromTL(List *targetList);
483 extern TupleDesc ExecTypeFromExprList(List *exprList);
484 extern void ExecTypeSetColNames(TupleDesc typeInfo, List *namesList);
485 extern void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg);
486 
487 typedef struct TupOutputState
488 {
492 
494  TupleDesc tupdesc,
495  const TupleTableSlotOps *tts_ops);
496 extern void do_tup_output(TupOutputState *tstate, Datum *values, bool *isnull);
497 extern void do_text_output_multiline(TupOutputState *tstate, const char *txt);
498 extern void end_tup_output(TupOutputState *tstate);
499 
500 /*
501  * Write a single line of text given as a C string.
502  *
503  * Should only be used with a single-TEXT-attribute tupdesc.
504  */
505 #define do_text_output_oneline(tstate, str_to_emit) \
506  do { \
507  Datum values_[1]; \
508  bool isnull_[1]; \
509  values_[0] = PointerGetDatum(cstring_to_text(str_to_emit)); \
510  isnull_[0] = false; \
511  do_tup_output(tstate, values_, isnull_); \
512  pfree(DatumGetPointer(values_[0])); \
513  } while (0)
514 
515 
516 /*
517  * prototypes from functions in execUtils.c
518  */
519 extern EState *CreateExecutorState(void);
520 extern void FreeExecutorState(EState *estate);
521 extern ExprContext *CreateExprContext(EState *estate);
522 extern ExprContext *CreateWorkExprContext(EState *estate);
524 extern void FreeExprContext(ExprContext *econtext, bool isCommit);
525 extern void ReScanExprContext(ExprContext *econtext);
526 
527 #define ResetExprContext(econtext) \
528  MemoryContextReset((econtext)->ecxt_per_tuple_memory)
529 
531 
532 /* Get an EState's per-output-tuple exprcontext, making it if first use */
533 #define GetPerTupleExprContext(estate) \
534  ((estate)->es_per_tuple_exprcontext ? \
535  (estate)->es_per_tuple_exprcontext : \
536  MakePerTupleExprContext(estate))
537 
538 #define GetPerTupleMemoryContext(estate) \
539  (GetPerTupleExprContext(estate)->ecxt_per_tuple_memory)
540 
541 /* Reset an EState's per-output-tuple exprcontext, if one's been created */
542 #define ResetPerTupleExprContext(estate) \
543  do { \
544  if ((estate)->es_per_tuple_exprcontext) \
545  ResetExprContext((estate)->es_per_tuple_exprcontext); \
546  } while (0)
547 
548 extern void ExecAssignExprContext(EState *estate, PlanState *planstate);
549 extern TupleDesc ExecGetResultType(PlanState *planstate);
550 extern const TupleTableSlotOps *ExecGetResultSlotOps(PlanState *planstate,
551  bool *isfixed);
552 extern void ExecAssignProjectionInfo(PlanState *planstate,
553  TupleDesc inputDesc);
554 extern void ExecConditionalAssignProjectionInfo(PlanState *planstate,
555  TupleDesc inputDesc, int varno);
556 extern void ExecFreeExprContext(PlanState *planstate);
557 extern void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc);
558 extern void ExecCreateScanSlotFromOuterPlan(EState *estate,
559  ScanState *scanstate,
560  const TupleTableSlotOps *tts_ops);
561 
562 extern bool ExecRelationIsTargetRelation(EState *estate, Index scanrelid);
563 
564 extern Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags);
565 
566 extern void ExecInitRangeTable(EState *estate, List *rangeTable);
567 extern void ExecCloseRangeTableRelations(EState *estate);
568 extern void ExecCloseResultRelations(EState *estate);
569 
570 static inline RangeTblEntry *
572 {
573  return (RangeTblEntry *) list_nth(estate->es_range_table, rti - 1);
574 }
575 
576 extern Relation ExecGetRangeTableRelation(EState *estate, Index rti);
577 extern void ExecInitResultRelation(EState *estate, ResultRelInfo *resultRelInfo,
578  Index rti);
579 
580 extern int executor_errposition(EState *estate, int location);
581 
582 extern void RegisterExprContextCallback(ExprContext *econtext,
584  Datum arg);
585 extern void UnregisterExprContextCallback(ExprContext *econtext,
587  Datum arg);
588 
589 extern Datum GetAttributeByName(HeapTupleHeader tuple, const char *attname,
590  bool *isNull);
592  bool *isNull);
593 
594 extern int ExecTargetListLength(List *targetlist);
595 extern int ExecCleanTargetListLength(List *targetlist);
596 
597 extern TupleTableSlot *ExecGetTriggerOldSlot(EState *estate, ResultRelInfo *relInfo);
598 extern TupleTableSlot *ExecGetTriggerNewSlot(EState *estate, ResultRelInfo *relInfo);
599 extern TupleTableSlot *ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo);
601 
602 extern Bitmapset *ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate);
603 extern Bitmapset *ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate);
604 extern Bitmapset *ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate);
605 extern Bitmapset *ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate);
606 
607 /*
608  * prototypes from functions in execIndexing.c
609  */
610 extern void ExecOpenIndices(ResultRelInfo *resultRelInfo, bool speculative);
611 extern void ExecCloseIndices(ResultRelInfo *resultRelInfo);
612 extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo,
613  TupleTableSlot *slot, EState *estate,
614  bool update,
615  bool noDupErr,
616  bool *specConflict, List *arbiterIndexes);
617 extern bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo,
618  TupleTableSlot *slot,
619  EState *estate, ItemPointer conflictTid,
620  List *arbiterIndexes);
622  IndexInfo *indexInfo,
623  ItemPointer tupleid,
624  Datum *values, bool *isnull,
625  EState *estate, bool newIndex);
626 
627 /*
628  * prototypes from functions in execReplication.c
629  */
630 extern bool RelationFindReplTupleByIndex(Relation rel, Oid idxoid,
631  LockTupleMode lockmode,
632  TupleTableSlot *searchslot,
633  TupleTableSlot *outslot);
634 extern bool RelationFindReplTupleSeq(Relation rel, LockTupleMode lockmode,
635  TupleTableSlot *searchslot, TupleTableSlot *outslot);
636 
637 extern void ExecSimpleRelationInsert(ResultRelInfo *resultRelInfo,
638  EState *estate, TupleTableSlot *slot);
639 extern void ExecSimpleRelationUpdate(ResultRelInfo *resultRelInfo,
640  EState *estate, EPQState *epqstate,
641  TupleTableSlot *searchslot, TupleTableSlot *slot);
642 extern void ExecSimpleRelationDelete(ResultRelInfo *resultRelInfo,
643  EState *estate, EPQState *epqstate,
644  TupleTableSlot *searchslot);
645 extern void CheckCmdReplicaIdentity(Relation rel, CmdType cmd);
646 
647 extern void CheckSubscriptionRelkind(char relkind, const char *nspname,
648  const char *relname);
649 
650 /*
651  * prototypes from functions in nodeModifyTable.c
652  */
654  TupleTableSlot *planSlot,
655  TupleTableSlot *oldSlot);
657  Oid resultoid,
658  bool missing_ok,
659  bool update_cache);
660 
661 #endif /* EXECUTOR_H */
bool ExecRelationIsTargetRelation(EState *estate, Index scanrelid)
Definition: execUtils.c:707
Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags)
Definition: execUtils.c:720
TupleHashTable BuildTupleHashTable(PlanState *parent, TupleDesc inputDesc, int numCols, AttrNumber *keyColIdx, const Oid *eqfuncoids, FmgrInfo *hashfunctions, Oid *collations, long nbuckets, Size additionalsize, MemoryContext tablecxt, MemoryContext tempcxt, bool use_variable_hash_iv)
Definition: execGrouping.c:255
TupleTableSlot * ExecInitNullTupleSlot(EState *estate, TupleDesc tupType, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1847
TupleDesc ExecGetResultType(PlanState *planstate)
Definition: execUtils.c:490
LockTupleMode ExecUpdateLockMode(EState *estate, ResultRelInfo *relinfo)
Definition: execMain.c:2240
void(* ExecutorRun_hook_type)(QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once)
Definition: executor.h:69
Definition: fmgr.h:56
void ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition: execMain.c:1954
ProjectionInfo * ExecBuildProjectionInfo(List *targetList, ExprContext *econtext, TupleTableSlot *slot, PlanState *parent, TupleDesc inputDesc)
Definition: execExpr.c:353
#define TTS_FLAG_EMPTY
Definition: tuptable.h:96
bool ExecSupportsBackwardScan(Plan *node)
Definition: execAmi.c:512
LockTupleMode
Definition: lockoptions.h:49
ResultRelInfo * ExecGetTriggerResultRel(EState *estate, Oid relid)
Definition: execMain.c:1282
JunkFilter * ExecInitJunkFilter(List *targetList, TupleTableSlot *slot)
Definition: execJunk.c:60
ExprContext * CreateExprContext(EState *estate)
Definition: execUtils.c:301
static Datum ExecEvalExprSwitchContext(ExprState *state, ExprContext *econtext, bool *isNull)
Definition: executor.h:331
TupleTableSlot * ExecGetTriggerNewSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1188
ExecRowMark * ExecFindRowMark(EState *estate, Index rti, bool missing_ok)
Definition: execMain.c:2266
ExprState * ExecInitQual(List *qual, PlanState *parent)
Definition: execExpr.c:209
void CheckSubscriptionRelkind(char relkind, const char *nspname, const char *relname)
ExecAuxRowMark * ExecBuildAuxRowMark(ExecRowMark *erm, List *targetlist)
Definition: execMain.c:2289
TupleTableSlot * EvalPlanQualSlot(EPQState *epqstate, Relation relation, Index rti)
Definition: execMain.c:2469
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
Definition: tuptable.h:425
ExprState * ExecInitExprWithParams(Expr *node, ParamListInfo ext_params)
Definition: execExpr.c:160
void ExecScanReScan(ScanState *node)
Definition: execScan.c:299
ProjectionInfo * ExecBuildUpdateProjection(List *targetList, bool evalTargetList, List *targetColnos, TupleDesc relDesc, ExprContext *econtext, TupleTableSlot *slot, PlanState *parent)
Definition: execExpr.c:513
AttrNumber ExecFindJunkAttribute(JunkFilter *junkfilter, const char *attrName)
Definition: execJunk.c:210
void standard_ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once)
Definition: execMain.c:309
Datum GetAttributeByNum(HeapTupleHeader tuple, AttrNumber attrno, bool *isNull)
Definition: execUtils.c:1086
MemoryContext ecxt_per_tuple_memory
Definition: execnodes.h:235
void ExecInitResultTypeTL(PlanState *planstate)
Definition: execTuples.c:1755
void UnregisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg)
Definition: execUtils.c:951
void standard_ExecutorFinish(QueryDesc *queryDesc)
Definition: execMain.c:408
void ExecCloseIndices(ResultRelInfo *resultRelInfo)
Definition: execIndexing.c:231
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
TupleHashEntry FindTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot, ExprState *eqcomp, FmgrInfo *hashfunctions)
Definition: execGrouping.c:393
Node * MultiExecProcNode(PlanState *node)
Definition: execProcnode.c:501
Definition: nodes.h:537
int ExecCleanTargetListLength(List *targetlist)
Definition: execUtils.c:1147
void ExecRestrPos(PlanState *node)
Definition: execAmi.c:377
int executor_errposition(EState *estate, int location)
Definition: execUtils.c:898
void(* ExecutorFinish_hook_type)(QueryDesc *queryDesc)
Definition: executor.h:76
void InitResultRelInfo(ResultRelInfo *resultRelInfo, Relation resultRelationDesc, Index resultRelationIndex, ResultRelInfo *partition_root_rri, int instrument_options)
Definition: execMain.c:1193
void ExecAssignScanProjectionInfo(ScanState *node)
Definition: execScan.c:272
void MemoryContextReset(MemoryContext context)
Definition: mcxt.c:143
TupleConversionMap * ExecGetChildToRootMap(ResultRelInfo *resultRelInfo)
Definition: execUtils.c:1234
TupleTableSlot * EvalPlanQual(EPQState *epqstate, Relation relation, Index rti, TupleTableSlot *testslot)
Definition: execMain.c:2359
bool(* ExecutorCheckPerms_hook_type)(List *, bool)
Definition: executor.h:84
TupleTableSlot * slot
Definition: executor.h:489
bool RelationFindReplTupleByIndex(Relation rel, Oid idxoid, LockTupleMode lockmode, TupleTableSlot *searchslot, TupleTableSlot *outslot)
void ExecOpenIndices(ResultRelInfo *resultRelInfo, bool speculative)
Definition: execIndexing.c:156
TupleTableSlot * resultslot
Definition: execnodes.h:81
List * es_range_table
Definition: execnodes.h:561
bool ExecCheck(ExprState *state, ExprContext *context)
Definition: execExpr.c:853
NameData relname
Definition: pg_class.h:38
unsigned int Oid
Definition: postgres_ext.h:31
void ExecFreeExprContext(PlanState *planstate)
Definition: execUtils.c:650
static bool ExecQual(ExprState *state, ExprContext *econtext)
Definition: executor.h:396
NodeTag
Definition: nodes.h:26
JunkFilter * ExecInitJunkFilterConversion(List *targetList, TupleDesc cleanTupType, TupleTableSlot *slot)
Definition: execJunk.c:137
struct TupOutputState TupOutputState
void standard_ExecutorEnd(QueryDesc *queryDesc)
Definition: execMain.c:468
TupleTableSlot *(* ExecProcNodeMtd)(struct PlanState *pstate)
Definition: execnodes.h:954
List * ExecInsertIndexTuples(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, bool update, bool noDupErr, bool *specConflict, List *arbiterIndexes)
Definition: execIndexing.c:284
#define PGDLLIMPORT
Definition: c.h:1317
Datum ExecMakeFunctionResultSet(SetExprState *fcache, ExprContext *econtext, MemoryContext argContext, bool *isNull, ExprDoneCond *isDone)
Definition: execSRF.c:497
void ExecInitResultRelation(EState *estate, ResultRelInfo *resultRelInfo, Index rti)
Definition: execUtils.c:834
void ExecTypeSetColNames(TupleDesc typeInfo, List *namesList)
Definition: execTuples.c:2036
bool ExecShutdownNode(PlanState *node)
Definition: execProcnode.c:772
Definition: type.h:89
bool ExecCheckRTPerms(List *rangeTable, bool ereport_on_violation)
Definition: execMain.c:568
void standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
Definition: execMain.c:147
Bitmapset * ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1256
bool ExecSupportsMarkRestore(struct Path *pathnode)
Definition: execAmi.c:419
TupleDesc ExecTypeFromExprList(List *exprList)
Definition: execTuples.c:1997
uint16 tts_flags
Definition: tuptable.h:119
TupleTableSlot * ExecGetTriggerOldSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1166
void EvalPlanQualSetPlan(EPQState *epqstate, Plan *subplan, List *auxrowmarks)
Definition: execMain.c:2452
void ExecSimpleRelationUpdate(ResultRelInfo *resultRelInfo, EState *estate, EPQState *epqstate, TupleTableSlot *searchslot, TupleTableSlot *slot)
void ExecutorRewind(QueryDesc *queryDesc)
Definition: execMain.c:525
NameData attname
Definition: pg_attribute.h:41
PGDLLIMPORT ExecutorEnd_hook_type ExecutorEnd_hook
Definition: execMain.c:74
static void * list_nth(const List *list, int n)
Definition: pg_list.h:278
bool ExecMaterializesOutput(NodeTag plantype)
Definition: execAmi.c:637
TupleTableSlot * ExecScan(ScanState *node, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd)
Definition: execScan.c:158
TupleTableSlot * ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1210
TupleDesc ExecCleanTypeFromTL(List *targetList)
Definition: execTuples.c:1950
void ExecConstraints(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition: execMain.c:1821
RelOptInfo * parent
Definition: pathnodes.h:1182
ExprState * ExecBuildParamSetEqual(TupleDesc desc, const TupleTableSlotOps *lops, const TupleTableSlotOps *rops, const Oid *eqfunctions, const Oid *collations, const List *param_exprs, PlanState *parent)
Definition: execExpr.c:3865
void ExecInitRangeTable(EState *estate, List *rangeTable)
Definition: execUtils.c:751
void ExecCloseResultRelations(EState *estate)
Definition: execMain.c:1439
void EvalPlanQualInit(EPQState *epqstate, EState *parentestate, Plan *subplan, List *auxrowmarks, int epqParam)
Definition: execMain.c:2413
void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc)
Definition: execUtils.c:670
ExprStateEvalFunc evalfunc
Definition: execnodes.h:92
PGDLLIMPORT ExecutorStart_hook_type ExecutorStart_hook
Definition: execMain.c:71
static Datum ExecEvalExpr(ExprState *state, ExprContext *econtext, bool *isNull)
Definition: executor.h:316
ExprState * execTuplesMatchPrepare(TupleDesc desc, int numCols, const AttrNumber *keyColIdx, const Oid *eqOperators, const Oid *collations, PlanState *parent)
Definition: execGrouping.c:59
#define EEO_FLAG_IS_QUAL
Definition: execnodes.h:60
void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg)
Definition: execUtils.c:864
bool execCurrentOf(CurrentOfExpr *cexpr, ExprContext *econtext, Oid table_oid, ItemPointer current_tid)
Definition: execCurrent.c:44
ScanDirection
Definition: sdir.h:22
#define DatumGetBool(X)
Definition: postgres.h:437
void ExecAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc)
Definition: execUtils.c:535
TupleTableSlot * ExecInitExtraTupleSlot(EState *estate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1831
static RangeTblEntry * exec_rt_fetch(Index rti, EState *estate)
Definition: executor.h:571
unsigned int uint32
Definition: c.h:441
TupleTableSlot * EvalPlanQualNext(EPQState *epqstate)
Definition: execMain.c:2606
void EvalPlanQualBegin(EPQState *epqstate)
Definition: execMain.c:2622
void end_tup_output(TupOutputState *tstate)
Definition: execTuples.c:2344
Bitmapset * ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1347
void ExecConditionalAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc, int varno)
Definition: execUtils.c:555
ExprState * ExecPrepareCheck(List *qual, EState *estate)
Definition: execExpr.c:797
ExprState * ExecInitCheck(List *qual, PlanState *parent)
Definition: execExpr.c:298
WCOKind
Definition: parsenodes.h:1216
void ExecSimpleRelationDelete(ResultRelInfo *resultRelInfo, EState *estate, EPQState *epqstate, TupleTableSlot *searchslot)
List * ExecPrepareExprList(List *nodes, EState *estate)
Definition: execExpr.c:820
TupOutputState * begin_tup_output_tupdesc(DestReceiver *dest, TupleDesc tupdesc, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:2266
void ResetTupleHashTable(TupleHashTable hashtable)
Definition: execGrouping.c:285
Bitmapset * chgParam
Definition: execnodes.h:999
void ExecAssignExprContext(EState *estate, PlanState *planstate)
Definition: execUtils.c:480
void ExecutorFinish(QueryDesc *queryDesc)
Definition: execMain.c:399
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
Definition: executor.h:457
void ExecInitResultTupleSlotTL(PlanState *planstate, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1799
ExprContext * CreateStandaloneExprContext(void)
Definition: execUtils.c:352
ExprDoneCond
Definition: execnodes.h:273
TupleDesc tts_tupleDescriptor
Definition: tuptable.h:124
void ExecReScan(PlanState *node)
Definition: execAmi.c:78
bool EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot)
Definition: execMain.c:2497
static bool ExecQualAndReset(ExprState *state, ExprContext *econtext)
Definition: executor.h:423
AttrNumber ExecFindJunkAttributeInTlist(List *targetlist, const char *attrName)
Definition: execJunk.c:222
TupleHashEntry LookupTupleHashEntryHash(TupleHashTable hashtable, TupleTableSlot *slot, bool *isnew, uint32 hash)
Definition: execGrouping.c:361
PGDLLIMPORT ExecutorFinish_hook_type ExecutorFinish_hook
Definition: execMain.c:73
ExecProcNodeMtd ExecProcNode
Definition: execnodes.h:973
TupleTableSlot * ExecGetUpdateNewTuple(ResultRelInfo *relinfo, TupleTableSlot *planSlot, TupleTableSlot *oldSlot)
PGDLLIMPORT ExecutorCheckPerms_hook_type ExecutorCheckPerms_hook
Definition: execMain.c:77
static Datum ExecGetJunkAttribute(TupleTableSlot *slot, AttrNumber attno, bool *isNull)
Definition: executor.h:178
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
Definition: execExpr.c:123
uintptr_t Datum
Definition: postgres.h:411
void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation)
Definition: execMain.c:992
void FreeExprContext(ExprContext *econtext, bool isCommit)
Definition: execUtils.c:411
TupleTableSlot * ExecFilterJunk(JunkFilter *junkfilter, TupleTableSlot *slot)
Definition: execJunk.c:247
void ExecEndNode(PlanState *node)
Definition: execProcnode.c:556
static TupleTableSlot * ExecProcNode(PlanState *node)
Definition: executor.h:252
unsigned int Index
Definition: c.h:549
const TupleTableSlotOps * ExecGetResultSlotOps(PlanState *planstate, bool *isfixed)
Definition: execUtils.c:499
ExprState * ExecPrepareExpr(Expr *node, EState *estate)
Definition: execExpr.c:746
Relation ExecGetRangeTableRelation(EState *estate, Index rti)
Definition: execUtils.c:782
ExprContext * CreateWorkExprContext(EState *estate)
Definition: execUtils.c:316
EState * CreateExecutorState(void)
Definition: execUtils.c:90
void ExecSetExecProcNode(PlanState *node, ExecProcNodeMtd function)
Definition: execProcnode.c:424
void ExecPartitionCheckEmitError(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition: execMain.c:1750
SetExprState * ExecInitTableFunctionResult(Expr *expr, ExprContext *econtext, PlanState *parent)
Definition: execSRF.c:56
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
Definition: tuptable.h:381
void ReScanExprContext(ExprContext *econtext)
Definition: execUtils.c:438
void ExecAssignScanProjectionInfoWithVarno(ScanState *node, int varno)
Definition: execScan.c:285
TupleDesc ExecTypeFromTL(List *targetList)
Definition: execTuples.c:1938
int ExecTargetListLength(List *targetlist)
Definition: execUtils.c:1137
void(* ExecutorEnd_hook_type)(QueryDesc *queryDesc)
Definition: executor.h:80
TupleHashEntry LookupTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot, bool *isnew, uint32 *hash)
Definition: execGrouping.c:306
void ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once)
Definition: execMain.c:298
#define Assert(condition)
Definition: c.h:804
void RegisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg)
Definition: execUtils.c:925
Definition: regguts.h:317
ExprState * ExecPrepareQual(List *qual, EState *estate)
Definition: execExpr.c:774
Bitmapset * ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1295
Bitmapset * ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1321
void(* ExprContextCallbackFunction)(Datum arg)
Definition: execnodes.h:189
size_t Size
Definition: c.h:540
void ExecCreateScanSlotFromOuterPlan(EState *estate, ScanState *scanstate, const TupleTableSlotOps *tts_ops)
Definition: execUtils.c:682
void CheckCmdReplicaIdentity(Relation rel, CmdType cmd)
bool ExecPartitionCheck(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, bool emitError)
Definition: execMain.c:1697
List * ExecInitExprList(List *nodes, PlanState *parent)
Definition: execExpr.c:318
void ExecMarkPos(PlanState *node)
Definition: execAmi.c:328
void ExecCloseRangeTableRelations(EState *estate)
Definition: execMain.c:1482
void do_text_output_multiline(TupOutputState *tstate, const char *txt)
Definition: execTuples.c:2314
SetExprState * ExecInitFunctionResultSet(Expr *expr, ExprContext *econtext, PlanState *parent)
Definition: execSRF.c:444
static Datum values[MAXATTR]
Definition: bootstrap.c:156
void EvalPlanQualEnd(EPQState *epqstate)
Definition: execMain.c:2834
void ExecSimpleRelationInsert(ResultRelInfo *resultRelInfo, EState *estate, TupleTableSlot *slot)
bool RelationFindReplTupleSeq(Relation rel, LockTupleMode lockmode, TupleTableSlot *searchslot, TupleTableSlot *outslot)
bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, ItemPointer conflictTid, List *arbiterIndexes)
Definition: execIndexing.c:505
void do_tup_output(TupOutputState *tstate, Datum *values, bool *isnull)
Definition: execTuples.c:2286
ExprContext * MakePerTupleExprContext(EState *estate)
Definition: execUtils.c:453
void(* ExecutorStart_hook_type)(QueryDesc *queryDesc, int eflags)
Definition: executor.h:65
void execTuplesHashPrepare(int numCols, const Oid *eqOperators, Oid **eqFuncOids, FmgrInfo **hashFunctions)
Definition: execGrouping.c:96
Datum GetAttributeByName(HeapTupleHeader tuple, const char *attname, bool *isNull)
Definition: execUtils.c:1023
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
Definition: execProcnode.c:141
ExprState * ExecBuildGroupingEqual(TupleDesc ldesc, TupleDesc rdesc, const TupleTableSlotOps *lops, const TupleTableSlotOps *rops, int numCols, const AttrNumber *keyColIdx, const Oid *eqfunctions, const Oid *collations, PlanState *parent)
Definition: execExpr.c:3708
void ExecutorEnd(QueryDesc *queryDesc)
Definition: execMain.c:459
uint8 flags
Definition: execnodes.h:66
void check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo, ItemPointer tupleid, Datum *values, bool *isnull, EState *estate, bool newIndex)
Definition: execIndexing.c:887
ExprState pi_state
Definition: execnodes.h:334
void * arg
void ExecInitResultSlot(PlanState *planstate, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1779
TupleHashTable BuildTupleHashTableExt(PlanState *parent, TupleDesc inputDesc, 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)
Definition: execGrouping.c:154
AttrNumber tts_nvalid
Definition: tuptable.h:121
DestReceiver * dest
Definition: executor.h:490
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupleDesc, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1811
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
Definition: executor.h:456
Tuplestorestate * ExecMakeTableFunctionResult(SetExprState *setexpr, ExprContext *econtext, MemoryContext argContext, TupleDesc expectedDesc, bool randomAccess)
Definition: execSRF.c:101
ExprContext * pi_exprContext
Definition: execnodes.h:336
Definition: pg_list.h:50
static unsigned hash(unsigned *uv, int n)
Definition: rege_dfa.c:715
int16 AttrNumber
Definition: attnum.h:21
ExprState * ExecBuildAggTrans(AggState *aggstate, struct AggStatePerPhaseData *phase, bool doSort, bool doHash, bool nullcheck)
CmdType
Definition: nodes.h:681
PGDLLIMPORT ExecutorRun_hook_type ExecutorRun_hook
Definition: execMain.c:72
void ExecutorStart(QueryDesc *queryDesc, int eflags)
Definition: execMain.c:130
static TupleTableSlot * ExecProject(ProjectionInfo *projInfo)
Definition: executor.h:359
void FreeExecutorState(EState *estate)
Definition: execUtils.c:186
uint32 TupleHashTableHash(TupleHashTable hashtable, TupleTableSlot *slot)
Definition: execGrouping.c:338
unsigned char bool
Definition: c.h:391
void ExecSetTupleBound(int64 tuples_needed, PlanState *child_node)
Definition: execProcnode.c:842
ResultRelInfo * ExecLookupResultRelByOid(ModifyTableState *node, Oid resultoid, bool missing_ok, bool update_cache)