PostgreSQL Source Code git master
Loading...
Searching...
No Matches
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-2026, 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 "access/xlogdefs.h"
18#include "datatype/timestamp.h"
19#include "executor/execdesc.h"
20#include "fmgr.h"
21#include "nodes/lockoptions.h"
22#include "nodes/parsenodes.h"
23#include "utils/memutils.h"
24
25
26/*
27 * The "eflags" argument to ExecutorStart and the various ExecInitNode
28 * routines is a bitwise OR of the following flag bits, which tell the
29 * called plan node what to expect. Note that the flags will get modified
30 * as they are passed down the plan tree, since an upper node may require
31 * functionality in its subnode not demanded of the plan as a whole
32 * (example: MergeJoin requires mark/restore capability in its inner input),
33 * or an upper node may shield its input from some functionality requirement
34 * (example: Materialize shields its input from needing to do backward scan).
35 *
36 * EXPLAIN_ONLY indicates that the plan tree is being initialized just so
37 * EXPLAIN can print it out; it will not be run. Hence, no side-effects
38 * of startup should occur. However, error checks (such as permission checks)
39 * should be performed.
40 *
41 * EXPLAIN_GENERIC can only be used together with EXPLAIN_ONLY. It indicates
42 * that a generic plan is being shown using EXPLAIN (GENERIC_PLAN), which
43 * means that missing parameter values must be tolerated. Currently, the only
44 * effect is to suppress execution-time partition pruning.
45 *
46 * REWIND indicates that the plan node should try to efficiently support
47 * rescans without parameter changes. (Nodes must support ExecReScan calls
48 * in any case, but if this flag was not given, they are at liberty to do it
49 * through complete recalculation. Note that a parameter change forces a
50 * full recalculation in any case.)
51 *
52 * BACKWARD indicates that the plan node must respect the es_direction flag.
53 * When this is not passed, the plan node will only be run forwards.
54 *
55 * MARK indicates that the plan node must support Mark/Restore calls.
56 * When this is not passed, no Mark/Restore will occur.
57 *
58 * SKIP_TRIGGERS tells ExecutorStart/ExecutorFinish to skip calling
59 * AfterTriggerBeginQuery/AfterTriggerEndQuery. This does not necessarily
60 * mean that the plan can't queue any AFTER triggers; just that the caller
61 * is responsible for there being a trigger context for them to be queued in.
62 *
63 * WITH_NO_DATA indicates that we are performing REFRESH MATERIALIZED VIEW
64 * ... WITH NO DATA. Currently, the only effect is to suppress errors about
65 * scanning unpopulated materialized views.
66 */
67#define EXEC_FLAG_EXPLAIN_ONLY 0x0001 /* EXPLAIN, no ANALYZE */
68#define EXEC_FLAG_EXPLAIN_GENERIC 0x0002 /* EXPLAIN (GENERIC_PLAN) */
69#define EXEC_FLAG_REWIND 0x0004 /* need efficient rescan */
70#define EXEC_FLAG_BACKWARD 0x0008 /* need backward scan */
71#define EXEC_FLAG_MARK 0x0010 /* need mark/restore */
72#define EXEC_FLAG_SKIP_TRIGGERS 0x0020 /* skip AfterTrigger setup */
73#define EXEC_FLAG_WITH_NO_DATA 0x0040 /* REFRESH ... WITH NO DATA */
74
75
76/* Hook for plugins to get control in ExecutorStart() */
77typedef void (*ExecutorStart_hook_type) (QueryDesc *queryDesc, int eflags);
79
80/* Hook for plugins to get control in ExecutorRun() */
81typedef void (*ExecutorRun_hook_type) (QueryDesc *queryDesc,
82 ScanDirection direction,
83 uint64 count);
85
86/* Hook for plugins to get control in ExecutorFinish() */
87typedef void (*ExecutorFinish_hook_type) (QueryDesc *queryDesc);
89
90/* Hook for plugins to get control in ExecutorEnd() */
91typedef void (*ExecutorEnd_hook_type) (QueryDesc *queryDesc);
93
94/* Hook for plugins to get control in ExecCheckPermissions() */
97 bool ereport_on_violation);
99
100
101/*
102 * prototypes from functions in execAmi.c
103 */
104typedef struct Path Path; /* avoid including pathnodes.h here */
105
106extern void ExecReScan(PlanState *node);
107extern void ExecMarkPos(PlanState *node);
108extern void ExecRestrPos(PlanState *node);
110extern bool ExecSupportsBackwardScan(Plan *node);
112
113/*
114 * prototypes from functions in execCurrent.c
115 */
116extern bool execCurrentOf(CurrentOfExpr *cexpr,
117 ExprContext *econtext,
120
121/*
122 * prototypes from functions in execGrouping.c
123 */
125 int numCols,
126 const AttrNumber *keyColIdx,
127 const Oid *eqOperators,
128 const Oid *collations,
129 PlanState *parent);
130extern void execTuplesHashPrepare(int numCols,
131 const Oid *eqOperators,
132 Oid **eqFuncOids,
137 int numCols,
138 AttrNumber *keyColIdx,
139 const Oid *eqfuncoids,
140 FmgrInfo *hashfunctions,
141 Oid *collations,
142 double nelements,
143 Size additionalsize,
145 MemoryContext tuplescxt,
146 MemoryContext tempcxt,
149 TupleTableSlot *slot,
150 bool *isnew, uint32 *hash);
152 TupleTableSlot *slot);
154 TupleTableSlot *slot,
155 bool *isnew, uint32 hash);
157 TupleTableSlot *slot,
160extern void ResetTupleHashTable(TupleHashTable hashtable);
161extern Size EstimateTupleHashTableSpace(double nentries,
163 Size additionalsize);
164
165#ifndef FRONTEND
166/*
167 * Return size of the hash bucket. Useful for estimating memory usage.
168 */
169static inline size_t
171{
172 return sizeof(TupleHashEntryData);
173}
174
175/*
176 * Return tuple from hash entry.
177 */
178static inline MinimalTuple
180{
181 return entry->firstTuple;
182}
183
184/*
185 * Get a pointer into the additional space allocated for this entry. The
186 * memory will be maxaligned and zeroed.
187 *
188 * The amount of space available is the additionalsize requested in the call
189 * to BuildTupleHashTable(). If additionalsize was specified as zero, return
190 * NULL.
191 */
192static inline void *
194{
195 if (hashtable->additionalsize > 0)
196 return (char *) entry->firstTuple - hashtable->additionalsize;
197 else
198 return NULL;
199}
200#endif
201
202/*
203 * prototypes from functions in execJunk.c
204 */
205extern JunkFilter *ExecInitJunkFilter(List *targetList,
206 TupleTableSlot *slot);
209 TupleTableSlot *slot);
211 const char *attrName);
213 const char *attrName);
215 TupleTableSlot *slot);
216
217/*
218 * ExecGetJunkAttribute
219 *
220 * Given a junk filter's input tuple (slot) and a junk attribute's number
221 * previously found by ExecFindJunkAttribute, extract & return the value and
222 * isNull flag of the attribute.
223 */
224#ifndef FRONTEND
225static inline Datum
227{
228 Assert(attno > 0);
229 return slot_getattr(slot, attno, isNull);
230}
231#endif
232
233/*
234 * prototypes from functions in execMain.c
235 */
236extern void ExecutorStart(QueryDesc *queryDesc, int eflags);
237extern void standard_ExecutorStart(QueryDesc *queryDesc, int eflags);
238extern void ExecutorRun(QueryDesc *queryDesc,
239 ScanDirection direction, uint64 count);
240extern void standard_ExecutorRun(QueryDesc *queryDesc,
241 ScanDirection direction, uint64 count);
242extern void ExecutorFinish(QueryDesc *queryDesc);
243extern void standard_ExecutorFinish(QueryDesc *queryDesc);
244extern void ExecutorEnd(QueryDesc *queryDesc);
245extern void standard_ExecutorEnd(QueryDesc *queryDesc);
246extern void ExecutorRewind(QueryDesc *queryDesc);
248 List *rteperminfos, bool ereport_on_violation);
250extern void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation,
251 OnConflictAction onConflictAction,
253extern void InitResultRelInfo(ResultRelInfo *resultRelInfo,
257 int instrument_options);
258extern ResultRelInfo *ExecGetTriggerResultRel(EState *estate, Oid relid,
260extern List *ExecGetAncestorResultRels(EState *estate, ResultRelInfo *resultRelInfo);
261extern void ExecConstraints(ResultRelInfo *resultRelInfo,
262 TupleTableSlot *slot, EState *estate);
264 TupleTableSlot *slot,
265 EState *estate,
267extern bool ExecPartitionCheck(ResultRelInfo *resultRelInfo,
268 TupleTableSlot *slot, EState *estate, bool emitError);
269extern void ExecPartitionCheckEmitError(ResultRelInfo *resultRelInfo,
270 TupleTableSlot *slot, EState *estate);
271extern void ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo,
272 TupleTableSlot *slot, EState *estate);
273extern char *ExecBuildSlotValueDescription(Oid reloid, TupleTableSlot *slot,
274 TupleDesc tupdesc,
276 int maxfieldlen);
278extern ExecRowMark *ExecFindRowMark(EState *estate, Index rti, bool missing_ok);
280extern TupleTableSlot *EvalPlanQual(EPQState *epqstate, Relation relation,
281 Index rti, TupleTableSlot *inputslot);
282extern void EvalPlanQualInit(EPQState *epqstate, EState *parentestate,
283 Plan *subplan, List *auxrowmarks,
284 int epqParam, List *resultRelations);
285extern void EvalPlanQualSetPlan(EPQState *epqstate,
286 Plan *subplan, List *auxrowmarks);
288 Relation relation, Index rti);
289
290#define EvalPlanQualSetSlot(epqstate, slot) ((epqstate)->origslot = (slot))
291extern bool EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot);
292extern TupleTableSlot *EvalPlanQualNext(EPQState *epqstate);
293extern void EvalPlanQualBegin(EPQState *epqstate);
294extern void EvalPlanQualEnd(EPQState *epqstate);
295
296/*
297 * functions in execProcnode.c
298 */
299extern PlanState *ExecInitNode(Plan *node, EState *estate, int eflags);
301extern Node *MultiExecProcNode(PlanState *node);
302extern void ExecEndNode(PlanState *node);
303extern void ExecShutdownNode(PlanState *node);
304extern void ExecSetTupleBound(int64 tuples_needed, PlanState *child_node);
305
306/*
307 * ExecProcNodeInstr() is implemented in instrument.c, as that allows for
308 * inlining of the instrumentation functions, but thematically it ought to be
309 * in execProcnode.c.
310 */
312
313
314/* ----------------------------------------------------------------
315 * ExecProcNode
316 *
317 * Execute the given node to return a(nother) tuple.
318 * ----------------------------------------------------------------
319 */
320#ifndef FRONTEND
321static inline TupleTableSlot *
323{
324 if (node->chgParam != NULL) /* something changed? */
325 ExecReScan(node); /* let ReScan handle this */
326
327 return node->ExecProcNode(node);
328}
329#endif
330
331/*
332 * prototypes from functions in execExpr.c
333 */
334extern ExprState *ExecInitExpr(Expr *node, PlanState *parent);
335extern ExprState *ExecInitExprWithContext(Expr *node, PlanState *parent, Node *escontext);
336extern ExprState *ExecInitExprWithParams(Expr *node, ParamListInfo ext_params);
337extern ExprState *ExecInitQual(List *qual, PlanState *parent);
338extern ExprState *ExecInitCheck(List *qual, PlanState *parent);
339extern List *ExecInitExprList(List *nodes, PlanState *parent);
341 bool doSort, bool doHash, bool nullcheck);
343 const TupleTableSlotOps *ops,
344 FmgrInfo *hashfunctions,
345 Oid *collations,
346 int numCols,
347 AttrNumber *keyColIdx,
348 PlanState *parent,
349 uint32 init_value);
351 const TupleTableSlotOps *ops,
352 const Oid *hashfunc_oids,
353 const List *collations,
354 const List *hash_exprs,
355 const bool *opstrict, PlanState *parent,
356 uint32 init_value);
359 int numCols,
360 const AttrNumber *keyColIdx,
361 const Oid *eqfunctions,
362 const Oid *collations,
363 PlanState *parent);
365 const TupleTableSlotOps *lops,
366 const TupleTableSlotOps *rops,
367 const Oid *eqfunctions,
368 const Oid *collations,
369 const List *param_exprs,
370 PlanState *parent);
372 ExprContext *econtext,
373 TupleTableSlot *slot,
374 PlanState *parent,
377 bool evalTargetList,
380 ExprContext *econtext,
381 TupleTableSlot *slot,
382 PlanState *parent);
383extern ExprState *ExecPrepareExpr(Expr *node, EState *estate);
384extern ExprState *ExecPrepareExprWithContext(Expr *node, EState *estate, Node *escontext);
385extern ExprState *ExecPrepareQual(List *qual, EState *estate);
386extern ExprState *ExecPrepareCheck(List *qual, EState *estate);
387extern List *ExecPrepareExprList(List *nodes, EState *estate);
388
389/*
390 * ExecEvalExpr
391 *
392 * Evaluate expression identified by "state" in the execution context
393 * given by "econtext". *isNull is set to the is-null flag for the result,
394 * and the Datum value is the function result.
395 *
396 * The caller should already have switched into the temporary memory
397 * context econtext->ecxt_per_tuple_memory. The convenience entry point
398 * ExecEvalExprSwitchContext() is provided for callers who don't prefer to
399 * do the switch in an outer loop.
400 */
401#ifndef FRONTEND
402static inline Datum
404 ExprContext *econtext,
405 bool *isNull)
406{
407 return state->evalfunc(state, econtext, isNull);
408}
409#endif
410
411/*
412 * ExecEvalExprNoReturn
413 *
414 * Like ExecEvalExpr(), but for cases where no return value is expected,
415 * because the side-effects of expression evaluation are what's desired. This
416 * is e.g. used for projection and aggregate transition computation.
417 *
418 * Evaluate expression identified by "state" in the execution context
419 * given by "econtext".
420 *
421 * The caller should already have switched into the temporary memory context
422 * econtext->ecxt_per_tuple_memory. The convenience entry point
423 * ExecEvalExprNoReturnSwitchContext() is provided for callers who don't
424 * prefer to do the switch in an outer loop.
425 */
426#ifndef FRONTEND
427static inline void
429 ExprContext *econtext)
430{
432
433 retDatum = state->evalfunc(state, econtext, NULL);
434
435 Assert(retDatum == (Datum) 0);
436}
437#endif
438
439/*
440 * ExecEvalExprSwitchContext
441 *
442 * Same as ExecEvalExpr, but get into the right allocation context explicitly.
443 */
444#ifndef FRONTEND
445static inline Datum
447 ExprContext *econtext,
448 bool *isNull)
449{
452
454 retDatum = state->evalfunc(state, econtext, isNull);
456 return retDatum;
457}
458#endif
459
460/*
461 * ExecEvalExprNoReturnSwitchContext
462 *
463 * Same as ExecEvalExprNoReturn, but get into the right allocation context
464 * explicitly.
465 */
466#ifndef FRONTEND
467static inline void
477#endif
478
479/*
480 * ExecProject
481 *
482 * Projects a tuple based on projection info and stores it in the slot passed
483 * to ExecBuildProjectionInfo().
484 *
485 * Note: the result is always a virtual tuple; therefore it may reference
486 * the contents of the exprContext's scan tuples and/or temporary results
487 * constructed in the exprContext. If the caller wishes the result to be
488 * valid longer than that data will be valid, he must call ExecMaterializeSlot
489 * on the result slot.
490 */
491#ifndef FRONTEND
492static inline TupleTableSlot *
494{
495 ExprContext *econtext = projInfo->pi_exprContext;
496 ExprState *state = &projInfo->pi_state;
497 TupleTableSlot *slot = state->resultslot;
498
499 /*
500 * Clear any former contents of the result slot. This makes it safe for
501 * us to use the slot's Datum/isnull arrays as workspace.
502 */
503 ExecClearTuple(slot);
504
505 /* Run the expression */
507
508 /*
509 * Successfully formed a result row. Mark the result slot as containing a
510 * valid virtual tuple (inlined version of ExecStoreVirtualTuple()).
511 */
512 slot->tts_flags &= ~TTS_FLAG_EMPTY;
513 slot->tts_nvalid = slot->tts_tupleDescriptor->natts;
514
515 return slot;
516}
517#endif
518
519/*
520 * ExecQual - evaluate a qual prepared with ExecInitQual (possibly via
521 * ExecPrepareQual). Returns true if qual is satisfied, else false.
522 *
523 * Note: ExecQual used to have a third argument "resultForNull". The
524 * behavior of this function now corresponds to resultForNull == false.
525 * If you want the resultForNull == true behavior, see ExecCheck.
526 */
527#ifndef FRONTEND
528static inline bool
530{
531 Datum ret;
532 bool isnull;
533
534 /* short-circuit (here and in ExecInitQual) for empty restriction list */
535 if (state == NULL)
536 return true;
537
538 /* verify that expression was compiled using ExecInitQual */
539 Assert(state->flags & EEO_FLAG_IS_QUAL);
540
541 ret = ExecEvalExprSwitchContext(state, econtext, &isnull);
542
543 /* EEOP_QUAL should never return NULL */
544 Assert(!isnull);
545
546 return DatumGetBool(ret);
547}
548#endif
549
550/*
551 * ExecQualAndReset() - evaluate qual with ExecQual() and reset expression
552 * context.
553 */
554#ifndef FRONTEND
555static inline bool
557{
558 bool ret = ExecQual(state, econtext);
559
560 /* inline ResetExprContext, to avoid ordering issue in this file */
562 return ret;
563}
564#endif
565
566extern bool ExecCheck(ExprState *state, ExprContext *econtext);
567
568/*
569 * prototypes from functions in execSRF.c
570 */
572 ExprContext *econtext, PlanState *parent);
574 ExprContext *econtext,
576 TupleDesc expectedDesc,
577 bool randomAccess);
579 ExprContext *econtext, PlanState *parent);
581 ExprContext *econtext,
583 bool *isNull,
584 ExprDoneCond *isDone);
585
586/*
587 * prototypes from functions in execScan.c
588 */
589typedef TupleTableSlot *(*ExecScanAccessMtd) (ScanState *node);
591
594extern void ExecAssignScanProjectionInfo(ScanState *node);
595extern void ExecAssignScanProjectionInfoWithVarno(ScanState *node, int varno);
596extern void ExecScanReScan(ScanState *node);
597
598/*
599 * prototypes from functions in execTuples.c
600 */
601extern void ExecInitResultTypeTL(PlanState *planstate);
602extern void ExecInitResultSlot(PlanState *planstate,
603 const TupleTableSlotOps *tts_ops);
604extern void ExecInitResultTupleSlotTL(PlanState *planstate,
605 const TupleTableSlotOps *tts_ops);
606extern void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate,
607 TupleDesc tupledesc,
608 const TupleTableSlotOps *tts_ops,
609 uint16 flags);
611 TupleDesc tupledesc,
612 const TupleTableSlotOps *tts_ops);
614 const TupleTableSlotOps *tts_ops);
615extern TupleDesc ExecTypeFromTL(List *targetList);
616extern TupleDesc ExecCleanTypeFromTL(List *targetList);
620
626
628 TupleDesc tupdesc,
629 const TupleTableSlotOps *tts_ops);
630extern void do_tup_output(TupOutputState *tstate, const Datum *values, const bool *isnull);
631extern void do_text_output_multiline(TupOutputState *tstate, const char *txt);
633
634/*
635 * Write a single line of text given as a C string.
636 *
637 * Should only be used with a single-TEXT-attribute tupdesc.
638 */
639#define do_text_output_oneline(tstate, str_to_emit) \
640 do { \
641 Datum values_[1]; \
642 bool isnull_[1]; \
643 values_[0] = PointerGetDatum(cstring_to_text(str_to_emit)); \
644 isnull_[0] = false; \
645 do_tup_output(tstate, values_, isnull_); \
646 pfree(DatumGetPointer(values_[0])); \
647 } while (0)
648
649
650/*
651 * prototypes from functions in execUtils.c
652 */
653extern EState *CreateExecutorState(void);
654extern void FreeExecutorState(EState *estate);
655extern ExprContext *CreateExprContext(EState *estate);
658extern void FreeExprContext(ExprContext *econtext, bool isCommit);
659extern void ReScanExprContext(ExprContext *econtext);
660
661#define ResetExprContext(econtext) \
662 MemoryContextReset((econtext)->ecxt_per_tuple_memory)
663
665
666/* Get an EState's per-output-tuple exprcontext, making it if first use */
667#define GetPerTupleExprContext(estate) \
668 ((estate)->es_per_tuple_exprcontext ? \
669 (estate)->es_per_tuple_exprcontext : \
670 MakePerTupleExprContext(estate))
671
672#define GetPerTupleMemoryContext(estate) \
673 (GetPerTupleExprContext(estate)->ecxt_per_tuple_memory)
674
675/* Reset an EState's per-output-tuple exprcontext, if one's been created */
676#define ResetPerTupleExprContext(estate) \
677 do { \
678 if ((estate)->es_per_tuple_exprcontext) \
679 ResetExprContext((estate)->es_per_tuple_exprcontext); \
680 } while (0)
681
682extern void ExecAssignExprContext(EState *estate, PlanState *planstate);
683extern TupleDesc ExecGetResultType(PlanState *planstate);
684extern const TupleTableSlotOps *ExecGetResultSlotOps(PlanState *planstate,
685 bool *isfixed);
687 int nplans);
689extern void ExecAssignProjectionInfo(PlanState *planstate,
692 TupleDesc inputDesc, int varno);
693extern void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc);
694extern void ExecCreateScanSlotFromOuterPlan(EState *estate,
696 const TupleTableSlotOps *tts_ops);
697
698extern bool ExecRelationIsTargetRelation(EState *estate, Index scanrelid);
699
700extern bool ScanRelIsReadOnly(ScanState *ss);
701
702extern Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags);
703
704extern void ExecInitRangeTable(EState *estate, List *rangeTable, List *permInfos,
706extern void ExecCloseRangeTableRelations(EState *estate);
707extern void ExecCloseResultRelations(EState *estate);
708
709static inline RangeTblEntry *
711{
712 return (RangeTblEntry *) list_nth(estate->es_range_table, rti - 1);
713}
714
716 bool isResultRel);
717extern void ExecInitResultRelation(EState *estate, ResultRelInfo *resultRelInfo,
718 Index rti);
719
720extern int executor_errposition(EState *estate, int location);
721
722extern void RegisterExprContextCallback(ExprContext *econtext,
724 Datum arg);
725extern void UnregisterExprContextCallback(ExprContext *econtext,
727 Datum arg);
728
729extern Datum GetAttributeByName(HeapTupleHeader tuple, const char *attname,
730 bool *isNull);
732 bool *isNull);
733
734extern int ExecTargetListLength(List *targetlist);
735extern int ExecCleanTargetListLength(List *targetlist);
736
742extern TupleConversionMap *ExecGetRootToChildMap(ResultRelInfo *resultRelInfo, EState *estate);
743
749
750/*
751 * prototypes from functions in execIndexing.c
752 */
753extern void ExecOpenIndices(ResultRelInfo *resultRelInfo, bool speculative);
754extern void ExecCloseIndices(ResultRelInfo *resultRelInfo);
755
756/* flags for ExecInsertIndexTuples */
757#define EIIT_IS_UPDATE (1<<0)
758#define EIIT_NO_DUPE_ERROR (1<<1)
759#define EIIT_ONLY_SUMMARIZING (1<<2)
760extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo, EState *estate,
762 List *arbiterIndexes,
763 bool *specConflict);
764extern bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo,
765 TupleTableSlot *slot,
768 List *arbiterIndexes);
770 IndexInfo *indexInfo,
772 const Datum *values, const bool *isnull,
773 EState *estate, bool newIndex);
774
775/*
776 * prototypes from functions in execReplication.c
777 */
779 LockTupleMode lockmode,
782extern bool RelationFindReplTupleSeq(Relation rel, LockTupleMode lockmode,
796extern void ExecSimpleRelationInsert(ResultRelInfo *resultRelInfo,
797 EState *estate, TupleTableSlot *slot);
798extern void ExecSimpleRelationUpdate(ResultRelInfo *resultRelInfo,
799 EState *estate, EPQState *epqstate,
801extern void ExecSimpleRelationDelete(ResultRelInfo *resultRelInfo,
802 EState *estate, EPQState *epqstate,
804extern void CheckCmdReplicaIdentity(Relation rel, CmdType cmd);
805
807 const char *nspname, const char *relname);
808
809/*
810 * prototypes from functions in nodeModifyTable.c
811 */
813 TupleTableSlot *planSlot,
817 bool missing_ok,
818 bool update_cache);
819
820#endif /* EXECUTOR_H */
int16 AttrNumber
Definition attnum.h:21
static Datum values[MAXATTR]
Definition bootstrap.c:190
#define PGDLLIMPORT
Definition c.h:1421
#define PG_USED_FOR_ASSERTS_ONLY
Definition c.h:249
#define Assert(condition)
Definition c.h:943
int64_t int64
Definition c.h:621
uint64_t uint64
Definition c.h:625
uint16_t uint16
Definition c.h:623
uint32_t uint32
Definition c.h:624
unsigned int Index
Definition c.h:698
uint32 TransactionId
Definition c.h:736
size_t Size
Definition c.h:689
static DataChecksumsWorkerOperation operation
int64 TimestampTz
Definition timestamp.h:39
Datum arg
Definition elog.c:1322
ExprDoneCond
Definition execnodes.h:340
#define EEO_FLAG_IS_QUAL
Definition execnodes.h:88
TupleTableSlot *(* ExecProcNodeMtd)(PlanState *pstate)
Definition execnodes.h:1186
static MinimalTuple TupleHashEntryGetTuple(TupleHashEntry entry)
Definition executor.h:179
void CheckSubscriptionRelkind(char localrelkind, char remoterelkind, const char *nspname, const char *relname)
TupleDesc ExecGetResultType(PlanState *planstate)
Definition execUtils.c:500
Relation ExecGetRangeTableRelation(EState *estate, Index rti, bool isResultRel)
Definition execUtils.c:851
bool RelationFindReplTupleSeq(Relation rel, LockTupleMode lockmode, TupleTableSlot *searchslot, TupleTableSlot *outslot)
ExprState * ExecInitExprWithContext(Expr *node, PlanState *parent, Node *escontext)
Definition execExpr.c:163
bool RelationFindReplTupleByIndex(Relation rel, Oid idxoid, LockTupleMode lockmode, TupleTableSlot *searchslot, TupleTableSlot *outslot)
LockTupleMode ExecUpdateLockMode(EState *estate, ResultRelInfo *relinfo)
Definition execMain.c:2559
ResultRelInfo * ExecLookupResultRelByOid(ModifyTableState *node, Oid resultoid, bool missing_ok, bool update_cache)
ExprState * execTuplesMatchPrepare(TupleDesc desc, int numCols, const AttrNumber *keyColIdx, const Oid *eqOperators, const Oid *collations, PlanState *parent)
ExecRowMark * ExecFindRowMark(EState *estate, Index rti, bool missing_ok)
Definition execMain.c:2585
TupleConversionMap * ExecGetRootToChildMap(ResultRelInfo *resultRelInfo, EState *estate)
Definition execUtils.c:1352
ExecAuxRowMark * ExecBuildAuxRowMark(ExecRowMark *erm, List *targetlist)
Definition execMain.c:2608
ResultRelInfo * ExecGetTriggerResultRel(EState *estate, Oid relid, ResultRelInfo *rootRelInfo)
Definition execMain.c:1372
void ExecAssignScanProjectionInfoWithVarno(ScanState *node, int varno)
Definition execScan.c:94
PGDLLIMPORT ExecutorEnd_hook_type ExecutorEnd_hook
Definition execMain.c:73
TupleTableSlot * EvalPlanQualSlot(EPQState *epqstate, Relation relation, Index rti)
Definition execMain.c:2805
Bitmapset * ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition execUtils.c:1429
void ExecSimpleRelationDelete(ResultRelInfo *resultRelInfo, EState *estate, EPQState *epqstate, TupleTableSlot *searchslot)
void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation, OnConflictAction onConflictAction, List *mergeActions)
Definition execMain.c:1065
void EvalPlanQualBegin(EPQState *epqstate)
Definition execMain.c:2960
Bitmapset * ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate)
Definition execUtils.c:1387
TupleTableSlot * ExecGetTriggerNewSlot(EState *estate, ResultRelInfo *relInfo)
Definition execUtils.c:1252
ExprState * ExecBuildHash32Expr(TupleDesc desc, const TupleTableSlotOps *ops, const Oid *hashfunc_oids, const List *collations, const List *hash_exprs, const bool *opstrict, PlanState *parent, uint32 init_value)
Definition execExpr.c:4329
PGDLLIMPORT ExecutorStart_hook_type ExecutorStart_hook
Definition execMain.c:70
char * ExecBuildSlotValueDescription(Oid reloid, TupleTableSlot *slot, TupleDesc tupdesc, Bitmapset *modifiedCols, int maxfieldlen)
Definition execMain.c:2420
ExprState * ExecBuildHash32FromAttrs(TupleDesc desc, const TupleTableSlotOps *ops, FmgrInfo *hashfunctions, Oid *collations, int numCols, AttrNumber *keyColIdx, PlanState *parent, uint32 init_value)
Definition execExpr.c:4168
void ReScanExprContext(ExprContext *econtext)
Definition execUtils.c:448
static TupleTableSlot * ExecProject(ProjectionInfo *projInfo)
Definition executor.h:493
bool ExecPartitionCheck(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, bool emitError)
Definition execMain.c:1885
static void * TupleHashEntryGetAdditional(TupleHashTable hashtable, TupleHashEntry entry)
Definition executor.h:193
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
Definition execExpr.c:143
bool ScanRelIsReadOnly(ScanState *ss)
Definition execUtils.c:751
JunkFilter * ExecInitJunkFilterConversion(List *targetList, TupleDesc cleanTupType, TupleTableSlot *slot)
Definition execJunk.c:137
void do_tup_output(TupOutputState *tstate, const Datum *values, const bool *isnull)
ExprState * ExecPrepareExpr(Expr *node, EState *estate)
Definition execExpr.c:786
bool ExecCheck(ExprState *state, ExprContext *econtext)
Definition execExpr.c:905
ExprContext * CreateExprContext(EState *estate)
Definition execUtils.c:312
ExprState * ExecInitCheck(List *qual, PlanState *parent)
Definition execExpr.c:336
SetExprState * ExecInitFunctionResultSet(Expr *expr, ExprContext *econtext, PlanState *parent)
Definition execSRF.c:446
void execTuplesHashPrepare(int numCols, const Oid *eqOperators, Oid **eqFuncOids, FmgrInfo **hashFunctions)
void(* ExecutorFinish_hook_type)(QueryDesc *queryDesc)
Definition executor.h:87
TupleConversionMap * ExecGetChildToRootMap(ResultRelInfo *resultRelInfo)
Definition execUtils.c:1326
ExprContext * CreateStandaloneExprContext(void)
Definition execUtils.c:362
void ExecutorEnd(QueryDesc *queryDesc)
Definition execMain.c:477
void EvalPlanQualInit(EPQState *epqstate, EState *parentestate, Plan *subplan, List *auxrowmarks, int epqParam, List *resultRelations)
Definition execMain.c:2747
TupleTableSlot * ExecGetTriggerOldSlot(EState *estate, ResultRelInfo *relInfo)
Definition execUtils.c:1230
TupleDesc ExecCleanTypeFromTL(List *targetList)
void ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition execMain.c:2257
int executor_errposition(EState *estate, int location)
Definition execUtils.c:962
void ExecInitResultSlot(PlanState *planstate, const TupleTableSlotOps *tts_ops)
ProjectionInfo * ExecBuildProjectionInfo(List *targetList, ExprContext *econtext, TupleTableSlot *slot, PlanState *parent, TupleDesc inputDesc)
Definition execExpr.c:391
TupleHashTable BuildTupleHashTable(PlanState *parent, TupleDesc inputDesc, const TupleTableSlotOps *inputOps, int numCols, AttrNumber *keyColIdx, const Oid *eqfuncoids, FmgrInfo *hashfunctions, Oid *collations, double nelements, Size additionalsize, MemoryContext metacxt, MemoryContext tuplescxt, MemoryContext tempcxt, bool use_variable_hash_iv)
void ExecTypeSetColNames(TupleDesc typeInfo, List *namesList)
TupleHashEntry LookupTupleHashEntryHash(TupleHashTable hashtable, TupleTableSlot *slot, bool *isnew, uint32 hash)
static RangeTblEntry * exec_rt_fetch(Index rti, EState *estate)
Definition executor.h:710
Tuplestorestate * ExecMakeTableFunctionResult(SetExprState *setexpr, ExprContext *econtext, MemoryContext argContext, TupleDesc expectedDesc, bool randomAccess)
Definition execSRF.c:102
Datum GetAttributeByNum(HeapTupleHeader tuple, AttrNumber attrno, bool *isNull)
Definition execUtils.c:1150
void FreeExprContext(ExprContext *econtext, bool isCommit)
Definition execUtils.c:421
void ExecInitRangeTable(EState *estate, List *rangeTable, List *permInfos, Bitmapset *unpruned_relids)
Definition execUtils.c:799
TupleTableSlot * ExecFilterJunk(JunkFilter *junkfilter, TupleTableSlot *slot)
Definition execJunk.c:247
Node * MultiExecProcNode(PlanState *node)
AttrNumber ExecFindJunkAttributeInTlist(List *targetlist, const char *attrName)
Definition execJunk.c:222
Bitmapset * ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition execUtils.c:1408
TupleTableSlot * ExecGetUpdateNewTuple(ResultRelInfo *relinfo, TupleTableSlot *planSlot, TupleTableSlot *oldSlot)
const TupleTableSlotOps * ExecGetCommonSlotOps(PlanState **planstates, int nplans)
Definition execUtils.c:541
void ExecInitResultRelation(EState *estate, ResultRelInfo *resultRelInfo, Index rti)
Definition execUtils.c:906
void end_tup_output(TupOutputState *tstate)
void InitResultRelInfo(ResultRelInfo *resultRelInfo, Relation resultRelationDesc, Index resultRelationIndex, ResultRelInfo *partition_root_rri, int instrument_options)
Definition execMain.c:1271
void ExecMarkPos(PlanState *node)
Definition execAmi.c:328
void ExecSetTupleBound(int64 tuples_needed, PlanState *child_node)
TupleTableSlot * ExecScan(ScanState *node, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd)
Definition execScan.c:47
Datum ExecMakeFunctionResultSet(SetExprState *fcache, ExprContext *econtext, MemoryContext argContext, bool *isNull, ExprDoneCond *isDone)
Definition execSRF.c:499
void standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
Definition execMain.c:143
void ExecCreateScanSlotFromOuterPlan(EState *estate, ScanState *scanstate, const TupleTableSlotOps *tts_ops)
Definition execUtils.c:709
void ExecutorFinish(QueryDesc *queryDesc)
Definition execMain.c:417
bool ExecSupportsMarkRestore(Path *pathnode)
Definition execAmi.c:419
TupleTableSlot * ExecProcNodeInstr(PlanState *node)
Definition instrument.c:181
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops, uint16 flags)
void ExecEndNode(PlanState *node)
JunkFilter * ExecInitJunkFilter(List *targetList, TupleTableSlot *slot)
Definition execJunk.c:60
void ExecSimpleRelationUpdate(ResultRelInfo *resultRelInfo, EState *estate, EPQState *epqstate, TupleTableSlot *searchslot, TupleTableSlot *slot)
TupleHashEntry LookupTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot, bool *isnew, uint32 *hash)
void EvalPlanQualEnd(EPQState *epqstate)
Definition execMain.c:3208
void ExecInitResultTypeTL(PlanState *planstate)
void EvalPlanQualSetPlan(EPQState *epqstate, Plan *subplan, List *auxrowmarks)
Definition execMain.c:2788
void CheckCmdReplicaIdentity(Relation rel, CmdType cmd)
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
ExprState * ExecBuildAggTrans(AggState *aggstate, struct AggStatePerPhaseData *phase, bool doSort, bool doHash, bool nullcheck)
void(* ExecutorRun_hook_type)(QueryDesc *queryDesc, ScanDirection direction, uint64 count)
Definition executor.h:81
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:72
bool RelationFindDeletedTupleInfoByIndex(Relation rel, Oid idxoid, TupleTableSlot *searchslot, TransactionId oldestxmin, TransactionId *delete_xid, ReplOriginId *delete_origin, TimestampTz *delete_time)
void ExecutorRewind(QueryDesc *queryDesc)
Definition execMain.c:547
void do_text_output_multiline(TupOutputState *tstate, const char *txt)
void ExecShutdownNode(PlanState *node)
void ExecAssignExprContext(EState *estate, PlanState *planstate)
Definition execUtils.c:490
void ExecutorStart(QueryDesc *queryDesc, int eflags)
Definition execMain.c:124
ExprState * ExecPrepareQual(List *qual, EState *estate)
Definition execExpr.c:826
AttrNumber ExecRelGenVirtualNotNull(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, List *notnull_virtual_attrs)
Definition execMain.c:2123
SetExprState * ExecInitTableFunctionResult(Expr *expr, ExprContext *econtext, PlanState *parent)
Definition execSRF.c:57
ExprState * ExecInitQual(List *qual, PlanState *parent)
Definition execExpr.c:250
bool RelationFindDeletedTupleInfoSeq(Relation rel, TupleTableSlot *searchslot, TransactionId oldestxmin, TransactionId *delete_xid, ReplOriginId *delete_origin, TimestampTz *delete_time)
TupleTableSlot * EvalPlanQual(EPQState *epqstate, Relation relation, Index rti, TupleTableSlot *inputslot)
Definition execMain.c:2678
void ExecAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc)
Definition execUtils.c:588
void(* ExecutorStart_hook_type)(QueryDesc *queryDesc, int eflags)
Definition executor.h:77
List * ExecInsertIndexTuples(ResultRelInfo *resultRelInfo, EState *estate, uint32 options, TupleTableSlot *slot, List *arbiterIndexes, bool *specConflict)
static bool ExecQual(ExprState *state, ExprContext *econtext)
Definition executor.h:529
ExprContext * MakePerTupleExprContext(EState *estate)
Definition execUtils.c:463
bool ExecCheckOneRelPerms(RTEPermissionInfo *perminfo)
Definition execMain.c:657
void UnregisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg)
Definition execUtils.c:1015
void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc)
Definition execUtils.c:697
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
Definition executor.h:590
const TupleTableSlotOps * ExecGetCommonChildSlotOps(PlanState *ps)
Definition execUtils.c:568
TupleTableSlot * ExecInitExtraTupleSlot(EState *estate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
bool(* ExecutorCheckPerms_hook_type)(List *rangeTable, List *rtePermInfos, bool ereport_on_violation)
Definition executor.h:95
uint32 TupleHashTableHash(TupleHashTable hashtable, TupleTableSlot *slot)
bool EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot)
Definition execMain.c:2833
List * ExecInitExprList(List *nodes, PlanState *parent)
Definition execExpr.c:356
void ExecConditionalAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc, int varno)
Definition execUtils.c:608
void(* ExecutorEnd_hook_type)(QueryDesc *queryDesc)
Definition executor.h:91
void ExecInitResultTupleSlotTL(PlanState *planstate, const TupleTableSlotOps *tts_ops)
void ExecCloseIndices(ResultRelInfo *resultRelInfo)
void RegisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg)
Definition execUtils.c:989
static bool ExecQualAndReset(ExprState *state, ExprContext *econtext)
Definition executor.h:556
ExprState * ExecInitExprWithParams(Expr *node, ParamListInfo ext_params)
Definition execExpr.c:201
void ExecAssignScanProjectionInfo(ScanState *node)
Definition execScan.c:81
int ExecTargetListLength(List *targetlist)
Definition execUtils.c:1201
ProjectionInfo * ExecBuildUpdateProjection(List *targetList, bool evalTargetList, List *targetColnos, TupleDesc relDesc, ExprContext *econtext, TupleTableSlot *slot, PlanState *parent)
Definition execExpr.c:568
void FreeExecutorState(EState *estate)
Definition execUtils.c:197
static size_t TupleHashEntrySize(void)
Definition executor.h:170
bool ExecRelationIsTargetRelation(EState *estate, Index scanrelid)
Definition execUtils.c:734
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:4494
TupleHashEntry FindTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot, ExprState *eqcomp, ExprState *hashexpr)
void ExecCloseResultRelations(EState *estate)
Definition execMain.c:1604
Size EstimateTupleHashTableSpace(double nentries, Size tupleWidth, Size additionalsize)
static TupleTableSlot * ExecProcNode(PlanState *node)
Definition executor.h:322
TupleTableSlot * ExecGetAllNullSlot(EState *estate, ResultRelInfo *relInfo)
Definition execUtils.c:1299
ExprState * ExecPrepareExprWithContext(Expr *node, EState *estate, Node *escontext)
Definition execExpr.c:798
bool ExecMaterializesOutput(NodeTag plantype)
Definition execAmi.c:636
void ExecOpenIndices(ResultRelInfo *resultRelInfo, bool speculative)
int ExecCleanTargetListLength(List *targetlist)
Definition execUtils.c:1211
ExprContext * CreateWorkExprContext(EState *estate)
Definition execUtils.c:327
TupOutputState * begin_tup_output_tupdesc(DestReceiver *dest, TupleDesc tupdesc, const TupleTableSlotOps *tts_ops)
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
Definition executor.h:589
void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg)
Definition execUtils.c:936
void ExecScanReScan(ScanState *node)
Definition execScan.c:108
bool ExecSupportsBackwardScan(Plan *node)
Definition execAmi.c:512
const TupleTableSlotOps * ExecGetResultSlotOps(PlanState *planstate, bool *isfixed)
Definition execUtils.c:509
Datum GetAttributeByName(HeapTupleHeader tuple, const char *attname, bool *isNull)
Definition execUtils.c:1087
PGDLLIMPORT ExecutorCheckPerms_hook_type ExecutorCheckPerms_hook
Definition execMain.c:76
Bitmapset * ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition execUtils.c:1444
void ExecReScan(PlanState *node)
Definition execAmi.c:78
static void ExecEvalExprNoReturn(ExprState *state, ExprContext *econtext)
Definition executor.h:428
PGDLLIMPORT ExecutorRun_hook_type ExecutorRun_hook
Definition execMain.c:71
TupleDesc ExecTypeFromExprList(List *exprList)
TupleDesc ExecTypeFromTL(List *targetList)
void standard_ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count)
Definition execMain.c:318
static Datum ExecEvalExpr(ExprState *state, ExprContext *econtext, bool *isNull)
Definition executor.h:403
bool execCurrentOf(CurrentOfExpr *cexpr, ExprContext *econtext, Oid table_oid, ItemPointer current_tid)
Definition execCurrent.c:44
void ResetTupleHashTable(TupleHashTable hashtable)
List * ExecPrepareExprList(List *nodes, EState *estate)
Definition execExpr.c:872
void standard_ExecutorEnd(QueryDesc *queryDesc)
Definition execMain.c:486
void ExecRestrPos(PlanState *node)
Definition execAmi.c:377
static void ExecEvalExprNoReturnSwitchContext(ExprState *state, ExprContext *econtext)
Definition executor.h:468
void ExecCloseRangeTableRelations(EState *estate)
Definition execMain.c:1664
static Datum ExecEvalExprSwitchContext(ExprState *state, ExprContext *econtext, bool *isNull)
Definition executor.h:446
void ExecSetExecProcNode(PlanState *node, ExecProcNodeMtd function)
void ExecPartitionCheckEmitError(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition execMain.c:1938
void check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo, const ItemPointerData *tupleid, const Datum *values, const bool *isnull, EState *estate, bool newIndex)
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:4653
void ExecConstraints(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition execMain.c:2009
TupleTableSlot * ExecInitNullTupleSlot(EState *estate, TupleDesc tupType, const TupleTableSlotOps *tts_ops)
TupleTableSlot * ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo)
Definition execUtils.c:1274
Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags)
Definition execUtils.c:768
bool ExecCheckPermissions(List *rangeTable, List *rteperminfos, bool ereport_on_violation)
Definition execMain.c:593
static Datum ExecGetJunkAttribute(TupleTableSlot *slot, AttrNumber attno, bool *isNull)
Definition executor.h:226
void ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count)
Definition execMain.c:308
Oid ExecGetResultRelCheckAsUser(ResultRelInfo *relInfo, EState *estate)
Definition execUtils.c:1515
EState * CreateExecutorState(void)
Definition execUtils.c:90
ExprState * ExecPrepareCheck(List *qual, EState *estate)
Definition execExpr.c:849
List * ExecGetAncestorResultRels(EState *estate, ResultRelInfo *resultRelInfo)
Definition execMain.c:1459
TupleTableSlot * EvalPlanQualNext(EPQState *epqstate)
Definition execMain.c:2944
bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, ItemPointer conflictTid, const ItemPointerData *tupleid, List *arbiterIndexes)
void standard_ExecutorFinish(QueryDesc *queryDesc)
Definition execMain.c:426
void(* ExprContextCallbackFunction)(Datum arg)
Definition fmgr.h:26
struct parser_state ps
LockTupleMode
Definition lockoptions.h:51
void MemoryContextReset(MemoryContext context)
Definition mcxt.c:403
OnConflictAction
Definition nodes.h:427
CmdType
Definition nodes.h:273
NodeTag
Definition nodes.h:27
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition palloc.h:124
WCOKind
NameData attname
on_exit_nicely_callback function
NameData relname
Definition pg_class.h:40
static void * list_nth(const List *list, int n)
Definition pg_list.h:331
static bool DatumGetBool(Datum X)
Definition postgres.h:100
uint64_t Datum
Definition postgres.h:70
unsigned int Oid
static int fb(int x)
static unsigned hash(unsigned *uv, int n)
Definition rege_dfa.c:715
ScanDirection
Definition sdir.h:25
List * es_range_table
Definition execnodes.h:698
MemoryContext ecxt_per_tuple_memory
Definition execnodes.h:295
Definition pg_list.h:54
Definition nodes.h:135
Bitmapset * chgParam
Definition execnodes.h:1235
ExecProcNodeMtd ExecProcNode
Definition execnodes.h:1207
TupleTableSlot * slot
Definition executor.h:623
DestReceiver * dest
Definition executor.h:624
MinimalTuple firstTuple
Definition execnodes.h:891
TupleDesc tts_tupleDescriptor
Definition tuptable.h:129
AttrNumber tts_nvalid
Definition tuptable.h:126
uint16 tts_flags
Definition tuptable.h:124
Definition type.h:96
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
Definition tuptable.h:417
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
Definition tuptable.h:476
uint16 ReplOriginId
Definition xlogdefs.h:69