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-2022, 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 ExecCheckPermissions() */
84 typedef bool (*ExecutorCheckPerms_hook_type) (List *rangeTable,
85  List *rtePermInfos,
86  bool ereport_on_violation);
88 
89 
90 /*
91  * prototypes from functions in execAmi.c
92  */
93 struct Path; /* avoid including pathnodes.h here */
94 
95 extern void ExecReScan(PlanState *node);
96 extern void ExecMarkPos(PlanState *node);
97 extern void ExecRestrPos(PlanState *node);
98 extern bool ExecSupportsMarkRestore(struct Path *pathnode);
99 extern bool ExecSupportsBackwardScan(Plan *node);
100 extern bool ExecMaterializesOutput(NodeTag plantype);
101 
102 /*
103  * prototypes from functions in execCurrent.c
104  */
105 extern bool execCurrentOf(CurrentOfExpr *cexpr,
106  ExprContext *econtext,
107  Oid table_oid,
108  ItemPointer current_tid);
109 
110 /*
111  * prototypes from functions in execGrouping.c
112  */
114  int numCols,
115  const AttrNumber *keyColIdx,
116  const Oid *eqOperators,
117  const Oid *collations,
118  PlanState *parent);
119 extern void execTuplesHashPrepare(int numCols,
120  const Oid *eqOperators,
121  Oid **eqFuncOids,
122  FmgrInfo **hashFunctions);
124  TupleDesc inputDesc,
125  int numCols, AttrNumber *keyColIdx,
126  const Oid *eqfuncoids,
127  FmgrInfo *hashfunctions,
128  Oid *collations,
129  long nbuckets, Size additionalsize,
130  MemoryContext tablecxt,
131  MemoryContext tempcxt, bool use_variable_hash_iv);
133  TupleDesc inputDesc,
134  int numCols, AttrNumber *keyColIdx,
135  const Oid *eqfuncoids,
136  FmgrInfo *hashfunctions,
137  Oid *collations,
138  long nbuckets, Size additionalsize,
139  MemoryContext metacxt,
140  MemoryContext tablecxt,
141  MemoryContext tempcxt, bool use_variable_hash_iv);
143  TupleTableSlot *slot,
144  bool *isnew, uint32 *hash);
145 extern uint32 TupleHashTableHash(TupleHashTable hashtable,
146  TupleTableSlot *slot);
148  TupleTableSlot *slot,
149  bool *isnew, uint32 hash);
151  TupleTableSlot *slot,
152  ExprState *eqcomp,
153  FmgrInfo *hashfunctions);
154 extern void ResetTupleHashTable(TupleHashTable hashtable);
155 
156 /*
157  * prototypes from functions in execJunk.c
158  */
159 extern JunkFilter *ExecInitJunkFilter(List *targetList,
160  TupleTableSlot *slot);
161 extern JunkFilter *ExecInitJunkFilterConversion(List *targetList,
162  TupleDesc cleanTupType,
163  TupleTableSlot *slot);
164 extern AttrNumber ExecFindJunkAttribute(JunkFilter *junkfilter,
165  const char *attrName);
166 extern AttrNumber ExecFindJunkAttributeInTlist(List *targetlist,
167  const char *attrName);
168 extern TupleTableSlot *ExecFilterJunk(JunkFilter *junkfilter,
169  TupleTableSlot *slot);
170 
171 /*
172  * ExecGetJunkAttribute
173  *
174  * Given a junk filter's input tuple (slot) and a junk attribute's number
175  * previously found by ExecFindJunkAttribute, extract & return the value and
176  * isNull flag of the attribute.
177  */
178 #ifndef FRONTEND
179 static inline Datum
180 ExecGetJunkAttribute(TupleTableSlot *slot, AttrNumber attno, bool *isNull)
181 {
182  Assert(attno > 0);
183  return slot_getattr(slot, attno, isNull);
184 }
185 #endif
186 
187 /*
188  * prototypes from functions in execMain.c
189  */
190 extern void ExecutorStart(QueryDesc *queryDesc, int eflags);
191 extern void standard_ExecutorStart(QueryDesc *queryDesc, int eflags);
192 extern void ExecutorRun(QueryDesc *queryDesc,
193  ScanDirection direction, uint64 count, bool execute_once);
194 extern void standard_ExecutorRun(QueryDesc *queryDesc,
195  ScanDirection direction, uint64 count, bool execute_once);
196 extern void ExecutorFinish(QueryDesc *queryDesc);
197 extern void standard_ExecutorFinish(QueryDesc *queryDesc);
198 extern void ExecutorEnd(QueryDesc *queryDesc);
199 extern void standard_ExecutorEnd(QueryDesc *queryDesc);
200 extern void ExecutorRewind(QueryDesc *queryDesc);
201 extern bool ExecCheckPermissions(List *rangeTable,
202  List *rteperminfos, bool ereport_on_violation);
203 extern void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation);
204 extern void InitResultRelInfo(ResultRelInfo *resultRelInfo,
205  Relation resultRelationDesc,
206  Index resultRelationIndex,
207  ResultRelInfo *partition_root_rri,
208  int instrument_options);
209 extern ResultRelInfo *ExecGetTriggerResultRel(EState *estate, Oid relid,
210  ResultRelInfo *rootRelInfo);
211 extern List *ExecGetAncestorResultRels(EState *estate, ResultRelInfo *resultRelInfo);
212 extern void ExecConstraints(ResultRelInfo *resultRelInfo,
213  TupleTableSlot *slot, EState *estate);
214 extern bool ExecPartitionCheck(ResultRelInfo *resultRelInfo,
215  TupleTableSlot *slot, EState *estate, bool emitError);
216 extern void ExecPartitionCheckEmitError(ResultRelInfo *resultRelInfo,
217  TupleTableSlot *slot, EState *estate);
218 extern void ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo,
219  TupleTableSlot *slot, EState *estate);
220 extern LockTupleMode ExecUpdateLockMode(EState *estate, ResultRelInfo *relinfo);
221 extern ExecRowMark *ExecFindRowMark(EState *estate, Index rti, bool missing_ok);
222 extern ExecAuxRowMark *ExecBuildAuxRowMark(ExecRowMark *erm, List *targetlist);
223 extern TupleTableSlot *EvalPlanQual(EPQState *epqstate, Relation relation,
224  Index rti, TupleTableSlot *inputslot);
225 extern void EvalPlanQualInit(EPQState *epqstate, EState *parentestate,
226  Plan *subplan, List *auxrowmarks, int epqParam);
227 extern void EvalPlanQualSetPlan(EPQState *epqstate,
228  Plan *subplan, List *auxrowmarks);
229 extern TupleTableSlot *EvalPlanQualSlot(EPQState *epqstate,
230  Relation relation, Index rti);
231 
232 #define EvalPlanQualSetSlot(epqstate, slot) ((epqstate)->origslot = (slot))
233 extern bool EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot);
234 extern TupleTableSlot *EvalPlanQualNext(EPQState *epqstate);
235 extern void EvalPlanQualBegin(EPQState *epqstate);
236 extern void EvalPlanQualEnd(EPQState *epqstate);
237 
238 /*
239  * functions in execProcnode.c
240  */
241 extern PlanState *ExecInitNode(Plan *node, EState *estate, int eflags);
242 extern void ExecSetExecProcNode(PlanState *node, ExecProcNodeMtd function);
243 extern Node *MultiExecProcNode(PlanState *node);
244 extern void ExecEndNode(PlanState *node);
245 extern void ExecShutdownNode(PlanState *node);
246 extern void ExecSetTupleBound(int64 tuples_needed, PlanState *child_node);
247 
248 
249 /* ----------------------------------------------------------------
250  * ExecProcNode
251  *
252  * Execute the given node to return a(nother) tuple.
253  * ----------------------------------------------------------------
254  */
255 #ifndef FRONTEND
256 static inline TupleTableSlot *
258 {
259  if (node->chgParam != NULL) /* something changed? */
260  ExecReScan(node); /* let ReScan handle this */
261 
262  return node->ExecProcNode(node);
263 }
264 #endif
265 
266 /*
267  * prototypes from functions in execExpr.c
268  */
269 extern ExprState *ExecInitExpr(Expr *node, PlanState *parent);
270 extern ExprState *ExecInitExprWithParams(Expr *node, ParamListInfo ext_params);
271 extern ExprState *ExecInitQual(List *qual, PlanState *parent);
272 extern ExprState *ExecInitCheck(List *qual, PlanState *parent);
273 extern List *ExecInitExprList(List *nodes, PlanState *parent);
274 extern ExprState *ExecBuildAggTrans(AggState *aggstate, struct AggStatePerPhaseData *phase,
275  bool doSort, bool doHash, bool nullcheck);
277  const TupleTableSlotOps *lops, const TupleTableSlotOps *rops,
278  int numCols,
279  const AttrNumber *keyColIdx,
280  const Oid *eqfunctions,
281  const Oid *collations,
282  PlanState *parent);
284  const TupleTableSlotOps *lops,
285  const TupleTableSlotOps *rops,
286  const Oid *eqfunctions,
287  const Oid *collations,
288  const List *param_exprs,
289  PlanState *parent);
290 extern ProjectionInfo *ExecBuildProjectionInfo(List *targetList,
291  ExprContext *econtext,
292  TupleTableSlot *slot,
293  PlanState *parent,
294  TupleDesc inputDesc);
295 extern ProjectionInfo *ExecBuildUpdateProjection(List *targetList,
296  bool evalTargetList,
297  List *targetColnos,
298  TupleDesc relDesc,
299  ExprContext *econtext,
300  TupleTableSlot *slot,
301  PlanState *parent);
302 extern ExprState *ExecPrepareExpr(Expr *node, EState *estate);
303 extern ExprState *ExecPrepareQual(List *qual, EState *estate);
304 extern ExprState *ExecPrepareCheck(List *qual, EState *estate);
305 extern List *ExecPrepareExprList(List *nodes, EState *estate);
306 
307 /*
308  * ExecEvalExpr
309  *
310  * Evaluate expression identified by "state" in the execution context
311  * given by "econtext". *isNull is set to the is-null flag for the result,
312  * and the Datum value is the function result.
313  *
314  * The caller should already have switched into the temporary memory
315  * context econtext->ecxt_per_tuple_memory. The convenience entry point
316  * ExecEvalExprSwitchContext() is provided for callers who don't prefer to
317  * do the switch in an outer loop.
318  */
319 #ifndef FRONTEND
320 static inline Datum
322  ExprContext *econtext,
323  bool *isNull)
324 {
325  return state->evalfunc(state, econtext, isNull);
326 }
327 #endif
328 
329 /*
330  * ExecEvalExprSwitchContext
331  *
332  * Same as ExecEvalExpr, but get into the right allocation context explicitly.
333  */
334 #ifndef FRONTEND
335 static inline Datum
337  ExprContext *econtext,
338  bool *isNull)
339 {
340  Datum retDatum;
341  MemoryContext oldContext;
342 
343  oldContext = MemoryContextSwitchTo(econtext->ecxt_per_tuple_memory);
344  retDatum = state->evalfunc(state, econtext, isNull);
345  MemoryContextSwitchTo(oldContext);
346  return retDatum;
347 }
348 #endif
349 
350 /*
351  * ExecProject
352  *
353  * Projects a tuple based on projection info and stores it in the slot passed
354  * to ExecBuildProjectionInfo().
355  *
356  * Note: the result is always a virtual tuple; therefore it may reference
357  * the contents of the exprContext's scan tuples and/or temporary results
358  * constructed in the exprContext. If the caller wishes the result to be
359  * valid longer than that data will be valid, he must call ExecMaterializeSlot
360  * on the result slot.
361  */
362 #ifndef FRONTEND
363 static inline TupleTableSlot *
365 {
366  ExprContext *econtext = projInfo->pi_exprContext;
367  ExprState *state = &projInfo->pi_state;
368  TupleTableSlot *slot = state->resultslot;
369  bool isnull;
370 
371  /*
372  * Clear any former contents of the result slot. This makes it safe for
373  * us to use the slot's Datum/isnull arrays as workspace.
374  */
375  ExecClearTuple(slot);
376 
377  /* Run the expression, discarding scalar result from the last column. */
378  (void) ExecEvalExprSwitchContext(state, econtext, &isnull);
379 
380  /*
381  * Successfully formed a result row. Mark the result slot as containing a
382  * valid virtual tuple (inlined version of ExecStoreVirtualTuple()).
383  */
384  slot->tts_flags &= ~TTS_FLAG_EMPTY;
385  slot->tts_nvalid = slot->tts_tupleDescriptor->natts;
386 
387  return slot;
388 }
389 #endif
390 
391 /*
392  * ExecQual - evaluate a qual prepared with ExecInitQual (possibly via
393  * ExecPrepareQual). Returns true if qual is satisfied, else false.
394  *
395  * Note: ExecQual used to have a third argument "resultForNull". The
396  * behavior of this function now corresponds to resultForNull == false.
397  * If you want the resultForNull == true behavior, see ExecCheck.
398  */
399 #ifndef FRONTEND
400 static inline bool
402 {
403  Datum ret;
404  bool isnull;
405 
406  /* short-circuit (here and in ExecInitQual) for empty restriction list */
407  if (state == NULL)
408  return true;
409 
410  /* verify that expression was compiled using ExecInitQual */
411  Assert(state->flags & EEO_FLAG_IS_QUAL);
412 
413  ret = ExecEvalExprSwitchContext(state, econtext, &isnull);
414 
415  /* EEOP_QUAL should never return NULL */
416  Assert(!isnull);
417 
418  return DatumGetBool(ret);
419 }
420 #endif
421 
422 /*
423  * ExecQualAndReset() - evaluate qual with ExecQual() and reset expression
424  * context.
425  */
426 #ifndef FRONTEND
427 static inline bool
429 {
430  bool ret = ExecQual(state, econtext);
431 
432  /* inline ResetExprContext, to avoid ordering issue in this file */
434  return ret;
435 }
436 #endif
437 
438 extern bool ExecCheck(ExprState *state, ExprContext *econtext);
439 
440 /*
441  * prototypes from functions in execSRF.c
442  */
444  ExprContext *econtext, PlanState *parent);
446  ExprContext *econtext,
447  MemoryContext argContext,
448  TupleDesc expectedDesc,
449  bool randomAccess);
451  ExprContext *econtext, PlanState *parent);
453  ExprContext *econtext,
454  MemoryContext argContext,
455  bool *isNull,
456  ExprDoneCond *isDone);
457 
458 /*
459  * prototypes from functions in execScan.c
460  */
461 typedef TupleTableSlot *(*ExecScanAccessMtd) (ScanState *node);
463 
464 extern TupleTableSlot *ExecScan(ScanState *node, ExecScanAccessMtd accessMtd,
465  ExecScanRecheckMtd recheckMtd);
466 extern void ExecAssignScanProjectionInfo(ScanState *node);
467 extern void ExecAssignScanProjectionInfoWithVarno(ScanState *node, int varno);
468 extern void ExecScanReScan(ScanState *node);
469 
470 /*
471  * prototypes from functions in execTuples.c
472  */
473 extern void ExecInitResultTypeTL(PlanState *planstate);
474 extern void ExecInitResultSlot(PlanState *planstate,
475  const TupleTableSlotOps *tts_ops);
476 extern void ExecInitResultTupleSlotTL(PlanState *planstate,
477  const TupleTableSlotOps *tts_ops);
478 extern void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate,
479  TupleDesc tupledesc,
480  const TupleTableSlotOps *tts_ops);
482  TupleDesc tupledesc,
483  const TupleTableSlotOps *tts_ops);
484 extern TupleTableSlot *ExecInitNullTupleSlot(EState *estate, TupleDesc tupType,
485  const TupleTableSlotOps *tts_ops);
486 extern TupleDesc ExecTypeFromTL(List *targetList);
487 extern TupleDesc ExecCleanTypeFromTL(List *targetList);
488 extern TupleDesc ExecTypeFromExprList(List *exprList);
489 extern void ExecTypeSetColNames(TupleDesc typeInfo, List *namesList);
490 extern void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg);
491 
492 typedef struct TupOutputState
493 {
497 
499  TupleDesc tupdesc,
500  const TupleTableSlotOps *tts_ops);
501 extern void do_tup_output(TupOutputState *tstate, Datum *values, bool *isnull);
502 extern void do_text_output_multiline(TupOutputState *tstate, const char *txt);
503 extern void end_tup_output(TupOutputState *tstate);
504 
505 /*
506  * Write a single line of text given as a C string.
507  *
508  * Should only be used with a single-TEXT-attribute tupdesc.
509  */
510 #define do_text_output_oneline(tstate, str_to_emit) \
511  do { \
512  Datum values_[1]; \
513  bool isnull_[1]; \
514  values_[0] = PointerGetDatum(cstring_to_text(str_to_emit)); \
515  isnull_[0] = false; \
516  do_tup_output(tstate, values_, isnull_); \
517  pfree(DatumGetPointer(values_[0])); \
518  } while (0)
519 
520 
521 /*
522  * prototypes from functions in execUtils.c
523  */
524 extern EState *CreateExecutorState(void);
525 extern void FreeExecutorState(EState *estate);
526 extern ExprContext *CreateExprContext(EState *estate);
527 extern ExprContext *CreateWorkExprContext(EState *estate);
529 extern void FreeExprContext(ExprContext *econtext, bool isCommit);
530 extern void ReScanExprContext(ExprContext *econtext);
531 
532 #define ResetExprContext(econtext) \
533  MemoryContextReset((econtext)->ecxt_per_tuple_memory)
534 
536 
537 /* Get an EState's per-output-tuple exprcontext, making it if first use */
538 #define GetPerTupleExprContext(estate) \
539  ((estate)->es_per_tuple_exprcontext ? \
540  (estate)->es_per_tuple_exprcontext : \
541  MakePerTupleExprContext(estate))
542 
543 #define GetPerTupleMemoryContext(estate) \
544  (GetPerTupleExprContext(estate)->ecxt_per_tuple_memory)
545 
546 /* Reset an EState's per-output-tuple exprcontext, if one's been created */
547 #define ResetPerTupleExprContext(estate) \
548  do { \
549  if ((estate)->es_per_tuple_exprcontext) \
550  ResetExprContext((estate)->es_per_tuple_exprcontext); \
551  } while (0)
552 
553 extern void ExecAssignExprContext(EState *estate, PlanState *planstate);
554 extern TupleDesc ExecGetResultType(PlanState *planstate);
555 extern const TupleTableSlotOps *ExecGetResultSlotOps(PlanState *planstate,
556  bool *isfixed);
557 extern void ExecAssignProjectionInfo(PlanState *planstate,
558  TupleDesc inputDesc);
559 extern void ExecConditionalAssignProjectionInfo(PlanState *planstate,
560  TupleDesc inputDesc, int varno);
561 extern void ExecFreeExprContext(PlanState *planstate);
562 extern void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc);
563 extern void ExecCreateScanSlotFromOuterPlan(EState *estate,
564  ScanState *scanstate,
565  const TupleTableSlotOps *tts_ops);
566 
567 extern bool ExecRelationIsTargetRelation(EState *estate, Index scanrelid);
568 
569 extern Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags);
570 
571 extern void ExecInitRangeTable(EState *estate, List *rangeTable);
572 extern void ExecCloseRangeTableRelations(EState *estate);
573 extern void ExecCloseResultRelations(EState *estate);
574 
575 static inline RangeTblEntry *
577 {
578  return (RangeTblEntry *) list_nth(estate->es_range_table, rti - 1);
579 }
580 
581 extern Relation ExecGetRangeTableRelation(EState *estate, Index rti);
582 extern void ExecInitResultRelation(EState *estate, ResultRelInfo *resultRelInfo,
583  Index rti);
584 
585 extern int executor_errposition(EState *estate, int location);
586 
587 extern void RegisterExprContextCallback(ExprContext *econtext,
589  Datum arg);
590 extern void UnregisterExprContextCallback(ExprContext *econtext,
592  Datum arg);
593 
594 extern Datum GetAttributeByName(HeapTupleHeader tuple, const char *attname,
595  bool *isNull);
597  bool *isNull);
598 
599 extern int ExecTargetListLength(List *targetlist);
600 extern int ExecCleanTargetListLength(List *targetlist);
601 
602 extern TupleTableSlot *ExecGetTriggerOldSlot(EState *estate, ResultRelInfo *relInfo);
603 extern TupleTableSlot *ExecGetTriggerNewSlot(EState *estate, ResultRelInfo *relInfo);
604 extern TupleTableSlot *ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo);
606 extern TupleConversionMap *ExecGetRootToChildMap(ResultRelInfo *resultRelInfo, EState *estate);
607 
608 extern Oid ExecGetResultRelCheckAsUser(ResultRelInfo *relInfo, EState *estate);
609 extern Bitmapset *ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate);
610 extern Bitmapset *ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate);
611 extern Bitmapset *ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate);
612 extern Bitmapset *ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate);
613 
614 /*
615  * prototypes from functions in execIndexing.c
616  */
617 extern void ExecOpenIndices(ResultRelInfo *resultRelInfo, bool speculative);
618 extern void ExecCloseIndices(ResultRelInfo *resultRelInfo);
619 extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo,
620  TupleTableSlot *slot, EState *estate,
621  bool update,
622  bool noDupErr,
623  bool *specConflict, List *arbiterIndexes);
624 extern bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo,
625  TupleTableSlot *slot,
626  EState *estate, ItemPointer conflictTid,
627  List *arbiterIndexes);
629  IndexInfo *indexInfo,
630  ItemPointer tupleid,
631  Datum *values, bool *isnull,
632  EState *estate, bool newIndex);
633 
634 /*
635  * prototypes from functions in execReplication.c
636  */
637 extern bool RelationFindReplTupleByIndex(Relation rel, Oid idxoid,
638  LockTupleMode lockmode,
639  TupleTableSlot *searchslot,
640  TupleTableSlot *outslot);
641 extern bool RelationFindReplTupleSeq(Relation rel, LockTupleMode lockmode,
642  TupleTableSlot *searchslot, TupleTableSlot *outslot);
643 
644 extern void ExecSimpleRelationInsert(ResultRelInfo *resultRelInfo,
645  EState *estate, TupleTableSlot *slot);
646 extern void ExecSimpleRelationUpdate(ResultRelInfo *resultRelInfo,
647  EState *estate, EPQState *epqstate,
648  TupleTableSlot *searchslot, TupleTableSlot *slot);
649 extern void ExecSimpleRelationDelete(ResultRelInfo *resultRelInfo,
650  EState *estate, EPQState *epqstate,
651  TupleTableSlot *searchslot);
652 extern void CheckCmdReplicaIdentity(Relation rel, CmdType cmd);
653 
654 extern void CheckSubscriptionRelkind(char relkind, const char *nspname,
655  const char *relname);
656 
657 /*
658  * prototypes from functions in nodeModifyTable.c
659  */
661  TupleTableSlot *planSlot,
662  TupleTableSlot *oldSlot);
664  Oid resultoid,
665  bool missing_ok,
666  bool update_cache);
667 
668 #endif /* EXECUTOR_H */
int16 AttrNumber
Definition: attnum.h:21
static Datum values[MAXATTR]
Definition: bootstrap.c:156
unsigned int uint32
Definition: c.h:442
#define PGDLLIMPORT
Definition: c.h:1252
unsigned char bool
Definition: c.h:392
unsigned int Index
Definition: c.h:550
size_t Size
Definition: c.h:541
void(* ExprContextCallbackFunction)(Datum arg)
Definition: execnodes.h:209
TupleTableSlot *(* ExecProcNodeMtd)(struct PlanState *pstate)
Definition: execnodes.h:1015
ExprDoneCond
Definition: execnodes.h:294
#define EEO_FLAG_IS_QUAL
Definition: execnodes.h:75
TupleDesc ExecGetResultType(PlanState *planstate)
Definition: execUtils.c:494
bool RelationFindReplTupleSeq(Relation rel, LockTupleMode lockmode, TupleTableSlot *searchslot, TupleTableSlot *outslot)
bool RelationFindReplTupleByIndex(Relation rel, Oid idxoid, LockTupleMode lockmode, TupleTableSlot *searchslot, TupleTableSlot *outslot)
LockTupleMode ExecUpdateLockMode(EState *estate, ResultRelInfo *relinfo)
Definition: execMain.c:2338
void ExecInitRangeTable(EState *estate, List *rangeTable)
Definition: execUtils.c:755
Bitmapset * ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1366
ExprState * ExecBuildAggTrans(AggState *aggstate, struct AggStatePerPhaseData *phase, bool doSort, bool doHash, bool nullcheck)
void ExecAssignScanProjectionInfoWithVarno(ScanState *node, int varno)
Definition: execScan.c:285
PGDLLIMPORT ExecutorEnd_hook_type ExecutorEnd_hook
Definition: execMain.c:76
void ExecSimpleRelationDelete(ResultRelInfo *resultRelInfo, EState *estate, EPQState *epqstate, TupleTableSlot *searchslot)
void CheckSubscriptionRelkind(char relkind, const char *nspname, const char *relname)
void EvalPlanQualBegin(EPQState *epqstate)
Definition: execMain.c:2720
TupleTableSlot * EvalPlanQual(EPQState *epqstate, Relation relation, Index rti, TupleTableSlot *inputslot)
Definition: execMain.c:2457
TupleTableSlot * ExecGetTriggerOldSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1170
ExprState * ExecPrepareExpr(Expr *node, EState *estate)
Definition: execExpr.c:747
PGDLLIMPORT ExecutorStart_hook_type ExecutorStart_hook
Definition: execMain.c:73
void ReScanExprContext(ExprContext *econtext)
Definition: execUtils.c:442
ExprContext * CreateWorkExprContext(EState *estate)
Definition: execUtils.c:320
bool ExecPartitionCheck(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, bool emitError)
Definition: execMain.c:1779
void(* ExecutorRun_hook_type)(QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once)
Definition: executor.h:69
bool ExecCheck(ExprState *state, ExprContext *econtext)
Definition: execExpr.c:854
JunkFilter * ExecInitJunkFilter(List *targetList, TupleTableSlot *slot)
Definition: execJunk.c:60
const TupleTableSlotOps * ExecGetResultSlotOps(PlanState *planstate, bool *isfixed)
Definition: execUtils.c:503
Bitmapset * ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1320
ExprState * ExecInitExprWithParams(Expr *node, ParamListInfo ext_params)
Definition: execExpr.c:161
SetExprState * ExecInitTableFunctionResult(Expr *expr, ExprContext *econtext, PlanState *parent)
Definition: execSRF.c:57
void execTuplesHashPrepare(int numCols, const Oid *eqOperators, Oid **eqFuncOids, FmgrInfo **hashFunctions)
Definition: execGrouping.c:96
void(* ExecutorFinish_hook_type)(QueryDesc *queryDesc)
Definition: executor.h:76
Tuplestorestate * ExecMakeTableFunctionResult(SetExprState *setexpr, ExprContext *econtext, MemoryContext argContext, TupleDesc expectedDesc, bool randomAccess)
Definition: execSRF.c:102
static RangeTblEntry * exec_rt_fetch(Index rti, EState *estate)
Definition: executor.h:576
TupleTableSlot * EvalPlanQualNext(EPQState *epqstate)
Definition: execMain.c:2704
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
List * ExecInitExprList(List *nodes, PlanState *parent)
Definition: execExpr.c:319
void ExecutorEnd(QueryDesc *queryDesc)
Definition: execMain.c:462
TupleTableSlot * ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1214
TupleDesc ExecCleanTypeFromTL(List *targetList)
Definition: execTuples.c:1950
void ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition: execMain.c:2038
int executor_errposition(EState *estate, int location)
Definition: execUtils.c:902
ProjectionInfo * ExecBuildUpdateProjection(List *targetList, bool evalTargetList, List *targetColnos, TupleDesc relDesc, ExprContext *econtext, TupleTableSlot *slot, PlanState *parent)
Definition: execExpr.c:514
void ExecInitResultSlot(PlanState *planstate, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1779
TupleTableSlot * ExecInitNullTupleSlot(EState *estate, TupleDesc tupType, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1847
void ExecTypeSetColNames(TupleDesc typeInfo, List *namesList)
Definition: execTuples.c:2030
TupleHashEntry LookupTupleHashEntryHash(TupleHashTable hashtable, TupleTableSlot *slot, bool *isnew, uint32 hash)
Definition: execGrouping.c:361
bool ExecSupportsMarkRestore(struct Path *pathnode)
Definition: execAmi.c:419
TupleTableSlot * ExecScan(ScanState *node, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd)
Definition: execScan.c:158
Datum GetAttributeByNum(HeapTupleHeader tuple, AttrNumber attrno, bool *isNull)
Definition: execUtils.c:1090
void FreeExprContext(ExprContext *econtext, bool isCommit)
Definition: execUtils.c:415
ExprState * ExecInitQual(List *qual, PlanState *parent)
Definition: execExpr.c:210
AttrNumber ExecFindJunkAttributeInTlist(List *targetlist, const char *attrName)
Definition: execJunk.c:222
void ExecInitResultRelation(EState *estate, ResultRelInfo *resultRelInfo, Index rti)
Definition: execUtils.c:838
void end_tup_output(TupOutputState *tstate)
Definition: execTuples.c:2333
TupleTableSlot * ExecGetUpdateNewTuple(ResultRelInfo *relinfo, TupleTableSlot *planSlot, TupleTableSlot *oldSlot)
void InitResultRelInfo(ResultRelInfo *resultRelInfo, Relation resultRelationDesc, Index resultRelationIndex, ResultRelInfo *partition_root_rri, int instrument_options)
Definition: execMain.c:1189
bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, ItemPointer conflictTid, List *arbiterIndexes)
Definition: execIndexing.c:505
void ExecMarkPos(PlanState *node)
Definition: execAmi.c:328
ExprState * ExecPrepareCheck(List *qual, EState *estate)
Definition: execExpr.c:798
ExecAuxRowMark * ExecBuildAuxRowMark(ExecRowMark *erm, List *targetlist)
Definition: execMain.c:2387
static TupleTableSlot * ExecProject(ProjectionInfo *projInfo)
Definition: executor.h:364
void ExecSetTupleBound(int64 tuples_needed, PlanState *child_node)
Definition: execProcnode.c:849
Datum ExecMakeFunctionResultSet(SetExprState *fcache, ExprContext *econtext, MemoryContext argContext, bool *isNull, ExprDoneCond *isDone)
Definition: execSRF.c:498
void standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
Definition: execMain.c:149
ExprContext * CreateStandaloneExprContext(void)
Definition: execUtils.c:356
void ExecCreateScanSlotFromOuterPlan(EState *estate, ScanState *scanstate, const TupleTableSlotOps *tts_ops)
Definition: execUtils.c:686
void ExecutorFinish(QueryDesc *queryDesc)
Definition: execMain.c:402
EState * CreateExecutorState(void)
Definition: execUtils.c:92
void ExecEndNode(PlanState *node)
Definition: execProcnode.c:557
ExprContext * CreateExprContext(EState *estate)
Definition: execUtils.c:305
void ExecSimpleRelationUpdate(ResultRelInfo *resultRelInfo, EState *estate, EPQState *epqstate, TupleTableSlot *searchslot, TupleTableSlot *slot)
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1811
TupleHashEntry LookupTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot, bool *isnew, uint32 *hash)
Definition: execGrouping.c:306
void EvalPlanQualEnd(EPQState *epqstate)
Definition: execMain.c:2932
SetExprState * ExecInitFunctionResultSet(Expr *expr, ExprContext *econtext, PlanState *parent)
Definition: execSRF.c:445
void ExecInitResultTypeTL(PlanState *planstate)
Definition: execTuples.c:1755
void EvalPlanQualSetPlan(EPQState *epqstate, Plan *subplan, List *auxrowmarks)
Definition: execMain.c:2550
void CheckCmdReplicaIdentity(Relation rel, CmdType cmd)
void ExecSimpleRelationInsert(ResultRelInfo *resultRelInfo, EState *estate, TupleTableSlot *slot)
AttrNumber ExecFindJunkAttribute(JunkFilter *junkfilter, const char *attrName)
Definition: execJunk.c:210
PGDLLIMPORT ExecutorFinish_hook_type ExecutorFinish_hook
Definition: execMain.c:75
void ExecutorRewind(QueryDesc *queryDesc)
Definition: execMain.c:528
void do_text_output_multiline(TupOutputState *tstate, const char *txt)
Definition: execTuples.c:2303
void ExecShutdownNode(PlanState *node)
Definition: execProcnode.c:773
TupleTableSlot * ExecGetTriggerNewSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1192
void ExecAssignExprContext(EState *estate, PlanState *planstate)
Definition: execUtils.c:484
void ExecutorStart(QueryDesc *queryDesc, int eflags)
Definition: execMain.c:132
Relation ExecGetRangeTableRelation(EState *estate, Index rti)
Definition: execUtils.c:786
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
Definition: executor.h:461
void ExecAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc)
Definition: execUtils.c:539
TupleTableSlot * ExecInitExtraTupleSlot(EState *estate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1831
void(* ExecutorStart_hook_type)(QueryDesc *queryDesc, int eflags)
Definition: executor.h:65
void check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo, ItemPointer tupleid, Datum *values, bool *isnull, EState *estate, bool newIndex)
Definition: execIndexing.c:893
static bool ExecQual(ExprState *state, ExprContext *econtext)
Definition: executor.h:401
TupleTableSlot * ExecFilterJunk(JunkFilter *junkfilter, TupleTableSlot *slot)
Definition: execJunk.c:247
List * ExecInsertIndexTuples(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, bool update, bool noDupErr, bool *specConflict, List *arbiterIndexes)
Definition: execIndexing.c:284
void UnregisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg)
Definition: execUtils.c:955
void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc)
Definition: execUtils.c:674
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
Definition: executor.h:462
bool(* ExecutorCheckPerms_hook_type)(List *rangeTable, List *rtePermInfos, bool ereport_on_violation)
Definition: executor.h:84
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
Definition: execExpr.c:124
uint32 TupleHashTableHash(TupleHashTable hashtable, TupleTableSlot *slot)
Definition: execGrouping.c:338
void standard_ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once)
Definition: execMain.c:312
bool EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot)
Definition: execMain.c:2595
void ExecConditionalAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc, int varno)
Definition: execUtils.c:559
void(* ExecutorEnd_hook_type)(QueryDesc *queryDesc)
Definition: executor.h:80
ResultRelInfo * ExecLookupResultRelByOid(ModifyTableState *node, Oid resultoid, bool missing_ok, bool update_cache)
Node * MultiExecProcNode(PlanState *node)
Definition: execProcnode.c:502
void ExecInitResultTupleSlotTL(PlanState *planstate, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1799
ExprState * ExecInitCheck(List *qual, PlanState *parent)
Definition: execExpr.c:299
void ExecCloseIndices(ResultRelInfo *resultRelInfo)
Definition: execIndexing.c:231
void RegisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg)
Definition: execUtils.c:929
static bool ExecQualAndReset(ExprState *state, ExprContext *econtext)
Definition: executor.h:428
TupleConversionMap * ExecGetRootToChildMap(ResultRelInfo *resultRelInfo, EState *estate)
Definition: execUtils.c:1264
void ExecAssignScanProjectionInfo(ScanState *node)
Definition: execScan.c:272
int ExecTargetListLength(List *targetlist)
Definition: execUtils.c:1141
void FreeExecutorState(EState *estate)
Definition: execUtils.c:190
struct TupOutputState TupOutputState
bool ExecRelationIsTargetRelation(EState *estate, Index scanrelid)
Definition: execUtils.c:711
void ExecCloseResultRelations(EState *estate)
Definition: execMain.c:1504
ExprState * ExecPrepareQual(List *qual, EState *estate)
Definition: execExpr.c:775
TupleConversionMap * ExecGetChildToRootMap(ResultRelInfo *resultRelInfo)
Definition: execUtils.c:1238
void EvalPlanQualInit(EPQState *epqstate, EState *parentestate, Plan *subplan, List *auxrowmarks, int epqParam)
Definition: execMain.c:2511
ExecRowMark * ExecFindRowMark(EState *estate, Index rti, bool missing_ok)
Definition: execMain.c:2364
ProjectionInfo * ExecBuildProjectionInfo(List *targetList, ExprContext *econtext, TupleTableSlot *slot, PlanState *parent, TupleDesc inputDesc)
Definition: execExpr.c:354
bool ExecMaterializesOutput(NodeTag plantype)
Definition: execAmi.c:637
List * ExecGetAncestorResultRels(EState *estate, ResultRelInfo *resultRelInfo)
Definition: execMain.c:1359
void ExecOpenIndices(ResultRelInfo *resultRelInfo, bool speculative)
Definition: execIndexing.c:156
int ExecCleanTargetListLength(List *targetlist)
Definition: execUtils.c:1151
void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg)
Definition: execUtils.c:868
void ExecScanReScan(ScanState *node)
Definition: execScan.c:299
bool ExecSupportsBackwardScan(Plan *node)
Definition: execAmi.c:512
Datum GetAttributeByName(HeapTupleHeader tuple, const char *attname, bool *isNull)
Definition: execUtils.c:1027
void do_tup_output(TupOutputState *tstate, Datum *values, bool *isnull)
Definition: execTuples.c:2275
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:3719
PGDLLIMPORT ExecutorCheckPerms_hook_type ExecutorCheckPerms_hook
Definition: execMain.c:79
TupleHashEntry FindTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot, ExprState *eqcomp, FmgrInfo *hashfunctions)
Definition: execGrouping.c:393
void ExecReScan(PlanState *node)
Definition: execAmi.c:78
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
TupOutputState * begin_tup_output_tupdesc(DestReceiver *dest, TupleDesc tupdesc, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:2255
PGDLLIMPORT ExecutorRun_hook_type ExecutorRun_hook
Definition: execMain.c:74
List * ExecPrepareExprList(List *nodes, EState *estate)
Definition: execExpr.c:821
ExprContext * MakePerTupleExprContext(EState *estate)
Definition: execUtils.c:457
TupleDesc ExecTypeFromExprList(List *exprList)
Definition: execTuples.c:1997
TupleDesc ExecTypeFromTL(List *targetList)
Definition: execTuples.c:1938
TupleTableSlot * EvalPlanQualSlot(EPQState *epqstate, Relation relation, Index rti)
Definition: execMain.c:2567
static Datum ExecEvalExpr(ExprState *state, ExprContext *econtext, bool *isNull)
Definition: executor.h:321
Bitmapset * ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1341
bool execCurrentOf(CurrentOfExpr *cexpr, ExprContext *econtext, Oid table_oid, ItemPointer current_tid)
Definition: execCurrent.c:44
void ResetTupleHashTable(TupleHashTable hashtable)
Definition: execGrouping.c:285
void ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once)
Definition: execMain.c:301
ResultRelInfo * ExecGetTriggerResultRel(EState *estate, Oid relid, ResultRelInfo *rootRelInfo)
Definition: execMain.c:1283
void standard_ExecutorEnd(QueryDesc *queryDesc)
Definition: execMain.c:471
void ExecRestrPos(PlanState *node)
Definition: execAmi.c:377
void ExecCloseRangeTableRelations(EState *estate)
Definition: execMain.c:1564
static Datum ExecEvalExprSwitchContext(ExprState *state, ExprContext *econtext, bool *isNull)
Definition: executor.h:336
ExprState * execTuplesMatchPrepare(TupleDesc desc, int numCols, const AttrNumber *keyColIdx, const Oid *eqOperators, const Oid *collations, PlanState *parent)
Definition: execGrouping.c:59
void ExecSetExecProcNode(PlanState *node, ExecProcNodeMtd function)
Definition: execProcnode.c:425
void ExecPartitionCheckEmitError(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition: execMain.c:1832
Bitmapset * ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1299
void ExecConstraints(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition: execMain.c:1903
JunkFilter * ExecInitJunkFilterConversion(List *targetList, TupleDesc cleanTupType, TupleTableSlot *slot)
Definition: execJunk.c:137
Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags)
Definition: execUtils.c:724
bool ExecCheckPermissions(List *rangeTable, List *rteperminfos, bool ereport_on_violation)
Definition: execMain.c:574
static Datum ExecGetJunkAttribute(TupleTableSlot *slot, AttrNumber attno, bool *isNull)
Definition: executor.h:180
Oid ExecGetResultRelCheckAsUser(ResultRelInfo *relInfo, EState *estate)
Definition: execUtils.c:1428
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:3876
static TupleTableSlot * ExecProcNode(PlanState *node)
Definition: executor.h:257
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
Definition: execProcnode.c:142
void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation)
Definition: execMain.c:988
void ExecFreeExprContext(PlanState *planstate)
Definition: execUtils.c:654
void standard_ExecutorFinish(QueryDesc *queryDesc)
Definition: execMain.c:411
Assert(fmt[strlen(fmt) - 1] !='\n')
LockTupleMode
Definition: lockoptions.h:50
void MemoryContextReset(MemoryContext context)
Definition: mcxt.c:303
CmdType
Definition: nodes.h:263
NodeTag
Definition: nodes.h:27
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:135
WCOKind
Definition: parsenodes.h:1266
NameData attname
Definition: pg_attribute.h:41
void * arg
NameData relname
Definition: pg_class.h:38
static void * list_nth(const List *list, int n)
Definition: pg_list.h:297
static bool DatumGetBool(Datum X)
Definition: postgres.h:438
uintptr_t Datum
Definition: postgres.h:412
unsigned int Oid
Definition: postgres_ext.h:31
static unsigned hash(unsigned *uv, int n)
Definition: rege_dfa.c:715
ScanDirection
Definition: sdir.h:23
List * es_range_table
Definition: execnodes.h:614
MemoryContext ecxt_per_tuple_memory
Definition: execnodes.h:255
Definition: fmgr.h:57
Definition: pg_list.h:52
Definition: nodes.h:118
Bitmapset * chgParam
Definition: execnodes.h:1062
ExecProcNodeMtd ExecProcNode
Definition: execnodes.h:1036
ExprState pi_state
Definition: execnodes.h:354
ExprContext * pi_exprContext
Definition: execnodes.h:356
TupleTableSlot * slot
Definition: executor.h:494
DestReceiver * dest
Definition: executor.h:495
TupleDesc tts_tupleDescriptor
Definition: tuptable.h:124
AttrNumber tts_nvalid
Definition: tuptable.h:121
uint16 tts_flags
Definition: tuptable.h:119
Definition: type.h:95
Definition: regguts.h:318
#define TTS_FLAG_EMPTY
Definition: tuptable.h:96
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
Definition: tuptable.h:433
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
Definition: tuptable.h:389