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-2025, 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 * EXPLAIN_GENERIC can only be used together with EXPLAIN_ONLY. It indicates
40 * that a generic plan is being shown using EXPLAIN (GENERIC_PLAN), which
41 * means that missing parameter values must be tolerated. Currently, the only
42 * effect is to suppress execution-time partition pruning.
43 *
44 * REWIND indicates that the plan node should try to efficiently support
45 * rescans without parameter changes. (Nodes must support ExecReScan calls
46 * in any case, but if this flag was not given, they are at liberty to do it
47 * through complete recalculation. Note that a parameter change forces a
48 * full recalculation in any case.)
49 *
50 * BACKWARD indicates that the plan node must respect the es_direction flag.
51 * When this is not passed, the plan node will only be run forwards.
52 *
53 * MARK indicates that the plan node must support Mark/Restore calls.
54 * When this is not passed, no Mark/Restore will occur.
55 *
56 * SKIP_TRIGGERS tells ExecutorStart/ExecutorFinish to skip calling
57 * AfterTriggerBeginQuery/AfterTriggerEndQuery. This does not necessarily
58 * mean that the plan can't queue any AFTER triggers; just that the caller
59 * is responsible for there being a trigger context for them to be queued in.
60 *
61 * WITH_NO_DATA indicates that we are performing REFRESH MATERIALIZED VIEW
62 * ... WITH NO DATA. Currently, the only effect is to suppress errors about
63 * scanning unpopulated materialized views.
64 */
65#define EXEC_FLAG_EXPLAIN_ONLY 0x0001 /* EXPLAIN, no ANALYZE */
66#define EXEC_FLAG_EXPLAIN_GENERIC 0x0002 /* EXPLAIN (GENERIC_PLAN) */
67#define EXEC_FLAG_REWIND 0x0004 /* need efficient rescan */
68#define EXEC_FLAG_BACKWARD 0x0008 /* need backward scan */
69#define EXEC_FLAG_MARK 0x0010 /* need mark/restore */
70#define EXEC_FLAG_SKIP_TRIGGERS 0x0020 /* skip AfterTrigger setup */
71#define EXEC_FLAG_WITH_NO_DATA 0x0040 /* REFRESH ... WITH NO DATA */
72
73
74/* Hook for plugins to get control in ExecutorStart() */
75typedef void (*ExecutorStart_hook_type) (QueryDesc *queryDesc, int eflags);
77
78/* Hook for plugins to get control in ExecutorRun() */
79typedef void (*ExecutorRun_hook_type) (QueryDesc *queryDesc,
80 ScanDirection direction,
81 uint64 count);
83
84/* Hook for plugins to get control in ExecutorFinish() */
85typedef void (*ExecutorFinish_hook_type) (QueryDesc *queryDesc);
87
88/* Hook for plugins to get control in ExecutorEnd() */
89typedef void (*ExecutorEnd_hook_type) (QueryDesc *queryDesc);
91
92/* Hook for plugins to get control in ExecCheckPermissions() */
93typedef bool (*ExecutorCheckPerms_hook_type) (List *rangeTable,
94 List *rtePermInfos,
95 bool ereport_on_violation);
97
98
99/*
100 * prototypes from functions in execAmi.c
101 */
102struct Path; /* avoid including pathnodes.h here */
103
104extern void ExecReScan(PlanState *node);
105extern void ExecMarkPos(PlanState *node);
106extern void ExecRestrPos(PlanState *node);
107extern bool ExecSupportsMarkRestore(struct Path *pathnode);
108extern bool ExecSupportsBackwardScan(Plan *node);
109extern bool ExecMaterializesOutput(NodeTag plantype);
110
111/*
112 * prototypes from functions in execCurrent.c
113 */
114extern bool execCurrentOf(CurrentOfExpr *cexpr,
115 ExprContext *econtext,
116 Oid table_oid,
117 ItemPointer current_tid);
118
119/*
120 * prototypes from functions in execGrouping.c
121 */
123 int numCols,
124 const AttrNumber *keyColIdx,
125 const Oid *eqOperators,
126 const Oid *collations,
127 PlanState *parent);
128extern void execTuplesHashPrepare(int numCols,
129 const Oid *eqOperators,
130 Oid **eqFuncOids,
131 FmgrInfo **hashFunctions);
133 TupleDesc inputDesc,
134 const TupleTableSlotOps *inputOps,
135 int numCols,
136 AttrNumber *keyColIdx,
137 const Oid *eqfuncoids,
138 FmgrInfo *hashfunctions,
139 Oid *collations,
140 long nbuckets,
141 Size additionalsize,
142 MemoryContext metacxt,
143 MemoryContext tablecxt,
144 MemoryContext tempcxt,
145 bool use_variable_hash_iv);
147 TupleTableSlot *slot,
148 bool *isnew, uint32 *hash);
150 TupleTableSlot *slot);
152 TupleTableSlot *slot,
153 bool *isnew, uint32 hash);
155 TupleTableSlot *slot,
156 ExprState *eqcomp,
157 ExprState *hashexpr);
158extern void ResetTupleHashTable(TupleHashTable hashtable);
159
160/*
161 * prototypes from functions in execJunk.c
162 */
163extern JunkFilter *ExecInitJunkFilter(List *targetList,
164 TupleTableSlot *slot);
166 TupleDesc cleanTupType,
167 TupleTableSlot *slot);
169 const char *attrName);
171 const char *attrName);
172extern TupleTableSlot *ExecFilterJunk(JunkFilter *junkfilter,
173 TupleTableSlot *slot);
174
175/*
176 * ExecGetJunkAttribute
177 *
178 * Given a junk filter's input tuple (slot) and a junk attribute's number
179 * previously found by ExecFindJunkAttribute, extract & return the value and
180 * isNull flag of the attribute.
181 */
182#ifndef FRONTEND
183static inline Datum
185{
186 Assert(attno > 0);
187 return slot_getattr(slot, attno, isNull);
188}
189#endif
190
191/*
192 * prototypes from functions in execMain.c
193 */
194extern void ExecutorStart(QueryDesc *queryDesc, int eflags);
195extern void standard_ExecutorStart(QueryDesc *queryDesc, int eflags);
196extern void ExecutorRun(QueryDesc *queryDesc,
197 ScanDirection direction, uint64 count);
198extern void standard_ExecutorRun(QueryDesc *queryDesc,
199 ScanDirection direction, uint64 count);
200extern void ExecutorFinish(QueryDesc *queryDesc);
201extern void standard_ExecutorFinish(QueryDesc *queryDesc);
202extern void ExecutorEnd(QueryDesc *queryDesc);
203extern void standard_ExecutorEnd(QueryDesc *queryDesc);
204extern void ExecutorRewind(QueryDesc *queryDesc);
205extern bool ExecCheckPermissions(List *rangeTable,
206 List *rteperminfos, bool ereport_on_violation);
207extern void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation,
208 List *mergeActions);
209extern void InitResultRelInfo(ResultRelInfo *resultRelInfo,
210 Relation resultRelationDesc,
211 Index resultRelationIndex,
212 ResultRelInfo *partition_root_rri,
213 int instrument_options);
214extern ResultRelInfo *ExecGetTriggerResultRel(EState *estate, Oid relid,
215 ResultRelInfo *rootRelInfo);
216extern List *ExecGetAncestorResultRels(EState *estate, ResultRelInfo *resultRelInfo);
217extern void ExecConstraints(ResultRelInfo *resultRelInfo,
218 TupleTableSlot *slot, EState *estate);
219extern bool ExecPartitionCheck(ResultRelInfo *resultRelInfo,
220 TupleTableSlot *slot, EState *estate, bool emitError);
221extern void ExecPartitionCheckEmitError(ResultRelInfo *resultRelInfo,
222 TupleTableSlot *slot, EState *estate);
223extern void ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo,
224 TupleTableSlot *slot, EState *estate);
225extern char *ExecBuildSlotValueDescription(Oid reloid, TupleTableSlot *slot,
226 TupleDesc tupdesc,
227 Bitmapset *modifiedCols,
228 int maxfieldlen);
229extern LockTupleMode ExecUpdateLockMode(EState *estate, ResultRelInfo *relinfo);
230extern ExecRowMark *ExecFindRowMark(EState *estate, Index rti, bool missing_ok);
231extern ExecAuxRowMark *ExecBuildAuxRowMark(ExecRowMark *erm, List *targetlist);
232extern TupleTableSlot *EvalPlanQual(EPQState *epqstate, Relation relation,
233 Index rti, TupleTableSlot *inputslot);
234extern void EvalPlanQualInit(EPQState *epqstate, EState *parentestate,
235 Plan *subplan, List *auxrowmarks,
236 int epqParam, List *resultRelations);
237extern void EvalPlanQualSetPlan(EPQState *epqstate,
238 Plan *subplan, List *auxrowmarks);
240 Relation relation, Index rti);
241
242#define EvalPlanQualSetSlot(epqstate, slot) ((epqstate)->origslot = (slot))
243extern bool EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot);
244extern TupleTableSlot *EvalPlanQualNext(EPQState *epqstate);
245extern void EvalPlanQualBegin(EPQState *epqstate);
246extern void EvalPlanQualEnd(EPQState *epqstate);
247
248/*
249 * functions in execProcnode.c
250 */
251extern PlanState *ExecInitNode(Plan *node, EState *estate, int eflags);
253extern Node *MultiExecProcNode(PlanState *node);
254extern void ExecEndNode(PlanState *node);
255extern void ExecShutdownNode(PlanState *node);
256extern void ExecSetTupleBound(int64 tuples_needed, PlanState *child_node);
257
258
259/* ----------------------------------------------------------------
260 * ExecProcNode
261 *
262 * Execute the given node to return a(nother) tuple.
263 * ----------------------------------------------------------------
264 */
265#ifndef FRONTEND
266static inline TupleTableSlot *
268{
269 if (node->chgParam != NULL) /* something changed? */
270 ExecReScan(node); /* let ReScan handle this */
271
272 return node->ExecProcNode(node);
273}
274#endif
275
276/*
277 * prototypes from functions in execExpr.c
278 */
279extern ExprState *ExecInitExpr(Expr *node, PlanState *parent);
280extern ExprState *ExecInitExprWithParams(Expr *node, ParamListInfo ext_params);
281extern ExprState *ExecInitQual(List *qual, PlanState *parent);
282extern ExprState *ExecInitCheck(List *qual, PlanState *parent);
283extern List *ExecInitExprList(List *nodes, PlanState *parent);
285 bool doSort, bool doHash, bool nullcheck);
287 const TupleTableSlotOps *ops,
288 FmgrInfo *hashfunctions,
289 Oid *collations,
290 int numCols,
291 AttrNumber *keyColIdx,
292 PlanState *parent,
293 uint32 init_value);
295 const TupleTableSlotOps *ops,
296 const Oid *hashfunc_oids,
297 const List *collations,
298 const List *hash_exprs,
299 const bool *opstrict, PlanState *parent,
300 uint32 init_value, bool keep_nulls);
302 const TupleTableSlotOps *lops, const TupleTableSlotOps *rops,
303 int numCols,
304 const AttrNumber *keyColIdx,
305 const Oid *eqfunctions,
306 const Oid *collations,
307 PlanState *parent);
309 const TupleTableSlotOps *lops,
310 const TupleTableSlotOps *rops,
311 const Oid *eqfunctions,
312 const Oid *collations,
313 const List *param_exprs,
314 PlanState *parent);
316 ExprContext *econtext,
317 TupleTableSlot *slot,
318 PlanState *parent,
319 TupleDesc inputDesc);
321 bool evalTargetList,
322 List *targetColnos,
323 TupleDesc relDesc,
324 ExprContext *econtext,
325 TupleTableSlot *slot,
326 PlanState *parent);
327extern ExprState *ExecPrepareExpr(Expr *node, EState *estate);
328extern ExprState *ExecPrepareQual(List *qual, EState *estate);
329extern ExprState *ExecPrepareCheck(List *qual, EState *estate);
330extern List *ExecPrepareExprList(List *nodes, EState *estate);
331
332/*
333 * ExecEvalExpr
334 *
335 * Evaluate expression identified by "state" in the execution context
336 * given by "econtext". *isNull is set to the is-null flag for the result,
337 * and the Datum value is the function result.
338 *
339 * The caller should already have switched into the temporary memory
340 * context econtext->ecxt_per_tuple_memory. The convenience entry point
341 * ExecEvalExprSwitchContext() is provided for callers who don't prefer to
342 * do the switch in an outer loop.
343 */
344#ifndef FRONTEND
345static inline Datum
347 ExprContext *econtext,
348 bool *isNull)
349{
350 return state->evalfunc(state, econtext, isNull);
351}
352#endif
353
354/*
355 * ExecEvalExprSwitchContext
356 *
357 * Same as ExecEvalExpr, but get into the right allocation context explicitly.
358 */
359#ifndef FRONTEND
360static inline Datum
362 ExprContext *econtext,
363 bool *isNull)
364{
365 Datum retDatum;
366 MemoryContext oldContext;
367
368 oldContext = MemoryContextSwitchTo(econtext->ecxt_per_tuple_memory);
369 retDatum = state->evalfunc(state, econtext, isNull);
370 MemoryContextSwitchTo(oldContext);
371 return retDatum;
372}
373#endif
374
375/*
376 * ExecProject
377 *
378 * Projects a tuple based on projection info and stores it in the slot passed
379 * to ExecBuildProjectionInfo().
380 *
381 * Note: the result is always a virtual tuple; therefore it may reference
382 * the contents of the exprContext's scan tuples and/or temporary results
383 * constructed in the exprContext. If the caller wishes the result to be
384 * valid longer than that data will be valid, he must call ExecMaterializeSlot
385 * on the result slot.
386 */
387#ifndef FRONTEND
388static inline TupleTableSlot *
390{
391 ExprContext *econtext = projInfo->pi_exprContext;
392 ExprState *state = &projInfo->pi_state;
393 TupleTableSlot *slot = state->resultslot;
394 bool isnull;
395
396 /*
397 * Clear any former contents of the result slot. This makes it safe for
398 * us to use the slot's Datum/isnull arrays as workspace.
399 */
400 ExecClearTuple(slot);
401
402 /* Run the expression, discarding scalar result from the last column. */
403 (void) ExecEvalExprSwitchContext(state, econtext, &isnull);
404
405 /*
406 * Successfully formed a result row. Mark the result slot as containing a
407 * valid virtual tuple (inlined version of ExecStoreVirtualTuple()).
408 */
409 slot->tts_flags &= ~TTS_FLAG_EMPTY;
410 slot->tts_nvalid = slot->tts_tupleDescriptor->natts;
411
412 return slot;
413}
414#endif
415
416/*
417 * ExecQual - evaluate a qual prepared with ExecInitQual (possibly via
418 * ExecPrepareQual). Returns true if qual is satisfied, else false.
419 *
420 * Note: ExecQual used to have a third argument "resultForNull". The
421 * behavior of this function now corresponds to resultForNull == false.
422 * If you want the resultForNull == true behavior, see ExecCheck.
423 */
424#ifndef FRONTEND
425static inline bool
427{
428 Datum ret;
429 bool isnull;
430
431 /* short-circuit (here and in ExecInitQual) for empty restriction list */
432 if (state == NULL)
433 return true;
434
435 /* verify that expression was compiled using ExecInitQual */
436 Assert(state->flags & EEO_FLAG_IS_QUAL);
437
438 ret = ExecEvalExprSwitchContext(state, econtext, &isnull);
439
440 /* EEOP_QUAL should never return NULL */
441 Assert(!isnull);
442
443 return DatumGetBool(ret);
444}
445#endif
446
447/*
448 * ExecQualAndReset() - evaluate qual with ExecQual() and reset expression
449 * context.
450 */
451#ifndef FRONTEND
452static inline bool
454{
455 bool ret = ExecQual(state, econtext);
456
457 /* inline ResetExprContext, to avoid ordering issue in this file */
459 return ret;
460}
461#endif
462
463extern bool ExecCheck(ExprState *state, ExprContext *econtext);
464
465/*
466 * prototypes from functions in execSRF.c
467 */
469 ExprContext *econtext, PlanState *parent);
471 ExprContext *econtext,
472 MemoryContext argContext,
473 TupleDesc expectedDesc,
474 bool randomAccess);
476 ExprContext *econtext, PlanState *parent);
478 ExprContext *econtext,
479 MemoryContext argContext,
480 bool *isNull,
481 ExprDoneCond *isDone);
482
483/*
484 * prototypes from functions in execScan.c
485 */
486typedef TupleTableSlot *(*ExecScanAccessMtd) (ScanState *node);
487typedef bool (*ExecScanRecheckMtd) (ScanState *node, TupleTableSlot *slot);
488
489extern TupleTableSlot *ExecScan(ScanState *node, ExecScanAccessMtd accessMtd,
490 ExecScanRecheckMtd recheckMtd);
491extern void ExecAssignScanProjectionInfo(ScanState *node);
492extern void ExecAssignScanProjectionInfoWithVarno(ScanState *node, int varno);
493extern void ExecScanReScan(ScanState *node);
494
495/*
496 * prototypes from functions in execTuples.c
497 */
498extern void ExecInitResultTypeTL(PlanState *planstate);
499extern void ExecInitResultSlot(PlanState *planstate,
500 const TupleTableSlotOps *tts_ops);
501extern void ExecInitResultTupleSlotTL(PlanState *planstate,
502 const TupleTableSlotOps *tts_ops);
503extern void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate,
504 TupleDesc tupledesc,
505 const TupleTableSlotOps *tts_ops);
507 TupleDesc tupledesc,
508 const TupleTableSlotOps *tts_ops);
510 const TupleTableSlotOps *tts_ops);
511extern TupleDesc ExecTypeFromTL(List *targetList);
512extern TupleDesc ExecCleanTypeFromTL(List *targetList);
513extern TupleDesc ExecTypeFromExprList(List *exprList);
514extern void ExecTypeSetColNames(TupleDesc typeInfo, List *namesList);
515extern void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg);
516
517typedef struct TupOutputState
518{
522
524 TupleDesc tupdesc,
525 const TupleTableSlotOps *tts_ops);
526extern void do_tup_output(TupOutputState *tstate, const Datum *values, const bool *isnull);
527extern void do_text_output_multiline(TupOutputState *tstate, const char *txt);
528extern void end_tup_output(TupOutputState *tstate);
529
530/*
531 * Write a single line of text given as a C string.
532 *
533 * Should only be used with a single-TEXT-attribute tupdesc.
534 */
535#define do_text_output_oneline(tstate, str_to_emit) \
536 do { \
537 Datum values_[1]; \
538 bool isnull_[1]; \
539 values_[0] = PointerGetDatum(cstring_to_text(str_to_emit)); \
540 isnull_[0] = false; \
541 do_tup_output(tstate, values_, isnull_); \
542 pfree(DatumGetPointer(values_[0])); \
543 } while (0)
544
545
546/*
547 * prototypes from functions in execUtils.c
548 */
549extern EState *CreateExecutorState(void);
550extern void FreeExecutorState(EState *estate);
551extern ExprContext *CreateExprContext(EState *estate);
554extern void FreeExprContext(ExprContext *econtext, bool isCommit);
555extern void ReScanExprContext(ExprContext *econtext);
556
557#define ResetExprContext(econtext) \
558 MemoryContextReset((econtext)->ecxt_per_tuple_memory)
559
561
562/* Get an EState's per-output-tuple exprcontext, making it if first use */
563#define GetPerTupleExprContext(estate) \
564 ((estate)->es_per_tuple_exprcontext ? \
565 (estate)->es_per_tuple_exprcontext : \
566 MakePerTupleExprContext(estate))
567
568#define GetPerTupleMemoryContext(estate) \
569 (GetPerTupleExprContext(estate)->ecxt_per_tuple_memory)
570
571/* Reset an EState's per-output-tuple exprcontext, if one's been created */
572#define ResetPerTupleExprContext(estate) \
573 do { \
574 if ((estate)->es_per_tuple_exprcontext) \
575 ResetExprContext((estate)->es_per_tuple_exprcontext); \
576 } while (0)
577
578extern void ExecAssignExprContext(EState *estate, PlanState *planstate);
579extern TupleDesc ExecGetResultType(PlanState *planstate);
580extern const TupleTableSlotOps *ExecGetResultSlotOps(PlanState *planstate,
581 bool *isfixed);
582extern const TupleTableSlotOps *ExecGetCommonSlotOps(PlanState **planstates,
583 int nplans);
585extern void ExecAssignProjectionInfo(PlanState *planstate,
586 TupleDesc inputDesc);
588 TupleDesc inputDesc, int varno);
589extern void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc);
590extern void ExecCreateScanSlotFromOuterPlan(EState *estate,
591 ScanState *scanstate,
592 const TupleTableSlotOps *tts_ops);
593
594extern bool ExecRelationIsTargetRelation(EState *estate, Index scanrelid);
595
596extern Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags);
597
598extern void ExecInitRangeTable(EState *estate, List *rangeTable, List *permInfos,
599 Bitmapset *unpruned_relids);
600extern void ExecCloseRangeTableRelations(EState *estate);
601extern void ExecCloseResultRelations(EState *estate);
602
603static inline RangeTblEntry *
605{
606 return (RangeTblEntry *) list_nth(estate->es_range_table, rti - 1);
607}
608
610extern void ExecInitResultRelation(EState *estate, ResultRelInfo *resultRelInfo,
611 Index rti);
612
613extern int executor_errposition(EState *estate, int location);
614
615extern void RegisterExprContextCallback(ExprContext *econtext,
617 Datum arg);
618extern void UnregisterExprContextCallback(ExprContext *econtext,
620 Datum arg);
621
622extern Datum GetAttributeByName(HeapTupleHeader tuple, const char *attname,
623 bool *isNull);
625 bool *isNull);
626
627extern int ExecTargetListLength(List *targetlist);
628extern int ExecCleanTargetListLength(List *targetlist);
629
633extern TupleTableSlot *ExecGetAllNullSlot(EState *estate, ResultRelInfo *relInfo);
635extern TupleConversionMap *ExecGetRootToChildMap(ResultRelInfo *resultRelInfo, EState *estate);
636
637extern Oid ExecGetResultRelCheckAsUser(ResultRelInfo *relInfo, EState *estate);
638extern Bitmapset *ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate);
639extern Bitmapset *ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate);
640extern Bitmapset *ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate);
641extern Bitmapset *ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate);
642
643/*
644 * prototypes from functions in execIndexing.c
645 */
646extern void ExecOpenIndices(ResultRelInfo *resultRelInfo, bool speculative);
647extern void ExecCloseIndices(ResultRelInfo *resultRelInfo);
648extern List *ExecInsertIndexTuples(ResultRelInfo *resultRelInfo,
649 TupleTableSlot *slot, EState *estate,
650 bool update,
651 bool noDupErr,
652 bool *specConflict, List *arbiterIndexes,
653 bool onlySummarizing);
654extern bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo,
655 TupleTableSlot *slot,
656 EState *estate, ItemPointer conflictTid,
657 ItemPointer tupleid,
658 List *arbiterIndexes);
660 IndexInfo *indexInfo,
661 ItemPointer tupleid,
662 const Datum *values, const bool *isnull,
663 EState *estate, bool newIndex);
664
665/*
666 * prototypes from functions in execReplication.c
667 */
668extern bool RelationFindReplTupleByIndex(Relation rel, Oid idxoid,
669 LockTupleMode lockmode,
670 TupleTableSlot *searchslot,
671 TupleTableSlot *outslot);
672extern bool RelationFindReplTupleSeq(Relation rel, LockTupleMode lockmode,
673 TupleTableSlot *searchslot, TupleTableSlot *outslot);
674
675extern void ExecSimpleRelationInsert(ResultRelInfo *resultRelInfo,
676 EState *estate, TupleTableSlot *slot);
677extern void ExecSimpleRelationUpdate(ResultRelInfo *resultRelInfo,
678 EState *estate, EPQState *epqstate,
679 TupleTableSlot *searchslot, TupleTableSlot *slot);
680extern void ExecSimpleRelationDelete(ResultRelInfo *resultRelInfo,
681 EState *estate, EPQState *epqstate,
682 TupleTableSlot *searchslot);
683extern void CheckCmdReplicaIdentity(Relation rel, CmdType cmd);
684
685extern void CheckSubscriptionRelkind(char relkind, const char *nspname,
686 const char *relname);
687
688/*
689 * prototypes from functions in nodeModifyTable.c
690 */
692 TupleTableSlot *planSlot,
693 TupleTableSlot *oldSlot);
695 Oid resultoid,
696 bool missing_ok,
697 bool update_cache);
698
699#endif /* EXECUTOR_H */
int16 AttrNumber
Definition: attnum.h:21
static Datum values[MAXATTR]
Definition: bootstrap.c:151
#define PGDLLIMPORT
Definition: c.h:1277
#define Assert(condition)
Definition: c.h:815
int64_t int64
Definition: c.h:485
uint64_t uint64
Definition: c.h:489
uint32_t uint32
Definition: c.h:488
unsigned int Index
Definition: c.h:571
size_t Size
Definition: c.h:562
void(* ExprContextCallbackFunction)(Datum arg)
Definition: execnodes.h:229
TupleTableSlot *(* ExecProcNodeMtd)(struct PlanState *pstate)
Definition: execnodes.h:1135
ExprDoneCond
Definition: execnodes.h:320
#define EEO_FLAG_IS_QUAL
Definition: execnodes.h:76
TupleDesc ExecGetResultType(PlanState *planstate)
Definition: execUtils.c:496
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:2387
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)
Definition: execGrouping.c:58
ExecRowMark * ExecFindRowMark(EState *estate, Index rti, bool missing_ok)
Definition: execMain.c:2413
TupleConversionMap * ExecGetRootToChildMap(ResultRelInfo *resultRelInfo, EState *estate)
Definition: execUtils.c:1316
ExecAuxRowMark * ExecBuildAuxRowMark(ExecRowMark *erm, List *targetlist)
Definition: execMain.c:2436
ResultRelInfo * ExecGetTriggerResultRel(EState *estate, Oid relid, ResultRelInfo *rootRelInfo)
Definition: execMain.c:1322
void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation, List *mergeActions)
Definition: execMain.c:1045
void ExecAssignScanProjectionInfoWithVarno(ScanState *node, int varno)
Definition: execScan.c:94
PGDLLIMPORT ExecutorEnd_hook_type ExecutorEnd_hook
Definition: execMain.c:71
TupleTableSlot * EvalPlanQualSlot(EPQState *epqstate, Relation relation, Index rti)
Definition: execMain.c:2634
Bitmapset * ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1393
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:2789
Bitmapset * ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1351
TupleTableSlot * ExecGetTriggerNewSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1216
PGDLLIMPORT ExecutorStart_hook_type ExecutorStart_hook
Definition: execMain.c:68
char * ExecBuildSlotValueDescription(Oid reloid, TupleTableSlot *slot, TupleDesc tupdesc, Bitmapset *modifiedCols, int maxfieldlen)
Definition: execMain.c:2248
ExprState * ExecBuildHash32FromAttrs(TupleDesc desc, const TupleTableSlotOps *ops, FmgrInfo *hashfunctions, Oid *collations, int numCols, AttrNumber *keyColIdx, PlanState *parent, uint32 init_value)
Definition: execExpr.c:4130
void ReScanExprContext(ExprContext *econtext)
Definition: execUtils.c:444
static TupleTableSlot * ExecProject(ProjectionInfo *projInfo)
Definition: executor.h:389
bool ExecPartitionCheck(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, bool emitError)
Definition: execMain.c:1826
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
Definition: execExpr.c:143
JunkFilter * ExecInitJunkFilterConversion(List *targetList, TupleDesc cleanTupType, TupleTableSlot *slot)
Definition: execJunk.c:137
void do_tup_output(TupOutputState *tstate, const Datum *values, const bool *isnull)
Definition: execTuples.c:2462
ExprState * ExecPrepareExpr(Expr *node, EState *estate)
Definition: execExpr.c:765
bool ExecCheck(ExprState *state, ExprContext *econtext)
Definition: execExpr.c:872
ExprContext * CreateExprContext(EState *estate)
Definition: execUtils.c:307
ExprState * ExecInitCheck(List *qual, PlanState *parent)
Definition: execExpr.c:315
SetExprState * ExecInitFunctionResultSet(Expr *expr, ExprContext *econtext, PlanState *parent)
Definition: execSRF.c:444
void execTuplesHashPrepare(int numCols, const Oid *eqOperators, Oid **eqFuncOids, FmgrInfo **hashFunctions)
Definition: execGrouping.c:97
void(* ExecutorFinish_hook_type)(QueryDesc *queryDesc)
Definition: executor.h:85
TupleConversionMap * ExecGetChildToRootMap(ResultRelInfo *resultRelInfo)
Definition: execUtils.c:1290
ExprContext * CreateStandaloneExprContext(void)
Definition: execUtils.c:358
void ExecutorEnd(QueryDesc *queryDesc)
Definition: execMain.c:464
void EvalPlanQualInit(EPQState *epqstate, EState *parentestate, Plan *subplan, List *auxrowmarks, int epqParam, List *resultRelations)
Definition: execMain.c:2575
TupleTableSlot * ExecGetTriggerOldSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1194
TupleDesc ExecCleanTypeFromTL(List *targetList)
Definition: execTuples.c:2137
void ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition: execMain.c:2085
int executor_errposition(EState *estate, int location)
Definition: execUtils.c:926
void ExecInitResultSlot(PlanState *planstate, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1966
ProjectionInfo * ExecBuildProjectionInfo(List *targetList, ExprContext *econtext, TupleTableSlot *slot, PlanState *parent, TupleDesc inputDesc)
Definition: execExpr.c:370
void ExecTypeSetColNames(TupleDesc typeInfo, List *namesList)
Definition: execTuples.c:2217
TupleHashEntry LookupTupleHashEntryHash(TupleHashTable hashtable, TupleTableSlot *slot, bool *isnew, uint32 hash)
Definition: execGrouping.c:347
bool ExecSupportsMarkRestore(struct Path *pathnode)
Definition: execAmi.c:417
static RangeTblEntry * exec_rt_fetch(Index rti, EState *estate)
Definition: executor.h:604
Tuplestorestate * ExecMakeTableFunctionResult(SetExprState *setexpr, ExprContext *econtext, MemoryContext argContext, TupleDesc expectedDesc, bool randomAccess)
Definition: execSRF.c:101
Datum GetAttributeByNum(HeapTupleHeader tuple, AttrNumber attrno, bool *isNull)
Definition: execUtils.c:1114
void FreeExprContext(ExprContext *econtext, bool isCommit)
Definition: execUtils.c:417
void ExecInitRangeTable(EState *estate, List *rangeTable, List *permInfos, Bitmapset *unpruned_relids)
Definition: execUtils.c:774
TupleTableSlot * ExecFilterJunk(JunkFilter *junkfilter, TupleTableSlot *slot)
Definition: execJunk.c:247
Node * MultiExecProcNode(PlanState *node)
Definition: execProcnode.c:507
AttrNumber ExecFindJunkAttributeInTlist(List *targetlist, const char *attrName)
Definition: execJunk.c:222
Bitmapset * ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1372
TupleTableSlot * ExecGetUpdateNewTuple(ResultRelInfo *relinfo, TupleTableSlot *planSlot, TupleTableSlot *oldSlot)
const TupleTableSlotOps * ExecGetCommonSlotOps(PlanState **planstates, int nplans)
Definition: execUtils.c:537
void ExecInitResultRelation(EState *estate, ResultRelInfo *resultRelInfo, Index rti)
Definition: execUtils.c:870
void end_tup_output(TupOutputState *tstate)
Definition: execTuples.c:2520
void InitResultRelInfo(ResultRelInfo *resultRelInfo, Relation resultRelationDesc, Index resultRelationIndex, ResultRelInfo *partition_root_rri, int instrument_options)
Definition: execMain.c:1222
void ExecMarkPos(PlanState *node)
Definition: execAmi.c:326
void ExecSetTupleBound(int64 tuples_needed, PlanState *child_node)
Definition: execProcnode.c:848
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:497
void standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
Definition: execMain.c:139
void ExecCreateScanSlotFromOuterPlan(EState *estate, ScanState *scanstate, const TupleTableSlotOps *tts_ops)
Definition: execUtils.c:705
void ExecutorFinish(QueryDesc *queryDesc)
Definition: execMain.c:404
void ExecEndNode(PlanState *node)
Definition: execProcnode.c:562
JunkFilter * ExecInitJunkFilter(List *targetList, TupleTableSlot *slot)
Definition: execJunk.c:60
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:1998
TupleHashEntry LookupTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot, bool *isnew, uint32 *hash)
Definition: execGrouping.c:292
void EvalPlanQualEnd(EPQState *epqstate)
Definition: execMain.c:3027
void ExecInitResultTypeTL(PlanState *planstate)
Definition: execTuples.c:1942
void EvalPlanQualSetPlan(EPQState *epqstate, Plan *subplan, List *auxrowmarks)
Definition: execMain.c:2617
void CheckCmdReplicaIdentity(Relation rel, CmdType cmd)
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
Definition: execProcnode.c:142
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:79
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:70
void ExecutorRewind(QueryDesc *queryDesc)
Definition: execMain.c:534
void do_text_output_multiline(TupOutputState *tstate, const char *txt)
Definition: execTuples.c:2490
void ExecShutdownNode(PlanState *node)
Definition: execProcnode.c:772
void ExecAssignExprContext(EState *estate, PlanState *planstate)
Definition: execUtils.c:486
void ExecutorStart(QueryDesc *queryDesc, int eflags)
Definition: execMain.c:120
ExprState * ExecPrepareQual(List *qual, EState *estate)
Definition: execExpr.c:793
Relation ExecGetRangeTableRelation(EState *estate, Index rti)
Definition: execUtils.c:818
SetExprState * ExecInitTableFunctionResult(Expr *expr, ExprContext *econtext, PlanState *parent)
Definition: execSRF.c:56
ExprState * ExecInitQual(List *qual, PlanState *parent)
Definition: execExpr.c:229
TupleTableSlot * EvalPlanQual(EPQState *epqstate, Relation relation, Index rti, TupleTableSlot *inputslot)
Definition: execMain.c:2506
void ExecAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc)
Definition: execUtils.c:584
void(* ExecutorStart_hook_type)(QueryDesc *queryDesc, int eflags)
Definition: executor.h:75
static bool ExecQual(ExprState *state, ExprContext *econtext)
Definition: executor.h:426
ExprContext * MakePerTupleExprContext(EState *estate)
Definition: execUtils.c:459
void UnregisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg)
Definition: execUtils.c:979
void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc)
Definition: execUtils.c:693
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
Definition: executor.h:487
const TupleTableSlotOps * ExecGetCommonChildSlotOps(PlanState *ps)
Definition: execUtils.c:564
TupleTableSlot * ExecInitExtraTupleSlot(EState *estate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:2018
bool(* ExecutorCheckPerms_hook_type)(List *rangeTable, List *rtePermInfos, bool ereport_on_violation)
Definition: executor.h:93
uint32 TupleHashTableHash(TupleHashTable hashtable, TupleTableSlot *slot)
Definition: execGrouping.c:324
bool EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot)
Definition: execMain.c:2662
List * ExecInitExprList(List *nodes, PlanState *parent)
Definition: execExpr.c:335
void ExecConditionalAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc, int varno)
Definition: execUtils.c:604
void(* ExecutorEnd_hook_type)(QueryDesc *queryDesc)
Definition: executor.h:89
void ExecInitResultTupleSlotTL(PlanState *planstate, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1986
void ExecCloseIndices(ResultRelInfo *resultRelInfo)
Definition: execIndexing.c:236
void RegisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg)
Definition: execUtils.c:953
static bool ExecQualAndReset(ExprState *state, ExprContext *econtext)
Definition: executor.h:453
ExprState * ExecInitExprWithParams(Expr *node, ParamListInfo ext_params)
Definition: execExpr.c:180
void ExecAssignScanProjectionInfo(ScanState *node)
Definition: execScan.c:81
int ExecTargetListLength(List *targetlist)
Definition: execUtils.c:1165
ProjectionInfo * ExecBuildUpdateProjection(List *targetList, bool evalTargetList, List *targetColnos, TupleDesc relDesc, ExprContext *econtext, TupleTableSlot *slot, PlanState *parent)
Definition: execExpr.c:547
void FreeExecutorState(EState *estate)
Definition: execUtils.c:192
struct TupOutputState TupOutputState
bool ExecRelationIsTargetRelation(EState *estate, Index scanrelid)
Definition: execUtils.c:730
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:4454
TupleHashEntry FindTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot, ExprState *eqcomp, ExprState *hashexpr)
Definition: execGrouping.c:379
void ExecCloseResultRelations(EState *estate)
Definition: execMain.c:1543
static TupleTableSlot * ExecProcNode(PlanState *node)
Definition: executor.h:267
TupleTableSlot * ExecGetAllNullSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1263
bool ExecMaterializesOutput(NodeTag plantype)
Definition: execAmi.c:635
void ExecOpenIndices(ResultRelInfo *resultRelInfo, bool speculative)
Definition: execIndexing.c:160
int ExecCleanTargetListLength(List *targetlist)
Definition: execUtils.c:1175
ExprContext * CreateWorkExprContext(EState *estate)
Definition: execUtils.c:322
TupOutputState * begin_tup_output_tupdesc(DestReceiver *dest, TupleDesc tupdesc, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:2442
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
Definition: executor.h:486
void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg)
Definition: execUtils.c:900
void ExecScanReScan(ScanState *node)
Definition: execScan.c:108
bool ExecSupportsBackwardScan(Plan *node)
Definition: execAmi.c:510
const TupleTableSlotOps * ExecGetResultSlotOps(PlanState *planstate, bool *isfixed)
Definition: execUtils.c:505
Datum GetAttributeByName(HeapTupleHeader tuple, const char *attname, bool *isNull)
Definition: execUtils.c:1051
TupleHashTable BuildTupleHashTable(PlanState *parent, TupleDesc inputDesc, const TupleTableSlotOps *inputOps, int numCols, AttrNumber *keyColIdx, const Oid *eqfuncoids, FmgrInfo *hashfunctions, Oid *collations, long nbuckets, Size additionalsize, MemoryContext metacxt, MemoryContext tablecxt, MemoryContext tempcxt, bool use_variable_hash_iv)
Definition: execGrouping.c:161
PGDLLIMPORT ExecutorCheckPerms_hook_type ExecutorCheckPerms_hook
Definition: execMain.c:74
bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, ItemPointer conflictTid, ItemPointer tupleid, List *arbiterIndexes)
Definition: execIndexing.c:536
Bitmapset * ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate)
Definition: execUtils.c:1408
void ExecReScan(PlanState *node)
Definition: execAmi.c:76
PGDLLIMPORT ExecutorRun_hook_type ExecutorRun_hook
Definition: execMain.c:69
TupleDesc ExecTypeFromExprList(List *exprList)
Definition: execTuples.c:2184
List * ExecInsertIndexTuples(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate, bool update, bool noDupErr, bool *specConflict, List *arbiterIndexes, bool onlySummarizing)
Definition: execIndexing.c:303
TupleDesc ExecTypeFromTL(List *targetList)
Definition: execTuples.c:2125
void standard_ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count)
Definition: execMain.c:305
static Datum ExecEvalExpr(ExprState *state, ExprContext *econtext, bool *isNull)
Definition: executor.h:346
bool execCurrentOf(CurrentOfExpr *cexpr, ExprContext *econtext, Oid table_oid, ItemPointer current_tid)
Definition: execCurrent.c:44
void ResetTupleHashTable(TupleHashTable hashtable)
Definition: execGrouping.c:271
List * ExecPrepareExprList(List *nodes, EState *estate)
Definition: execExpr.c:839
void standard_ExecutorEnd(QueryDesc *queryDesc)
Definition: execMain.c:473
void ExecRestrPos(PlanState *node)
Definition: execAmi.c:375
void ExecCloseRangeTableRelations(EState *estate)
Definition: execMain.c:1603
static Datum ExecEvalExprSwitchContext(ExprState *state, ExprContext *econtext, bool *isNull)
Definition: executor.h:361
void check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo, ItemPointer tupleid, const Datum *values, const bool *isnull, EState *estate, bool newIndex)
Definition: execIndexing.c:950
void ExecSetExecProcNode(PlanState *node, ExecProcNodeMtd function)
Definition: execProcnode.c:430
void ExecPartitionCheckEmitError(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition: execMain.c:1879
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:4613
void ExecConstraints(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate)
Definition: execMain.c:1950
TupleTableSlot * ExecInitNullTupleSlot(EState *estate, TupleDesc tupType, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:2034
TupleTableSlot * ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo)
Definition: execUtils.c:1238
Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags)
Definition: execUtils.c:743
bool ExecCheckPermissions(List *rangeTable, List *rteperminfos, bool ereport_on_violation)
Definition: execMain.c:580
static Datum ExecGetJunkAttribute(TupleTableSlot *slot, AttrNumber attno, bool *isNull)
Definition: executor.h:184
void ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count)
Definition: execMain.c:295
Oid ExecGetResultRelCheckAsUser(ResultRelInfo *relInfo, EState *estate)
Definition: execUtils.c:1479
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, bool keep_nulls)
Definition: execExpr.c:4289
EState * CreateExecutorState(void)
Definition: execUtils.c:88
ExprState * ExecPrepareCheck(List *qual, EState *estate)
Definition: execExpr.c:816
List * ExecGetAncestorResultRels(EState *estate, ResultRelInfo *resultRelInfo)
Definition: execMain.c:1398
TupleTableSlot * EvalPlanQualNext(EPQState *epqstate)
Definition: execMain.c:2773
void standard_ExecutorFinish(QueryDesc *queryDesc)
Definition: execMain.c:413
struct parser_state ps
LockTupleMode
Definition: lockoptions.h:50
void MemoryContextReset(MemoryContext context)
Definition: mcxt.c:383
CmdType
Definition: nodes.h:263
NodeTag
Definition: nodes.h:27
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:124
WCOKind
Definition: parsenodes.h:1367
NameData attname
Definition: pg_attribute.h:41
on_exit_nicely_callback function
void * arg
NameData relname
Definition: pg_class.h:38
static void * list_nth(const List *list, int n)
Definition: pg_list.h:299
static bool DatumGetBool(Datum X)
Definition: postgres.h:95
uintptr_t Datum
Definition: postgres.h:69
unsigned int Oid
Definition: postgres_ext.h:32
static unsigned hash(unsigned *uv, int n)
Definition: rege_dfa.c:715
ScanDirection
Definition: sdir.h:25
List * es_range_table
Definition: execnodes.h:652
MemoryContext ecxt_per_tuple_memory
Definition: execnodes.h:275
Definition: fmgr.h:57
Definition: pg_list.h:54
Definition: nodes.h:129
Bitmapset * chgParam
Definition: execnodes.h:1182
ExecProcNodeMtd ExecProcNode
Definition: execnodes.h:1156
ExprState pi_state
Definition: execnodes.h:380
ExprContext * pi_exprContext
Definition: execnodes.h:382
TupleTableSlot * slot
Definition: executor.h:519
DestReceiver * dest
Definition: executor.h:520
TupleDesc tts_tupleDescriptor
Definition: tuptable.h:123
AttrNumber tts_nvalid
Definition: tuptable.h:120
uint16 tts_flags
Definition: tuptable.h:118
Definition: type.h:96
Definition: regguts.h:323
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
Definition: tuptable.h:395
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
Definition: tuptable.h:454