235 Size initBlockSize,
Size maxBlockSize)
326 while (16 * maxBlockSize >
work_mem * 1024L)
333 initBlockSize, maxBlockSize);
587 int numattrs = tupdesc->
natts;
592 for (attrno = 1; attrno <= numattrs; attrno++)
597 if (tlist_item == NULL)
600 if (!var || !
IsA(var,
Var))
607 if (att_tup->attisdropped)
609 if (att_tup->atthasmissing)
622 if (var->vartype != att_tup->atttypid ||
623 (var->vartypmod != att_tup->atttypmod &&
624 var->vartypmod != -1))
627 tlist_item =
lnext(tlist, tlist_item);
712 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
713 errmsg(
"materialized view \"%s\" has not been populated",
715 errhint(
"Use the REFRESH MATERIALIZED VIEW command.")));
766 Assert(rti > 0 && rti <= estate->es_range_table_size);
932 while ((ecxt_callback = *prev_callback) != NULL)
934 if (ecxt_callback->
function ==
function && ecxt_callback->
arg ==
arg)
936 *prev_callback = ecxt_callback->
next;
937 pfree(ecxt_callback);
940 prev_callback = &ecxt_callback->
next;
977 pfree(ecxt_callback);
1009 elog(
ERROR,
"a NULL isNull pointer was passed");
1023 for (
i = 0;
i < tupDesc->
natts;
i++)
1029 attrno = att->attnum;
1069 elog(
ERROR,
"invalid attribute number %d", attrno);
1072 elog(
ERROR,
"a NULL isNull pointer was passed");
1124 foreach(tl, targetlist)
1128 if (!curTle->resjunk)
1254 !childrel->
rd_rel->relispartition);
1271 if (perminfo == NULL)
1292 if (perminfo == NULL)
1400 if (perminfo == NULL)
1401 elog(
ERROR,
"no RTEPermissionInfo found for result relation with OID %u",
AttrMap * build_attrmap_by_name_if_req(TupleDesc indesc, TupleDesc outdesc, bool missing_ok)
#define AttributeNumberIsValid(attributeNumber)
#define InvalidAttrNumber
Bitmapset * bms_join(Bitmapset *a, Bitmapset *b)
Bitmapset * bms_union(const Bitmapset *a, const Bitmapset *b)
Bitmapset * bms_intersect(const Bitmapset *a, const Bitmapset *b)
#define Assert(condition)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
int errposition(int cursorpos)
#define ereport(elevel,...)
ProjectionInfo * ExecBuildProjectionInfo(List *targetList, ExprContext *econtext, TupleTableSlot *slot, PlanState *parent, TupleDesc inputDesc)
void InitResultRelInfo(ResultRelInfo *resultRelInfo, Relation resultRelationDesc, Index resultRelationIndex, ResultRelInfo *partition_root_rri, int instrument_options)
const TupleTableSlotOps TTSOpsVirtual
void ExecInitResultSlot(PlanState *planstate, const TupleTableSlotOps *tts_ops)
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
TupleTableSlot * ExecInitExtraTupleSlot(EState *estate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
void ExecSetSlotDescriptor(TupleTableSlot *slot, TupleDesc tupdesc)
TupleDesc ExecGetResultType(PlanState *planstate)
Bitmapset * ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate)
static void ShutdownExprContext(ExprContext *econtext, bool isCommit)
TupleTableSlot * ExecGetTriggerOldSlot(EState *estate, ResultRelInfo *relInfo)
void ReScanExprContext(ExprContext *econtext)
ExprContext * CreateWorkExprContext(EState *estate)
const TupleTableSlotOps * ExecGetResultSlotOps(PlanState *planstate, bool *isfixed)
Bitmapset * ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate)
static RTEPermissionInfo * GetResultRTEPermissionInfo(ResultRelInfo *relinfo, EState *estate)
void ExecInitRangeTable(EState *estate, List *rangeTable, List *permInfos)
TupleTableSlot * ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo)
int executor_errposition(EState *estate, int location)
Datum GetAttributeByNum(HeapTupleHeader tuple, AttrNumber attrno, bool *isNull)
void FreeExprContext(ExprContext *econtext, bool isCommit)
static bool tlist_matches_tupdesc(PlanState *ps, List *tlist, int varno, TupleDesc tupdesc)
void ExecInitResultRelation(EState *estate, ResultRelInfo *resultRelInfo, Index rti)
ExprContext * CreateStandaloneExprContext(void)
void ExecCreateScanSlotFromOuterPlan(EState *estate, ScanState *scanstate, const TupleTableSlotOps *tts_ops)
EState * CreateExecutorState(void)
ExprContext * CreateExprContext(EState *estate)
TupleTableSlot * ExecGetTriggerNewSlot(EState *estate, ResultRelInfo *relInfo)
void ExecAssignExprContext(EState *estate, PlanState *planstate)
Relation ExecGetRangeTableRelation(EState *estate, Index rti)
void ExecAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc)
void UnregisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg)
void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc)
void ExecConditionalAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc, int varno)
void RegisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg)
TupleConversionMap * ExecGetRootToChildMap(ResultRelInfo *resultRelInfo, EState *estate)
int ExecTargetListLength(List *targetlist)
void FreeExecutorState(EState *estate)
bool ExecRelationIsTargetRelation(EState *estate, Index scanrelid)
TupleConversionMap * ExecGetChildToRootMap(ResultRelInfo *resultRelInfo)
int ExecCleanTargetListLength(List *targetlist)
void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg)
Datum GetAttributeByName(HeapTupleHeader tuple, const char *attname, bool *isNull)
ExprContext * MakePerTupleExprContext(EState *estate)
Bitmapset * ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate)
static ExprContext * CreateExprContextInternal(EState *estate, Size minContextSize, Size initBlockSize, Size maxBlockSize)
Bitmapset * ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate)
Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags)
Oid ExecGetResultRelCheckAsUser(ResultRelInfo *relInfo, EState *estate)
void(* ExprContextCallbackFunction)(Datum arg)
#define outerPlanState(node)
static RangeTblEntry * exec_rt_fetch(Index rti, EState *estate)
#define EXEC_FLAG_WITH_NO_DATA
#define GetPerTupleMemoryContext(estate)
#define EXEC_FLAG_EXPLAIN_ONLY
static Datum heap_getattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
#define HeapTupleHeaderGetTypMod(tup)
#define HeapTupleHeaderGetTypeId(tup)
#define HeapTupleHeaderGetDatumLength(tup)
#define IsParallelWorker()
static void ItemPointerSetInvalid(ItemPointerData *pointer)
void jit_release_context(JitContext *context)
List * list_delete_ptr(List *list, void *datum)
List * lappend(List *list, void *datum)
bool list_member_int(const List *list, int datum)
List * lcons(void *datum, List *list)
bool CheckRelationLockedByMe(Relation relation, LOCKMODE lockmode, bool orstronger)
int pg_mbstrlen_with_len(const char *mbstr, int limit)
void MemoryContextReset(MemoryContext context)
void pfree(void *pointer)
void * palloc0(Size size)
MemoryContext CurrentMemoryContext
void * MemoryContextAlloc(MemoryContext context, Size size)
void MemoryContextDelete(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_MAXSIZE
#define ALLOCSET_DEFAULT_MINSIZE
#define ALLOCSET_DEFAULT_SIZES
#define ALLOCSET_DEFAULT_INITSIZE
int namestrcmp(Name name, const char *str)
void ExecInitStoredGenerated(ResultRelInfo *resultRelInfo, EState *estate, CmdType cmdtype)
#define IsA(nodeptr, _type_)
RTEPermissionInfo * getRTEPermissionInfo(List *rteperminfos, RangeTblEntry *rte)
void DestroyPartitionDirectory(PartitionDirectory pdir)
FormData_pg_attribute * Form_pg_attribute
#define lfirst_node(type, lc)
static int list_length(const List *l)
static ListCell * list_head(const List *l)
static ListCell * lnext(const List *l, const ListCell *c)
MemoryContextSwitchTo(old_ctx)
#define RelationGetRelid(relation)
#define RelationIsScannable(relation)
#define RelationGetDescr(relation)
#define RelationGetRelationName(relation)
struct ExecRowMark ** es_rowmarks
List * es_tuple_routing_result_relations
struct JitContext * es_jit
PlannedStmt * es_plannedstmt
QueryEnvironment * es_queryEnv
ResultRelInfo ** es_result_relations
ParamExecData * es_param_exec_vals
uint64 es_total_processed
ParamListInfo es_param_list_info
List * es_insert_pending_result_relations
MemoryContext es_query_cxt
ScanDirection es_direction
PartitionDirectory es_partition_directory
List * es_trig_target_relations
List * es_opened_result_relations
bool es_use_parallel_mode
ExprContext * es_per_tuple_exprcontext
Index es_range_table_size
List * es_insert_pending_modifytables
const char * es_sourceText
List * es_auxmodifytables
JunkFilter * es_junkFilter
Snapshot es_crosscheck_snapshot
struct ExprContext_CB * next
ExprContextCallbackFunction function
ParamListInfo ecxt_param_list_info
MemoryContext ecxt_per_tuple_memory
TupleTableSlot * ecxt_innertuple
ParamExecData * ecxt_param_exec_vals
TupleTableSlot * ecxt_scantuple
MemoryContext ecxt_per_query_memory
ExprContext_CB * ecxt_callbacks
struct EState * ecxt_estate
TupleTableSlot * ecxt_outertuple
const TupleTableSlotOps * resultops
const TupleTableSlotOps * scanops
TupleDesc ps_ResultTupleDesc
ExprContext * ps_ExprContext
TupleTableSlot * ps_ResultTupleSlot
ProjectionInfo * ps_ProjInfo
TupleConversionMap * ri_RootToChildMap
struct ResultRelInfo * ri_RootResultRelInfo
TupleTableSlot * ri_ReturningSlot
bool ri_RootToChildMapValid
Bitmapset * ri_extraUpdatedCols
TupleConversionMap * ri_ChildToRootMap
bool ri_ChildToRootMapValid
ExprState ** ri_GeneratedExprsU
TupleTableSlot * ri_TrigNewSlot
TupleTableSlot * ri_TrigOldSlot
TupleTableSlot * ss_ScanTupleSlot
const TupleTableSlotOps *const tts_ops
Relation table_open(Oid relationId, LOCKMODE lockmode)
const TupleTableSlotOps * table_slot_callbacks(Relation relation)
Bitmapset * execute_attr_map_cols(AttrMap *attrMap, Bitmapset *in_cols)
TupleConversionMap * convert_tuples_by_name_attrmap(TupleDesc indesc, TupleDesc outdesc, AttrMap *attrMap)
TupleConversionMap * convert_tuples_by_name(TupleDesc indesc, TupleDesc outdesc)
#define ReleaseTupleDesc(tupdesc)
#define TupleDescAttr(tupdesc, i)
TupleDesc lookup_rowtype_tupdesc(Oid type_id, int32 typmod)