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 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  ResultRelInfo *rootRelInfo);
208 extern List *ExecGetAncestorResultRels(EState *estate, ResultRelInfo *resultRelInfo);
209 extern void ExecConstraints(ResultRelInfo *resultRelInfo,
210  TupleTableSlot *slot, EState *estate);
211 extern bool ExecPartitionCheck(ResultRelInfo *resultRelInfo,
212  TupleTableSlot *slot, EState *estate, bool emitError);
213 extern void ExecPartitionCheckEmitError(ResultRelInfo *resultRelInfo,
214  TupleTableSlot *slot, EState *estate);
215 extern void ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo,
216  TupleTableSlot *slot, EState *estate);
217 extern LockTupleMode ExecUpdateLockMode(EState *estate, ResultRelInfo *relinfo);
218 extern ExecRowMark *ExecFindRowMark(EState *estate, Index rti, bool missing_ok);
219 extern ExecAuxRowMark *ExecBuildAuxRowMark(ExecRowMark *erm, List *targetlist);
220 extern TupleTableSlot *EvalPlanQual(EPQState *epqstate, Relation relation,
221  Index rti, TupleTableSlot *testslot);
222 extern void EvalPlanQualInit(EPQState *epqstate, EState *parentestate,
223  Plan *subplan, List *auxrowmarks, int epqParam);
224 extern void EvalPlanQualSetPlan(EPQState *epqstate,
225  Plan *subplan, List *auxrowmarks);
226 extern TupleTableSlot *EvalPlanQualSlot(EPQState *epqstate,
227  Relation relation, Index rti);
228 
229 #define EvalPlanQualSetSlot(epqstate, slot) ((epqstate)->origslot = (slot))
230 extern bool EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot);
231 extern TupleTableSlot *EvalPlanQualNext(EPQState *epqstate);
232 extern void EvalPlanQualBegin(EPQState *epqstate);
233 extern void EvalPlanQualEnd(EPQState *epqstate);
234 
235 /*
236  * functions in execProcnode.c
237  */
238 extern PlanState *ExecInitNode(Plan *node, EState *estate, int eflags);
239 extern void ExecSetExecProcNode(PlanState *node, ExecProcNodeMtd function);
240 extern Node *MultiExecProcNode(PlanState *node);
241 extern void ExecEndNode(PlanState *node);
242 extern bool ExecShutdownNode(PlanState *node);
243 extern void ExecSetTupleBound(int64 tuples_needed, PlanState *child_node);
244 
245 
246 /* ----------------------------------------------------------------
247  * ExecProcNode
248  *
249  * Execute the given node to return a(nother) tuple.
250  * ----------------------------------------------------------------
251  */
252 #ifndef FRONTEND
253 static inline TupleTableSlot *
255 {
256  if (node->chgParam != NULL) /* something changed? */
257  ExecReScan(node); /* let ReScan handle this */
258 
259  return node->ExecProcNode(node);
260 }
261 #endif
262 
263 /*
264  * prototypes from functions in execExpr.c
265  */
266 extern ExprState *ExecInitExpr(Expr *node, PlanState *parent);
267 extern ExprState *ExecInitExprWithParams(Expr *node, ParamListInfo ext_params);
269  Datum *caseval, bool *casenull);
270 extern ExprState *ExecInitQual(List *qual, PlanState *parent);
271 extern ExprState *ExecInitCheck(List *qual, PlanState *parent);
272 extern List *ExecInitExprList(List *nodes, PlanState *parent);
273 extern ExprState *ExecBuildAggTrans(AggState *aggstate, struct AggStatePerPhaseData *phase,
274  bool doSort, bool doHash, bool nullcheck);
276  const TupleTableSlotOps *lops, const TupleTableSlotOps *rops,
277  int numCols,
278  const AttrNumber *keyColIdx,
279  const Oid *eqfunctions,
280  const Oid *collations,
281  PlanState *parent);
283  const TupleTableSlotOps *lops,
284  const TupleTableSlotOps *rops,
285  const Oid *eqfunctions,
286  const Oid *collations,
287  const List *param_exprs,
288  PlanState *parent);
289 extern ProjectionInfo *ExecBuildProjectionInfo(List *targetList,
290  ExprContext *econtext,
291  TupleTableSlot *slot,
292  PlanState *parent,
293  TupleDesc inputDesc);
294 extern ProjectionInfo *ExecBuildUpdateProjection(List *targetList,
295  bool evalTargetList,
296  List *targetColnos,
297  TupleDesc relDesc,
298  ExprContext *econtext,
299  TupleTableSlot *slot,
300  PlanState *parent);
301 extern ExprState *ExecPrepareExpr(Expr *node, EState *estate);
302 extern ExprState *ExecPrepareQual(List *qual, EState *estate);
303 extern ExprState *ExecPrepareCheck(List *qual, EState *estate);
304 extern List *ExecPrepareExprList(List *nodes, EState *estate);
305 
306 /*
307  * ExecEvalExpr
308  *
309  * Evaluate expression identified by "state" in the execution context
310  * given by "econtext". *isNull is set to the is-null flag for the result,
311  * and the Datum value is the function result.
312  *
313  * The caller should already have switched into the temporary memory
314  * context econtext->ecxt_per_tuple_memory. The convenience entry point
315  * ExecEvalExprSwitchContext() is provided for callers who don't prefer to
316  * do the switch in an outer loop.
317  */
318 #ifndef FRONTEND
319 static inline Datum
321  ExprContext *econtext,
322  bool *isNull)
323 {
324  return state->evalfunc(state, econtext, isNull);
325 }
326 #endif
327 
328 /*
329  * ExecEvalExprSwitchContext
330  *
331  * Same as ExecEvalExpr, but get into the right allocation context explicitly.
332  */
333 #ifndef FRONTEND
334 static inline Datum
336  ExprContext *econtext,
337  bool *isNull)
338 {
339  Datum retDatum;
340  MemoryContext oldContext;
341 
342  oldContext = MemoryContextSwitchTo(econtext->ecxt_per_tuple_memory);
343  retDatum = state->evalfunc(state, econtext, isNull);
344  MemoryContextSwitchTo(oldContext);
345  return retDatum;
346 }
347 #endif
348 
349 /*
350  * ExecProject
351  *
352  * Projects a tuple based on projection info and stores it in the slot passed
353  * to ExecBuildProjectionInfo().
354  *
355  * Note: the result is always a virtual tuple; therefore it may reference
356  * the contents of the exprContext's scan tuples and/or temporary results
357  * constructed in the exprContext. If the caller wishes the result to be
358  * valid longer than that data will be valid, he must call ExecMaterializeSlot
359  * on the result slot.
360  */
361 #ifndef FRONTEND
362 static inline TupleTableSlot *
364 {
365  ExprContext *econtext = projInfo->pi_exprContext;
366  ExprState *state = &projInfo->pi_state;
367  TupleTableSlot *slot = state->resultslot;
368  bool isnull;
369 
370  /*
371  * Clear any former contents of the result slot. This makes it safe for
372  * us to use the slot's Datum/isnull arrays as workspace.
373  */
374  ExecClearTuple(slot);
375 
376  /* Run the expression, discarding scalar result from the last column. */
377  (void) ExecEvalExprSwitchContext(state, econtext, &isnull);
378 
379  /*
380  * Successfully formed a result row. Mark the result slot as containing a
381  * valid virtual tuple (inlined version of ExecStoreVirtualTuple()).
382  */
383  slot->tts_flags &= ~TTS_FLAG_EMPTY;
384  slot->tts_nvalid = slot->tts_tupleDescriptor->natts;
385 
386  return slot;
387 }
388 #endif
389 
390 /*
391  * ExecQual - evaluate a qual prepared with ExecInitQual (possibly via
392  * ExecPrepareQual). Returns true if qual is satisfied, else false.
393  *
394  * Note: ExecQual used to have a third argument "resultForNull". The
395  * behavior of this function now corresponds to resultForNull == false.
396  * If you want the resultForNull == true behavior, see ExecCheck.
397  */
398 #ifndef FRONTEND
399 static inline bool
401 {
402  Datum ret;
403  bool isnull;
404 
405  /* short-circuit (here and in ExecInitQual) for empty restriction list */
406  if (state == NULL)
407  return true;
408 
409  /* verify that expression was compiled using ExecInitQual */
410  Assert(state->flags & EEO_FLAG_IS_QUAL);
411 
412  ret = ExecEvalExprSwitchContext(state, econtext, &isnull);
413 
414  /* EEOP_QUAL should never return NULL */
415  Assert(!isnull);
416 
417  return DatumGetBool(ret);
418 }
419 #endif
420 
421 /*
422  * ExecQualAndReset() - evaluate qual with ExecQual() and reset expression
423  * context.
424  */
425 #ifndef FRONTEND
426 static inline bool
428 {
429  bool ret = ExecQual(state, econtext);
430 
431  /* inline ResetExprContext, to avoid ordering issue in this file */
433  return ret;
434 }
435 #endif
436 
437 extern bool ExecCheck(ExprState *state, ExprContext *context);
438 
439 /*
440  * prototypes from functions in execSRF.c
441  */
443  ExprContext *econtext, PlanState *parent);
445  ExprContext *econtext,
446  MemoryContext argContext,
447  TupleDesc expectedDesc,
448  bool randomAccess);
450  ExprContext *econtext, PlanState *parent);
452  ExprContext *econtext,
453  MemoryContext argContext,
454  bool *isNull,
455  ExprDoneCond *isDone);
456 
457 /*
458  * prototypes from functions in execScan.c
459  */
460 typedef TupleTableSlot *(*ExecScanAccessMtd) (ScanState *node);
462 
463 extern TupleTableSlot *ExecScan(ScanState *node, ExecScanAccessMtd accessMtd,
464  ExecScanRecheckMtd recheckMtd);
465 extern void ExecAssignScanProjectionInfo(ScanState *node);
466 extern void ExecAssignScanProjectionInfoWithVarno(ScanState *node, int varno);
467 extern void ExecScanReScan(ScanState *node);
468 
469 /*
470  * prototypes from functions in execTuples.c
471  */
472 extern void ExecInitResultTypeTL(PlanState *planstate);
473 extern void ExecInitResultSlot(PlanState *planstate,
474  const TupleTableSlotOps *tts_ops);
475 extern void ExecInitResultTupleSlotTL(PlanState *planstate,
476  const TupleTableSlotOps *tts_ops);
477 extern void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate,
478  TupleDesc tupleDesc,
479  const TupleTableSlotOps *tts_ops);
481  TupleDesc tupledesc,
482  const TupleTableSlotOps *tts_ops);
483 extern TupleTableSlot *ExecInitNullTupleSlot(EState *estate, TupleDesc tupType,
484  const TupleTableSlotOps *tts_ops);
485 extern TupleDesc ExecTypeFromTL(List *targetList);
486 extern TupleDesc ExecCleanTypeFromTL(List *targetList);
487 extern TupleDesc ExecTypeFromExprList(List *exprList);
488 extern void ExecTypeSetColNames(TupleDesc typeInfo, List *namesList);
489 extern void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg);
490 
491 typedef struct TupOutputState
492 {
496 
498  TupleDesc tupdesc,
499  const TupleTableSlotOps *tts_ops);
500 extern void do_tup_output(TupOutputState *tstate, Datum *values, bool *isnull);
501 extern void do_text_output_multiline(TupOutputState *tstate, const char *txt);
502 extern void end_tup_output(TupOutputState *tstate);
503 
504 /*
505  * Write a single line of text given as a C string.
506  *
507  * Should only be used with a single-TEXT-attribute tupdesc.
508  */
509 #define do_text_output_oneline(tstate, str_to_emit) \
510  do { \
511  Datum values_[1]; \
512  bool isnull_[1]; \
513  values_[0] = PointerGetDatum(cstring_to_text(str_to_emit)); \
514  isnull_[0] = false; \
515  do_tup_output(tstate, values_, isnull_); \
516  pfree(DatumGetPointer(values_[0])); \
517  } while (0)
518 
519 
520 /*
521  * prototypes from functions in execUtils.c
522  */
523 extern EState *CreateExecutorState(void);
524 extern void FreeExecutorState(EState *estate);
525 extern ExprContext *CreateExprContext(EState *estate);
526 extern ExprContext *CreateWorkExprContext(EState *estate);
528 extern void FreeExprContext(ExprContext *econtext, bool isCommit);
529 extern void ReScanExprContext(ExprContext *econtext);
530 
531 #define ResetExprContext(econtext) \
532  MemoryContextReset((econtext)->ecxt_per_tuple_memory)
533 
535 
536 /* Get an EState's per-output-tuple exprcontext, making it if first use */
537 #define GetPerTupleExprContext(estate) \
538  ((estate)->es_per_tuple_exprcontext ? \
539  (estate)->es_per_tuple_exprcontext : \
540  MakePerTupleExprContext(estate))
541 
542 #define GetPerTupleMemoryContext(estate) \
543  (GetPerTupleExprContext(estate)->ecxt_per_tuple_memory)
544 
545 /* Reset an EState's per-output-tuple exprcontext, if one's been created */
546 #define ResetPerTupleExprContext(estate) \
547  do { \
548  if ((estate)->es_per_tuple_exprcontext) \
549  ResetExprContext((estate)->es_per_tuple_exprcontext); \
550  } while (0)
551 
552 extern void ExecAssignExprContext(EState *estate, PlanState *planstate);
553 extern TupleDesc ExecGetResultType(PlanState *planstate);
554 extern const TupleTableSlotOps *ExecGetResultSlotOps(PlanState *planstate,
555  bool *isfixed);
556 extern void ExecAssignProjectionInfo(PlanState *planstate,
557  TupleDesc inputDesc);
558 extern void ExecConditionalAssignProjectionInfo(PlanState *planstate,
559  TupleDesc inputDesc, int varno);
560 extern void ExecFreeExprContext(PlanState *planstate);
561 extern void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc);
562 extern void ExecCreateScanSlotFromOuterPlan(EState *estate,
563  ScanState *scanstate,
564  const TupleTableSlotOps *tts_ops);
565 
566 extern bool ExecRelationIsTargetRelation(EState *estate, Index scanrelid);
567 
568 extern Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags);
569 
570 extern void ExecInitRangeTable(EState *estate, List *rangeTable);
571 extern void ExecCloseRangeTableRelations(EState *estate);
572 extern void ExecCloseResultRelations(EState *estate);
573 
574 static inline RangeTblEntry *
576 {
577  return (RangeTblEntry *) list_nth(estate->es_range_table, rti - 1);
578 }
579 
580 extern Relation ExecGetRangeTableRelation(EState *estate, Index rti);
581 extern void ExecInitResultRelation(EState *estate, ResultRelInfo *resultRelInfo,
582  Index rti);
583 
584 extern int executor_errposition(EState *estate, int location);
585 
586 extern void RegisterExprContextCallback(ExprContext *econtext,
588  Datum arg);
589 extern void UnregisterExprContextCallback(ExprContext *econtext,
591  Datum arg);
592 
593 extern Datum GetAttributeByName(HeapTupleHeader tuple, const char *attname,
594  bool *isNull);
596  bool *isNull);
597 
598 extern int ExecTargetListLength(List *targetlist);
599 extern int ExecCleanTargetListLength(List *targetlist);
600 
601 extern TupleTableSlot *ExecGetTriggerOldSlot(EState *estate, ResultRelInfo *relInfo);
602 extern TupleTableSlot *ExecGetTriggerNewSlot(EState *estate, ResultRelInfo *relInfo);
603 extern TupleTableSlot *ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo);
605 
606 extern Bitmapset *ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate);
607 extern Bitmapset *ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate);
608 extern Bitmapset *ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate);
609 extern Bitmapset *ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate);
610 
611 /*
612  * prototypes from functions in execIndexing.c
613  */
614 extern void ExecOpenIndices(ResultRelInfo *resultRelInfo, bool speculative);
615 extern void ExecCloseIndices(ResultRelInfo *resultRelInfo);
616 extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo,
617  TupleTableSlot *slot, EState *estate,
618  bool update,
619  bool noDupErr,
620  bool *specConflict, List *arbiterIndexes);
621 extern bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo,
622  TupleTableSlot *slot,
623  EState *estate, ItemPointer conflictTid,
624  List *arbiterIndexes);
626  IndexInfo *indexInfo,
627  ItemPointer tupleid,
628  Datum *values, bool *isnull,
629  EState *estate, bool newIndex);
630 
631 /*
632  * prototypes from functions in execReplication.c
633  */
634 extern bool RelationFindReplTupleByIndex(Relation rel, Oid idxoid,
635  LockTupleMode lockmode,
636  TupleTableSlot *searchslot,
637  TupleTableSlot *outslot);
638 extern bool RelationFindReplTupleSeq(Relation rel, LockTupleMode lockmode,
639  TupleTableSlot *searchslot, TupleTableSlot *outslot);
640 
641 extern void ExecSimpleRelationInsert(ResultRelInfo *resultRelInfo,
642  EState *estate, TupleTableSlot *slot);
643 extern void ExecSimpleRelationUpdate(ResultRelInfo *resultRelInfo,
644  EState *estate, EPQState *epqstate,
645  TupleTableSlot *searchslot, TupleTableSlot *slot);
646 extern void ExecSimpleRelationDelete(ResultRelInfo *resultRelInfo,
647  EState *estate, EPQState *epqstate,
648  TupleTableSlot *searchslot);
649 extern void CheckCmdReplicaIdentity(Relation rel, CmdType cmd);
650 
651 extern void CheckSubscriptionRelkind(char relkind, const char *nspname,
652  const char *relname);
653 
654 /*
655  * prototypes from functions in nodeModifyTable.c
656  */
658  TupleTableSlot *planSlot,
659  TupleTableSlot *oldSlot);
661  Oid resultoid,
662  bool missing_ok,
663  bool update_cache);
664 
665 #endif /* EXECUTOR_H */
int16 AttrNumber
Definition: attnum.h:21
static Datum values[MAXATTR]
Definition: bootstrap.c:156
unsigned int uint32
Definition: c.h:441
#define PGDLLIMPORT
Definition: c.h:1331
unsigned char bool
Definition: c.h:391
unsigned int Index
Definition: c.h:549
size_t Size
Definition: c.h:540
void(* ExprContextCallbackFunction)(Datum arg)
Definition: execnodes.h:194
TupleTableSlot *(* ExecProcNodeMtd)(struct PlanState *pstate)
Definition: execnodes.h:985
ExprDoneCond
Definition: execnodes.h:279
#define EEO_FLAG_IS_QUAL
Definition: execnodes.h:60
TupleDesc ExecGetResultType(PlanState *planstate)
Definition: execUtils.c:490
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
bool ExecCheckRTPerms(List *rangeTable, bool ereport_on_violation)
Definition: execMain.c:570
void ExecInitRangeTable(EState *estate, List *rangeTable)
Definition: execUtils.c:751
Bitmapset * ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1347
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:75
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 * ExecGetTriggerOldSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1166
ExprState * ExecPrepareExpr(Expr *node, EState *estate)
Definition: execExpr.c:746
PGDLLIMPORT ExecutorStart_hook_type ExecutorStart_hook
Definition: execMain.c:72
void ReScanExprContext(ExprContext *econtext)
Definition: execUtils.c:438
ExprContext * CreateWorkExprContext(EState *estate)
Definition: execUtils.c:316
bool ExecPartitionCheck(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, bool emitError)
Definition: execMain.c:1782
void(* ExecutorRun_hook_type)(QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once)
Definition: executor.h:69
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupleDesc, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1811
JunkFilter * ExecInitJunkFilter(List *targetList, TupleTableSlot *slot)
Definition: execJunk.c:60
const TupleTableSlotOps * ExecGetResultSlotOps(PlanState *planstate, bool *isfixed)
Definition: execUtils.c:499
Bitmapset * ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1295
ExprState * ExecInitExprWithParams(Expr *node, ParamListInfo ext_params)
Definition: execExpr.c:172
SetExprState * ExecInitTableFunctionResult(Expr *expr, ExprContext *econtext, PlanState *parent)
Definition: execSRF.c:56
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:101
static RangeTblEntry * exec_rt_fetch(Index rti, EState *estate)
Definition: executor.h:575
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:318
void ExecutorEnd(QueryDesc *queryDesc)
Definition: execMain.c:461
TupleTableSlot * ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1210
TupleDesc ExecCleanTypeFromTL(List *targetList)
Definition: execTuples.c:1950
void ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition: execMain.c:2039
int executor_errposition(EState *estate, int location)
Definition: execUtils.c:898
ProjectionInfo * ExecBuildUpdateProjection(List *targetList, bool evalTargetList, List *targetColnos, TupleDesc relDesc, ExprContext *econtext, TupleTableSlot *slot, PlanState *parent)
Definition: execExpr.c:513
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:1086
void FreeExprContext(ExprContext *econtext, bool isCommit)
Definition: execUtils.c:411
ExprState * ExecInitQual(List *qual, PlanState *parent)
Definition: execExpr.c:209
AttrNumber ExecFindJunkAttributeInTlist(List *targetlist, const char *attrName)
Definition: execJunk.c:222
void ExecInitResultRelation(EState *estate, ResultRelInfo *resultRelInfo, Index rti)
Definition: execUtils.c:834
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:1195
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:797
ExecAuxRowMark * ExecBuildAuxRowMark(ExecRowMark *erm, List *targetlist)
Definition: execMain.c:2387
TupleTableSlot * EvalPlanQual(EPQState *epqstate, Relation relation, Index rti, TupleTableSlot *testslot)
Definition: execMain.c:2457
static TupleTableSlot * ExecProject(ProjectionInfo *projInfo)
Definition: executor.h:363
void ExecSetTupleBound(int64 tuples_needed, PlanState *child_node)
Definition: execProcnode.c:842
Datum ExecMakeFunctionResultSet(SetExprState *fcache, ExprContext *econtext, MemoryContext argContext, bool *isNull, ExprDoneCond *isDone)
Definition: execSRF.c:497
void standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
Definition: execMain.c:148
ExprContext * CreateStandaloneExprContext(void)
Definition: execUtils.c:352
void ExecCreateScanSlotFromOuterPlan(EState *estate, ScanState *scanstate, const TupleTableSlotOps *tts_ops)
Definition: execUtils.c:682
void ExecutorFinish(QueryDesc *queryDesc)
Definition: execMain.c:401
EState * CreateExecutorState(void)
Definition: execUtils.c:90
void ExecEndNode(PlanState *node)
Definition: execProcnode.c:556
ExprContext * CreateExprContext(EState *estate)
Definition: execUtils.c:301
void ExecSimpleRelationUpdate(ResultRelInfo *resultRelInfo, EState *estate, EPQState *epqstate, TupleTableSlot *searchslot, TupleTableSlot *slot)
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:444
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:74
void ExecutorRewind(QueryDesc *queryDesc)
Definition: execMain.c:527
void do_text_output_multiline(TupOutputState *tstate, const char *txt)
Definition: execTuples.c:2303
TupleTableSlot * ExecGetTriggerNewSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1188
void ExecAssignExprContext(EState *estate, PlanState *planstate)
Definition: execUtils.c:480
void ExecutorStart(QueryDesc *queryDesc, int eflags)
Definition: execMain.c:131
Relation ExecGetRangeTableRelation(EState *estate, Index rti)
Definition: execUtils.c:782
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
Definition: executor.h:460
void ExecAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc)
Definition: execUtils.c:535
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:887
static bool ExecQual(ExprState *state, ExprContext *econtext)
Definition: executor.h:400
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:951
void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc)
Definition: execUtils.c:670
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
Definition: executor.h:461
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
Definition: execExpr.c:160
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:311
bool EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot)
Definition: execMain.c:2595
bool ExecCheck(ExprState *state, ExprContext *context)
Definition: execExpr.c:853
void ExecConditionalAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc, int varno)
Definition: execUtils.c:555
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:501
void ExecInitResultTupleSlotTL(PlanState *planstate, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1799
ExprState * ExecInitExprWithCaseValue(Expr *node, PlanState *parent, Datum *caseval, bool *casenull)
Definition: execExpr.c:184
ExprState * ExecInitCheck(List *qual, PlanState *parent)
Definition: execExpr.c:298
void ExecCloseIndices(ResultRelInfo *resultRelInfo)
Definition: execIndexing.c:231
void RegisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg)
Definition: execUtils.c:925
static bool ExecQualAndReset(ExprState *state, ExprContext *econtext)
Definition: executor.h:427
void ExecAssignScanProjectionInfo(ScanState *node)
Definition: execScan.c:272
int ExecTargetListLength(List *targetlist)
Definition: execUtils.c:1137
void FreeExecutorState(EState *estate)
Definition: execUtils.c:186
struct TupOutputState TupOutputState
bool ExecRelationIsTargetRelation(EState *estate, Index scanrelid)
Definition: execUtils.c:707
bool(* ExecutorCheckPerms_hook_type)(List *, bool)
Definition: executor.h:84
void ExecCloseResultRelations(EState *estate)
Definition: execMain.c:1507
ExprState * ExecPrepareQual(List *qual, EState *estate)
Definition: execExpr.c:774
TupleConversionMap * ExecGetChildToRootMap(ResultRelInfo *resultRelInfo)
Definition: execUtils.c:1234
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:353
bool ExecMaterializesOutput(NodeTag plantype)
Definition: execAmi.c:637
List * ExecGetAncestorResultRels(EState *estate, ResultRelInfo *resultRelInfo)
Definition: execMain.c:1362
void ExecOpenIndices(ResultRelInfo *resultRelInfo, bool speculative)
Definition: execIndexing.c:156
int ExecCleanTargetListLength(List *targetlist)
Definition: execUtils.c:1147
void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg)
Definition: execUtils.c:864
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:1023
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:3956
PGDLLIMPORT ExecutorCheckPerms_hook_type ExecutorCheckPerms_hook
Definition: execMain.c:78
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:73
List * ExecPrepareExprList(List *nodes, EState *estate)
Definition: execExpr.c:820
ExprContext * MakePerTupleExprContext(EState *estate)
Definition: execUtils.c:453
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:320
Bitmapset * ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1321
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:300
ResultRelInfo * ExecGetTriggerResultRel(EState *estate, Oid relid, ResultRelInfo *rootRelInfo)
Definition: execMain.c:1286
void standard_ExecutorEnd(QueryDesc *queryDesc)
Definition: execMain.c:470
void ExecRestrPos(PlanState *node)
Definition: execAmi.c:377
void ExecCloseRangeTableRelations(EState *estate)
Definition: execMain.c:1567
static Datum ExecEvalExprSwitchContext(ExprState *state, ExprContext *econtext, bool *isNull)
Definition: executor.h:335
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:424
void ExecPartitionCheckEmitError(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition: execMain.c:1835
Bitmapset * ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1256
void ExecConstraints(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition: execMain.c:1906
JunkFilter * ExecInitJunkFilterConversion(List *targetList, TupleDesc cleanTupType, TupleTableSlot *slot)
Definition: execJunk.c:137
Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags)
Definition: execUtils.c:720
static Datum ExecGetJunkAttribute(TupleTableSlot *slot, AttrNumber attno, bool *isNull)
Definition: executor.h:178
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:4113
static TupleTableSlot * ExecProcNode(PlanState *node)
Definition: executor.h:254
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
Definition: execProcnode.c:141
void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation)
Definition: execMain.c:994
void ExecFreeExprContext(PlanState *planstate)
Definition: execUtils.c:650
bool ExecShutdownNode(PlanState *node)
Definition: execProcnode.c:772
void standard_ExecutorFinish(QueryDesc *queryDesc)
Definition: execMain.c:410
Assert(fmt[strlen(fmt) - 1] !='\n')
LockTupleMode
Definition: lockoptions.h:50
void MemoryContextReset(MemoryContext context)
Definition: mcxt.c:143
CmdType
Definition: nodes.h:719
NodeTag
Definition: nodes.h:27
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
WCOKind
Definition: parsenodes.h:1225
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:278
uintptr_t Datum
Definition: postgres.h:411
#define DatumGetBool(X)
Definition: postgres.h:437
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:592
MemoryContext ecxt_per_tuple_memory
Definition: execnodes.h:240
Definition: fmgr.h:57
Definition: pg_list.h:51
Definition: nodes.h:574
RelOptInfo * parent
Definition: pathnodes.h:1194
Bitmapset * chgParam
Definition: execnodes.h:1030
ExecProcNodeMtd ExecProcNode
Definition: execnodes.h:1004
ExprState pi_state
Definition: execnodes.h:339
ExprContext * pi_exprContext
Definition: execnodes.h:341
TupleTableSlot * slot
Definition: executor.h:493
DestReceiver * dest
Definition: executor.h:494
TupleDesc tts_tupleDescriptor
Definition: tuptable.h:124
AttrNumber tts_nvalid
Definition: tuptable.h:121
uint16 tts_flags
Definition: tuptable.h:119
Definition: type.h:90
Definition: regguts.h:318
#define TTS_FLAG_EMPTY
Definition: tuptable.h:96
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
Definition: tuptable.h:425
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
Definition: tuptable.h:381