PostgreSQL Source Code git master
|
#include "executor/execdesc.h"
#include "fmgr.h"
#include "nodes/lockoptions.h"
#include "nodes/parsenodes.h"
#include "utils/memutils.h"
#include "utils/plancache.h"
Go to the source code of this file.
Data Structures | |
struct | TupOutputState |
Macros | |
#define | EXEC_FLAG_EXPLAIN_ONLY 0x0001 /* EXPLAIN, no ANALYZE */ |
#define | EXEC_FLAG_EXPLAIN_GENERIC 0x0002 /* EXPLAIN (GENERIC_PLAN) */ |
#define | EXEC_FLAG_REWIND 0x0004 /* need efficient rescan */ |
#define | EXEC_FLAG_BACKWARD 0x0008 /* need backward scan */ |
#define | EXEC_FLAG_MARK 0x0010 /* need mark/restore */ |
#define | EXEC_FLAG_SKIP_TRIGGERS 0x0020 /* skip AfterTrigger setup */ |
#define | EXEC_FLAG_WITH_NO_DATA 0x0040 /* REFRESH ... WITH NO DATA */ |
#define | EvalPlanQualSetSlot(epqstate, slot) ((epqstate)->origslot = (slot)) |
#define | do_text_output_oneline(tstate, str_to_emit) |
#define | ResetExprContext(econtext) MemoryContextReset((econtext)->ecxt_per_tuple_memory) |
#define | GetPerTupleExprContext(estate) |
#define | GetPerTupleMemoryContext(estate) (GetPerTupleExprContext(estate)->ecxt_per_tuple_memory) |
#define | ResetPerTupleExprContext(estate) |
Typedefs | |
typedef bool(* | ExecutorStart_hook_type) (QueryDesc *queryDesc, int eflags) |
typedef void(* | ExecutorRun_hook_type) (QueryDesc *queryDesc, ScanDirection direction, uint64 count) |
typedef void(* | ExecutorFinish_hook_type) (QueryDesc *queryDesc) |
typedef void(* | ExecutorEnd_hook_type) (QueryDesc *queryDesc) |
typedef bool(* | ExecutorCheckPerms_hook_type) (List *rangeTable, List *rtePermInfos, bool ereport_on_violation) |
typedef TupleTableSlot *(* | ExecScanAccessMtd) (ScanState *node) |
typedef bool(* | ExecScanRecheckMtd) (ScanState *node, TupleTableSlot *slot) |
typedef struct TupOutputState | TupOutputState |
#define do_text_output_oneline | ( | tstate, | |
str_to_emit | |||
) |
Definition at line 609 of file executor.h.
#define EvalPlanQualSetSlot | ( | epqstate, | |
slot | |||
) | ((epqstate)->origslot = (slot)) |
Definition at line 246 of file executor.h.
#define EXEC_FLAG_BACKWARD 0x0008 /* need backward scan */ |
Definition at line 69 of file executor.h.
#define EXEC_FLAG_EXPLAIN_GENERIC 0x0002 /* EXPLAIN (GENERIC_PLAN) */ |
Definition at line 67 of file executor.h.
#define EXEC_FLAG_EXPLAIN_ONLY 0x0001 /* EXPLAIN, no ANALYZE */ |
Definition at line 66 of file executor.h.
#define EXEC_FLAG_MARK 0x0010 /* need mark/restore */ |
Definition at line 70 of file executor.h.
#define EXEC_FLAG_REWIND 0x0004 /* need efficient rescan */ |
Definition at line 68 of file executor.h.
Definition at line 71 of file executor.h.
#define EXEC_FLAG_WITH_NO_DATA 0x0040 /* REFRESH ... WITH NO DATA */ |
Definition at line 72 of file executor.h.
#define GetPerTupleExprContext | ( | estate | ) |
Definition at line 637 of file executor.h.
#define GetPerTupleMemoryContext | ( | estate | ) | (GetPerTupleExprContext(estate)->ecxt_per_tuple_memory) |
Definition at line 642 of file executor.h.
#define ResetExprContext | ( | econtext | ) | MemoryContextReset((econtext)->ecxt_per_tuple_memory) |
Definition at line 631 of file executor.h.
#define ResetPerTupleExprContext | ( | estate | ) |
Definition at line 646 of file executor.h.
typedef TupleTableSlot *(* ExecScanAccessMtd) (ScanState *node) |
Definition at line 560 of file executor.h.
typedef bool(* ExecScanRecheckMtd) (ScanState *node, TupleTableSlot *slot) |
Definition at line 561 of file executor.h.
typedef bool(* ExecutorCheckPerms_hook_type) (List *rangeTable, List *rtePermInfos, bool ereport_on_violation) |
Definition at line 94 of file executor.h.
typedef void(* ExecutorEnd_hook_type) (QueryDesc *queryDesc) |
Definition at line 90 of file executor.h.
typedef void(* ExecutorFinish_hook_type) (QueryDesc *queryDesc) |
Definition at line 86 of file executor.h.
typedef void(* ExecutorRun_hook_type) (QueryDesc *queryDesc, ScanDirection direction, uint64 count) |
Definition at line 80 of file executor.h.
typedef bool(* ExecutorStart_hook_type) (QueryDesc *queryDesc, int eflags) |
Definition at line 76 of file executor.h.
typedef struct TupOutputState TupOutputState |
TupOutputState * begin_tup_output_tupdesc | ( | DestReceiver * | dest, |
TupleDesc | tupdesc, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 2442 of file execTuples.c.
References CMD_SELECT, generate_unaccent_rules::dest, TupOutputState::dest, MakeSingleTupleTableSlot(), palloc(), _DestReceiver::rStartup, and TupOutputState::slot.
Referenced by CreateReplicationSlot(), ExecuteCallStmt(), ExplainQuery(), IdentifySystem(), ReadReplicationSlot(), SendTablespaceList(), SendXlogRecPtrResult(), ShowAllGUCConfig(), ShowGUCConfigOption(), and StartReplication().
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 at line 161 of file execGrouping.c.
References Assert(), CreateStandaloneExprContext(), CreateTupleDescCopy(), TupleHashTableData::cur_eq_func, ExecBuildGroupingEqual(), ExecBuildHash32FromAttrs(), TupleHashTableData::exprcontext, get_hash_memory_limit(), TupleHashTableData::hashtab, TupleHashTableData::in_hash_expr, TupleHashTableData::inputslot, TupleHashTableData::keyColIdx, MakeSingleTupleTableSlot(), MemoryContextSwitchTo(), murmurhash32(), TupleHashTableData::numCols, palloc(), ParallelWorkerNumber, TupleHashTableData::tab_collations, TupleHashTableData::tab_eq_func, TupleHashTableData::tab_hash_expr, TupleHashTableData::tablecxt, TupleHashTableData::tableslot, TupleHashTableData::tempcxt, and TTSOpsMinimalTuple.
Referenced by build_hash_table(), and buildSubPlanHash().
void check_exclusion_constraint | ( | Relation | heap, |
Relation | index, | ||
IndexInfo * | indexInfo, | ||
ItemPointer | tupleid, | ||
const Datum * | values, | ||
const bool * | isnull, | ||
EState * | estate, | ||
bool | newIndex | ||
) |
Definition at line 957 of file execIndexing.c.
References CEOUC_WAIT, check_exclusion_or_unique_constraint(), and values.
Referenced by IndexCheckExclusion().
Definition at line 729 of file execReplication.c.
References CMD_DELETE, CMD_UPDATE, PublicationDesc::cols_valid_for_delete, PublicationDesc::cols_valid_for_update, ereport, errcode(), errdetail(), errhint(), errmsg(), ERROR, PublicationDesc::gencols_valid_for_delete, PublicationDesc::gencols_valid_for_update, OidIsValid, PublicationDesc::pubactions, PublicationActions::pubdelete, PublicationActions::pubupdate, RelationData::rd_rel, RelationBuildPublicationDesc(), RelationGetRelationName, RelationGetReplicaIndex(), PublicationDesc::rf_valid_for_delete, and PublicationDesc::rf_valid_for_update.
Referenced by CheckValidResultRel(), ExecSimpleRelationDelete(), ExecSimpleRelationInsert(), and ExecSimpleRelationUpdate().
void CheckSubscriptionRelkind | ( | char | relkind, |
const char * | nspname, | ||
const char * | relname | ||
) |
Definition at line 839 of file execReplication.c.
References ereport, errcode(), errdetail_relkind_not_supported(), errmsg(), ERROR, and relname.
Referenced by AlterSubscription_refresh(), apply_handle_tuple_routing(), CreateSubscription(), and logicalrep_rel_open().
void CheckValidResultRel | ( | ResultRelInfo * | resultRelInfo, |
CmdType | operation, | ||
List * | mergeActions | ||
) |
Definition at line 1149 of file execMain.c.
References Assert(), CheckCmdReplicaIdentity(), CMD_DELETE, CMD_INSERT, CMD_UPDATE, elog, ereport, errcode(), errmsg(), ERROR, error_view_not_updatable(), FdwRoutine::ExecForeignDelete, FdwRoutine::ExecForeignInsert, FdwRoutine::ExecForeignUpdate, FdwRoutine::IsForeignRelUpdatable, IsInplaceUpdateRelation(), MatViewIncrementalMaintenanceIsEnabled(), RelationData::rd_rel, RelationGetRelationName, ResultRelInfo::ri_FdwRoutine, ResultRelInfo::ri_needLockTagTuple, ResultRelInfo::ri_RelationDesc, and view_has_instead_trigger().
Referenced by CopyFrom(), ExecFindPartition(), ExecInitModifyTable(), and ExecInitPartitionInfo().
EState * CreateExecutorState | ( | void | ) |
Definition at line 88 of file execUtils.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, CurrentMemoryContext, EState::es_aborted, EState::es_auxmodifytables, EState::es_crosscheck_snapshot, EState::es_direction, EState::es_exprcontexts, EState::es_finished, EState::es_insert_pending_modifytables, EState::es_insert_pending_result_relations, EState::es_instrument, EState::es_jit, EState::es_jit_flags, EState::es_junkFilter, EState::es_opened_result_relations, EState::es_output_cid, EState::es_parallel_workers_launched, EState::es_parallel_workers_to_launch, EState::es_param_exec_vals, EState::es_param_list_info, EState::es_part_prune_infos, EState::es_per_tuple_exprcontext, EState::es_plannedstmt, EState::es_processed, EState::es_query_cxt, EState::es_queryEnv, EState::es_range_table, EState::es_range_table_size, EState::es_relations, EState::es_result_relations, EState::es_rowmarks, EState::es_rteperminfos, EState::es_snapshot, EState::es_sourceText, EState::es_subplanstates, EState::es_top_eflags, EState::es_total_processed, EState::es_trig_target_relations, EState::es_tuple_routing_result_relations, EState::es_tupleTable, EState::es_use_parallel_mode, ForwardScanDirection, InvalidSnapshot, makeNode, MemoryContextSwitchTo(), and NIL.
Referenced by afterTriggerInvokeEvents(), ATExecAddColumn(), ATRewriteTable(), check_default_partition_contents(), compute_expr_stats(), compute_index_stats(), CopyFrom(), create_edata_for_relation(), create_estate_for_relation(), EvalPlanQualStart(), evaluate_expr(), ExecuteCallStmt(), ExecuteQuery(), ExecuteTruncateGuts(), ExplainExecuteQuery(), fileIterateForeignScan(), get_qual_for_range(), heapam_index_build_range_scan(), heapam_index_validate_scan(), IndexCheckExclusion(), make_build_data(), operator_predicate_proof(), plpgsql_create_econtext(), plpgsql_inline_handler(), standard_ExecutorStart(), tuplesort_begin_cluster(), and validateDomainCheckConstraint().
ExprContext * CreateExprContext | ( | EState * | estate | ) |
Definition at line 308 of file execUtils.c.
References ALLOCSET_DEFAULT_SIZES, and CreateExprContextInternal().
Referenced by CreatePartitionPruneState(), ExecAssignExprContext(), ExecInitMergeJoin(), ExecInitSubPlan(), ExecuteCallStmt(), MakePerTupleExprContext(), and plpgsql_create_econtext().
ExprContext * CreateStandaloneExprContext | ( | void | ) |
Definition at line 359 of file execUtils.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, ExprContext::caseValue_datum, ExprContext::caseValue_isNull, CurrentMemoryContext, ExprContext::domainValue_datum, ExprContext::domainValue_isNull, ExprContext::ecxt_aggnulls, ExprContext::ecxt_aggvalues, ExprContext::ecxt_callbacks, ExprContext::ecxt_estate, ExprContext::ecxt_innertuple, ExprContext::ecxt_outertuple, ExprContext::ecxt_param_exec_vals, ExprContext::ecxt_param_list_info, ExprContext::ecxt_per_query_memory, ExprContext::ecxt_per_tuple_memory, ExprContext::ecxt_scantuple, and makeNode.
Referenced by BuildTupleHashTable(), domain_check_input(), and hypothetical_dense_rank_final().
ExprContext * CreateWorkExprContext | ( | EState * | estate | ) |
Definition at line 323 of file execUtils.c.
References ALLOCSET_DEFAULT_INITSIZE, ALLOCSET_DEFAULT_MAXSIZE, ALLOCSET_DEFAULT_MINSIZE, CreateExprContextInternal(), and work_mem.
Referenced by ExecInitAgg().
void do_text_output_multiline | ( | TupOutputState * | tstate, |
const char * | txt | ||
) |
Definition at line 2490 of file execTuples.c.
References cstring_to_text_with_len(), DatumGetPointer(), do_tup_output(), len, pfree(), PointerGetDatum(), and values.
Referenced by ExplainQuery().
void do_tup_output | ( | TupOutputState * | tstate, |
const Datum * | values, | ||
const bool * | isnull | ||
) |
Definition at line 2462 of file execTuples.c.
References TupOutputState::dest, ExecClearTuple(), ExecStoreVirtualTuple(), TupleDescData::natts, _DestReceiver::receiveSlot, TupOutputState::slot, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, and values.
Referenced by CreateReplicationSlot(), do_text_output_multiline(), IdentifySystem(), ReadReplicationSlot(), SendTablespaceList(), SendXlogRecPtrResult(), ShowAllGUCConfig(), and StartReplication().
void end_tup_output | ( | TupOutputState * | tstate | ) |
Definition at line 2520 of file execTuples.c.
References TupOutputState::dest, ExecDropSingleTupleTableSlot(), pfree(), _DestReceiver::rShutdown, and TupOutputState::slot.
Referenced by CreateReplicationSlot(), ExecuteCallStmt(), ExplainQuery(), IdentifySystem(), ReadReplicationSlot(), SendTablespaceList(), SendXlogRecPtrResult(), ShowAllGUCConfig(), ShowGUCConfigOption(), and StartReplication().
TupleTableSlot * EvalPlanQual | ( | EPQState * | epqstate, |
Relation | relation, | ||
Index | rti, | ||
TupleTableSlot * | inputslot | ||
) |
Definition at line 2610 of file execMain.c.
References Assert(), EvalPlanQualBegin(), EvalPlanQualNext(), EvalPlanQualSlot(), ExecClearTuple(), ExecCopySlot(), ExecMaterializeSlot(), EPQState::relsubs_blocked, EPQState::relsubs_done, and TupIsNull.
Referenced by ExecDelete(), ExecMergeMatched(), ExecUpdate(), and GetTupleForTrigger().
void EvalPlanQualBegin | ( | EPQState * | epqstate | ) |
Definition at line 2893 of file execMain.c.
References bms_add_member(), PlanState::chgParam, EPQState::epqParam, EState::es_param_exec_vals, EState::es_plannedstmt, EState::es_range_table_size, EvalPlanQualStart(), ExecSetParamPlanMulti(), Plan::extParam, GetPerTupleExprContext, i, ParamExecData::isnull, list_length(), NIL, PlannedStmt::paramExecTypes, EPQState::parentestate, PlanState::plan, EPQState::plan, EPQState::recheckestate, EPQState::recheckplanstate, EPQState::relsubs_blocked, EPQState::relsubs_done, and ParamExecData::value.
Referenced by EvalPlanQual(), ExecDelete(), and ExecLockRows().
void EvalPlanQualEnd | ( | EPQState * | epqstate | ) |
Definition at line 3134 of file execMain.c.
References EState::es_query_cxt, EState::es_range_table_size, EState::es_subplanstates, EState::es_tupleTable, ExecCloseResultRelations(), ExecEndNode(), ExecResetTupleTable(), FreeExecutorState(), lfirst, MemoryContextSwitchTo(), NIL, EPQState::origslot, EPQState::parentestate, EPQState::recheckestate, EPQState::recheckplanstate, EPQState::relsubs_blocked, EPQState::relsubs_done, EPQState::relsubs_rowmark, EPQState::relsubs_slot, and EPQState::tuple_table.
Referenced by apply_handle_delete_internal(), apply_handle_tuple_routing(), apply_handle_update_internal(), EvalPlanQualSetPlan(), ExecEndLockRows(), ExecEndModifyTable(), and ExecLockRows().
bool EvalPlanQualFetchRowMark | ( | EPQState * | epqstate, |
Index | rti, | ||
TupleTableSlot * | slot | ||
) |
Definition at line 2766 of file execMain.c.
References Assert(), ExecAuxRowMark::ctidAttNo, DatumGetObjectId(), DatumGetPointer(), elog, ereport, errcode(), errmsg(), ERROR, ExecGetJunkAttribute(), ExecStoreHeapTupleDatum(), GetFdwRoutineForRelation(), ExecRowMark::markType, OidIsValid, EPQState::origslot, ExecRowMark::prti, RelationData::rd_rel, EPQState::recheckestate, FdwRoutine::RefetchForeignRow, ExecRowMark::relation, RelationGetRelationName, ExecRowMark::relid, EPQState::relsubs_rowmark, ROW_MARK_COPY, ROW_MARK_REFERENCE, ExecAuxRowMark::rowmark, RowMarkRequiresRowShareLock, ExecRowMark::rti, SnapshotAny, table_tuple_fetch_row_version(), ExecAuxRowMark::toidAttNo, TupIsNull, and ExecAuxRowMark::wholeAttNo.
Referenced by ExecScanFetch().
void EvalPlanQualInit | ( | EPQState * | epqstate, |
EState * | parentestate, | ||
Plan * | subplan, | ||
List * | auxrowmarks, | ||
int | epqParam, | ||
List * | resultRelations | ||
) |
Definition at line 2679 of file execMain.c.
References EPQState::arowMarks, EPQState::epqParam, EState::es_range_table_size, NIL, EPQState::origslot, palloc0(), EPQState::parentestate, EPQState::plan, EPQState::recheckestate, EPQState::recheckplanstate, EPQState::relsubs_blocked, EPQState::relsubs_done, EPQState::relsubs_rowmark, EPQState::relsubs_slot, EPQState::resultRelations, and EPQState::tuple_table.
Referenced by apply_handle_delete_internal(), apply_handle_tuple_routing(), apply_handle_update_internal(), ExecInitLockRows(), and ExecInitModifyTable().
TupleTableSlot * EvalPlanQualNext | ( | EPQState * | epqstate | ) |
Definition at line 2877 of file execMain.c.
References EState::es_query_cxt, ExecProcNode(), MemoryContextSwitchTo(), EPQState::recheckestate, and EPQState::recheckplanstate.
Referenced by EvalPlanQual(), and ExecLockRows().
Definition at line 2721 of file execMain.c.
References EPQState::arowMarks, EvalPlanQualEnd(), and EPQState::plan.
Referenced by ExecInitModifyTable().
TupleTableSlot * EvalPlanQualSlot | ( | EPQState * | epqstate, |
Relation | relation, | ||
Index | rti | ||
) |
Definition at line 2738 of file execMain.c.
References Assert(), EState::es_query_cxt, MemoryContextSwitchTo(), EPQState::parentestate, EPQState::relsubs_slot, table_slot_create(), and EPQState::tuple_table.
Referenced by EvalPlanQual(), ExecDelete(), ExecLockRows(), ExecMergeMatched(), and ExecUpdate().
|
inlinestatic |
Definition at line 678 of file executor.h.
References EState::es_range_table, and list_nth().
Referenced by conversion_error_callback(), ExecDoInitialPruning(), ExecEvalWholeRowVar(), ExecGetRangeTableRelation(), ExecInitBitmapIndexScan(), ExecInitIndexOnlyScan(), ExecInitIndexScan(), GetResultRTEPermissionInfo(), InitPlan(), postgresBeginForeignInsert(), postgresBeginForeignModify(), and postgresBeginForeignScan().
Definition at line 487 of file execUtils.c.
References CreateExprContext(), and PlanState::ps_ExprContext.
Referenced by ExecInitAgg(), ExecInitBitmapHeapScan(), ExecInitBitmapIndexScan(), ExecInitCteScan(), ExecInitCustomScan(), ExecInitForeignScan(), ExecInitFunctionScan(), ExecInitGather(), ExecInitGatherMerge(), ExecInitGroup(), ExecInitHash(), ExecInitHashJoin(), ExecInitIndexOnlyScan(), ExecInitIndexScan(), ExecInitInsertProjection(), ExecInitLimit(), ExecInitMemoize(), ExecInitMerge(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitNamedTuplestoreScan(), ExecInitNestLoop(), ExecInitProjectSet(), ExecInitResult(), ExecInitSampleScan(), ExecInitSeqScan(), ExecInitSetOp(), ExecInitSubqueryScan(), ExecInitTableFuncScan(), ExecInitTidRangeScan(), ExecInitTidScan(), ExecInitUnique(), ExecInitUpdateProjection(), ExecInitValuesScan(), ExecInitWindowAgg(), and ExecInitWorkTableScan().
Definition at line 585 of file execUtils.c.
References ExecBuildProjectionInfo(), PlanState::plan, PlanState::ps_ExprContext, PlanState::ps_ProjInfo, PlanState::ps_ResultTupleSlot, and Plan::targetlist.
Referenced by ExecConditionalAssignProjectionInfo(), ExecInitAgg(), ExecInitGroup(), ExecInitHashJoin(), ExecInitMergeJoin(), ExecInitNestLoop(), ExecInitResult(), and ExecInitWindowAgg().
void ExecAssignScanProjectionInfo | ( | ScanState * | node | ) |
Definition at line 81 of file execScan.c.
References ExecConditionalAssignProjectionInfo(), PlanState::plan, ScanState::ps, Scan::scanrelid, ScanState::ss_ScanTupleSlot, and TupleTableSlot::tts_tupleDescriptor.
Referenced by ExecInitBitmapHeapScan(), ExecInitCteScan(), ExecInitFunctionScan(), ExecInitIndexScan(), ExecInitNamedTuplestoreScan(), ExecInitSampleScan(), ExecInitSeqScan(), ExecInitSubqueryScan(), ExecInitTableFuncScan(), ExecInitTidRangeScan(), ExecInitTidScan(), ExecInitValuesScan(), and ExecWorkTableScan().
void ExecAssignScanProjectionInfoWithVarno | ( | ScanState * | node, |
int | varno | ||
) |
Definition at line 94 of file execScan.c.
References ExecConditionalAssignProjectionInfo(), ScanState::ps, ScanState::ss_ScanTupleSlot, and TupleTableSlot::tts_tupleDescriptor.
Referenced by ExecInitCustomScan(), ExecInitForeignScan(), and ExecInitIndexOnlyScan().
Definition at line 694 of file execUtils.c.
References ExecSetSlotDescriptor(), and ScanState::ss_ScanTupleSlot.
Referenced by ExecWorkTableScan().
ExprState * ExecBuildAggTrans | ( | AggState * | aggstate, |
struct AggStatePerPhaseData * | phase, | ||
bool | doSort, | ||
bool | doHash, | ||
bool | nullcheck | ||
) |
ExecAuxRowMark * ExecBuildAuxRowMark | ( | ExecRowMark * | erm, |
List * | targetlist | ||
) |
Definition at line 2540 of file execMain.c.
References AttributeNumberIsValid, ExecAuxRowMark::ctidAttNo, elog, ERROR, ExecFindJunkAttributeInTlist(), ExecRowMark::markType, palloc0(), ExecRowMark::prti, ROW_MARK_COPY, ExecAuxRowMark::rowmark, ExecRowMark::rowmarkId, ExecRowMark::rti, snprintf, ExecAuxRowMark::toidAttNo, and ExecAuxRowMark::wholeAttNo.
Referenced by ExecInitLockRows(), and ExecInitModifyTable().
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 at line 4465 of file execExpr.c.
References ACL_EXECUTE, aclcheck_error(), ACLCHECK_OK, FunctionCallInfoBaseData::args, Assert(), ExprEvalStep::attnum, collid, ExprEvalStep::d, EEO_FLAG_IS_QUAL, EEOP_DONE_RETURN, EEOP_INNER_FETCHSOME, EEOP_INNER_VAR, EEOP_NOT_DISTINCT, EEOP_OUTER_FETCHSOME, EEOP_OUTER_VAR, EEOP_QUAL, ExecComputeSlotInfo(), ExecReadyExpr(), ExprEvalPushStep(), ExprEvalStep::fcinfo_data, ExprEvalStep::fetch, ExprEvalStep::finfo, ExprEvalStep::fixed, fmgr_info(), fmgr_info_set_expr, ExprEvalStep::fn_addr, FmgrInfo::fn_addr, ExprEvalStep::func, get_func_name(), GetUserId(), InitFunctionCallInfoData, InvokeFunctionExecuteHook, NullableDatum::isnull, ExprEvalStep::jumpdone, ExprEvalStep::kind, ExprEvalStep::known_desc, lappend_int(), ExprEvalStep::last_var, lfirst_int, makeNode, ExprEvalStep::nargs, NIL, object_aclcheck(), OBJECT_FUNCTION, ExprEvalStep::opcode, palloc0(), ExprEvalStep::qualexpr, ExprEvalStep::resnull, ExprEvalStep::resvalue, SizeForFunctionCallInfo, TupleDescAttr(), NullableDatum::value, ExprEvalStep::var, VAR_RETURNING_DEFAULT, ExprEvalStep::varreturningtype, and ExprEvalStep::vartype.
Referenced by BuildTupleHashTable(), ExecInitSubPlan(), and execTuplesMatchPrepare().
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 at line 4300 of file execExpr.c.
References FunctionCallInfoBaseData::args, Assert(), ExprEvalStep::d, EEOP_DONE_RETURN, EEOP_HASHDATUM_FIRST, EEOP_HASHDATUM_FIRST_STRICT, EEOP_HASHDATUM_NEXT32, EEOP_HASHDATUM_NEXT32_STRICT, EEOP_HASHDATUM_SET_INITVAL, ExecCreateExprSetupSteps(), ExecInitExprRec(), ExecReadyExpr(), ExprEvalPushStep(), ExprEvalStep::fcinfo_data, ExprEvalStep::finfo, fmgr_info(), ExprEvalStep::fn_addr, FmgrInfo::fn_addr, forboth, foreach_current_index, ExprEvalStep::hashdatum, ExprEvalStep::hashdatum_initvalue, i, ExprEvalStep::init_value, InitFunctionCallInfoData, ExprEvalStep::iresult, NullableDatum::isnull, ExprEvalStep::jumpdone, lappend_int(), lfirst, lfirst_int, lfirst_oid, list_length(), makeNode, NIL, ExprEvalStep::opcode, palloc(), palloc0(), ExprEvalStep::resnull, ExprEvalStep::resvalue, SizeForFunctionCallInfo, UInt32GetDatum(), and NullableDatum::value.
Referenced by ExecInitHashJoin().
ExprState * ExecBuildHash32FromAttrs | ( | TupleDesc | desc, |
const TupleTableSlotOps * | ops, | ||
FmgrInfo * | hashfunctions, | ||
Oid * | collations, | ||
int | numCols, | ||
AttrNumber * | keyColIdx, | ||
PlanState * | parent, | ||
uint32 | init_value | ||
) |
Definition at line 4141 of file execExpr.c.
References FunctionCallInfoBaseData::args, Assert(), attnum, ExprEvalStep::attnum, ExprEvalStep::d, EEOP_DONE_RETURN, EEOP_HASHDATUM_FIRST, EEOP_HASHDATUM_NEXT32, EEOP_HASHDATUM_SET_INITVAL, EEOP_INNER_FETCHSOME, EEOP_INNER_VAR, ExecComputeSlotInfo(), ExecReadyExpr(), ExprEvalPushStep(), ExprEvalStep::fcinfo_data, ExprEvalStep::fetch, ExprEvalStep::finfo, ExprEvalStep::fixed, ExprEvalStep::fn_addr, FmgrInfo::fn_addr, ExprEvalStep::hashdatum, ExprEvalStep::hashdatum_initvalue, i, ExprEvalStep::init_value, InitFunctionCallInfoData, ExprEvalStep::iresult, NullableDatum::isnull, ExprEvalStep::jumpdone, ExprEvalStep::kind, ExprEvalStep::known_desc, ExprEvalStep::last_var, makeNode, Max, ExprEvalStep::opcode, palloc(), palloc0(), ExprEvalStep::resnull, ExprEvalStep::resvalue, SizeForFunctionCallInfo, TupleDescAttr(), UInt32GetDatum(), NullableDatum::value, ExprEvalStep::var, VAR_RETURNING_DEFAULT, ExprEvalStep::varreturningtype, and ExprEvalStep::vartype.
Referenced by BuildTupleHashTable(), and ExecInitSubPlan().
ExprState * ExecBuildParamSetEqual | ( | TupleDesc | desc, |
const TupleTableSlotOps * | lops, | ||
const TupleTableSlotOps * | rops, | ||
const Oid * | eqfunctions, | ||
const Oid * | collations, | ||
const List * | param_exprs, | ||
PlanState * | parent | ||
) |
Definition at line 4624 of file execExpr.c.
References ACL_EXECUTE, aclcheck_error(), ACLCHECK_OK, FunctionCallInfoBaseData::args, Assert(), ExprEvalStep::attnum, collid, ExprEvalStep::d, EEO_FLAG_IS_QUAL, EEOP_DONE_RETURN, EEOP_INNER_FETCHSOME, EEOP_INNER_VAR, EEOP_NOT_DISTINCT, EEOP_OUTER_FETCHSOME, EEOP_OUTER_VAR, EEOP_QUAL, ExecComputeSlotInfo(), ExecReadyExpr(), ExprEvalPushStep(), ExprEvalStep::fcinfo_data, ExprEvalStep::fetch, ExprEvalStep::finfo, ExprEvalStep::fixed, fmgr_info(), fmgr_info_set_expr, ExprEvalStep::fn_addr, FmgrInfo::fn_addr, ExprEvalStep::func, get_func_name(), GetUserId(), InitFunctionCallInfoData, InvokeFunctionExecuteHook, NullableDatum::isnull, ExprEvalStep::jumpdone, ExprEvalStep::kind, ExprEvalStep::known_desc, lappend_int(), ExprEvalStep::last_var, lfirst_int, list_length(), makeNode, ExprEvalStep::nargs, NIL, object_aclcheck(), OBJECT_FUNCTION, ExprEvalStep::opcode, palloc0(), ExprEvalStep::qualexpr, ExprEvalStep::resnull, ExprEvalStep::resvalue, SizeForFunctionCallInfo, TupleDescAttr(), NullableDatum::value, ExprEvalStep::var, VAR_RETURNING_DEFAULT, ExprEvalStep::varreturningtype, and ExprEvalStep::vartype.
Referenced by ExecInitMemoize().
ProjectionInfo * ExecBuildProjectionInfo | ( | List * | targetList, |
ExprContext * | econtext, | ||
TupleTableSlot * | slot, | ||
PlanState * | parent, | ||
TupleDesc | inputDesc | ||
) |
Definition at line 370 of file execExpr.c.
References ExprEvalStep::assign_tmp, ExprEvalStep::assign_var, attnum, ExprEvalStep::attnum, ExprEvalStep::d, EEO_FLAG_HAS_NEW, EEO_FLAG_HAS_OLD, EEOP_ASSIGN_INNER_VAR, EEOP_ASSIGN_NEW_VAR, EEOP_ASSIGN_OLD_VAR, EEOP_ASSIGN_OUTER_VAR, EEOP_ASSIGN_SCAN_VAR, EEOP_ASSIGN_TMP, EEOP_ASSIGN_TMP_MAKE_RO, EEOP_DONE_NO_RETURN, ExecCreateExprSetupSteps(), ExecInitExprRec(), ExecReadyExpr(), TargetEntry::expr, ExprEvalPushStep(), exprType(), get_typlen(), if(), INNER_VAR, IsA, lfirst_node, makeNode, ExprEvalStep::opcode, OUTER_VAR, ProjectionInfo::pi_exprContext, ProjectionInfo::pi_state, TargetEntry::resno, ExprEvalStep::resultnum, TupleDescAttr(), ExprState::type, VAR_RETURNING_DEFAULT, VAR_RETURNING_NEW, and VAR_RETURNING_OLD.
Referenced by ExecAssignProjectionInfo(), ExecInitInsertProjection(), ExecInitMerge(), ExecInitModifyTable(), ExecInitPartitionInfo(), and ExecInitSubPlan().
char * ExecBuildSlotValueDescription | ( | Oid | reloid, |
TupleTableSlot * | slot, | ||
TupleDesc | tupdesc, | ||
Bitmapset * | modifiedCols, | ||
int | maxfieldlen | ||
) |
Definition at line 2352 of file execMain.c.
References ACL_SELECT, ACLCHECK_OK, appendBinaryStringInfo(), appendStringInfoChar(), appendStringInfoString(), bms_is_member(), buf, check_enable_rls(), StringInfoData::data, FirstLowInvalidHeapAttributeNumber, getTypeOutputInfo(), GetUserId(), i, initStringInfo(), InvalidOid, NameStr, TupleDescData::natts, OidOutputFunctionCall(), pg_attribute_aclcheck(), pg_class_aclcheck(), pg_mbcliplen(), RLS_ENABLED, slot_getallattrs(), TupleTableSlot::tts_isnull, TupleTableSlot::tts_values, TupleDescAttr(), and val.
Referenced by build_tuple_value_details(), ExecConstraints(), ExecPartitionCheckEmitError(), and ExecWithCheckOptions().
ProjectionInfo * ExecBuildUpdateProjection | ( | List * | targetList, |
bool | evalTargetList, | ||
List * | targetColnos, | ||
TupleDesc | relDesc, | ||
ExprContext * | econtext, | ||
TupleTableSlot * | slot, | ||
PlanState * | parent | ||
) |
Definition at line 547 of file execExpr.c.
References Assert(), ExprEvalStep::assign_tmp, ExprEvalStep::assign_var, CompactAttribute::attisdropped, attnum, ExprEvalStep::attnum, bms_add_member(), bms_is_member(), ExprEvalStep::constval, ExprEvalStep::d, EEOP_ASSIGN_OUTER_VAR, EEOP_ASSIGN_SCAN_VAR, EEOP_ASSIGN_TMP, EEOP_CONST, EEOP_DONE_NO_RETURN, elog, ereport, errcode(), errdetail(), errmsg(), ERROR, ExecInitExprRec(), ExecPushExprSetupSteps(), ExecReadyExpr(), TargetEntry::expr, expr_setup_walker(), ExprEvalPushStep(), exprType(), forboth, format_type_be(), ExprEvalStep::isnull, ExprSetupInfo::last_outer, ExprSetupInfo::last_scan, lfirst_int, lfirst_node, list_length(), makeNode, TupleDescData::natts, NIL, ExprEvalStep::opcode, ProjectionInfo::pi_exprContext, ProjectionInfo::pi_state, ExprEvalStep::resnull, ExprEvalStep::resultnum, ExprEvalStep::resvalue, TupleDescAttr(), TupleDescCompactAttr(), ExprState::type, and ExprEvalStep::value.
Referenced by ExecInitMerge(), ExecInitModifyTable(), ExecInitPartitionInfo(), and ExecInitUpdateProjection().
bool ExecCheck | ( | ExprState * | state, |
ExprContext * | econtext | ||
) |
Definition at line 872 of file execExpr.c.
References Assert(), DatumGetBool(), EEO_FLAG_IS_QUAL, and ExecEvalExprSwitchContext().
Referenced by ATRewriteTable(), check_default_partition_contents(), domain_check_input(), ExecPartitionCheck(), and ExecRelCheck().
bool ExecCheckIndexConstraints | ( | ResultRelInfo * | resultRelInfo, |
TupleTableSlot * | slot, | ||
EState * | estate, | ||
ItemPointer | conflictTid, | ||
ItemPointer | tupleid, | ||
List * | arbiterIndexes | ||
) |
Definition at line 543 of file execIndexing.c.
References CEOUC_WAIT, check_exclusion_or_unique_constraint(), ExprContext::ecxt_scantuple, elog, ereport, errcode(), errmsg(), ERROR, errtableconstraint(), ExecPrepareQual(), ExecQual(), FormIndexDatum(), GetPerTupleExprContext, i, IndexInfo::ii_ExclusionOps, IndexInfo::ii_Predicate, IndexInfo::ii_PredicateState, IndexInfo::ii_ReadyForInserts, IndexInfo::ii_Unique, INDEX_MAX_KEYS, ItemPointerSetInvalid(), list_member_oid(), NIL, RelationData::rd_index, RelationGetRelationName, ResultRelInfo::ri_IndexRelationDescs, ResultRelInfo::ri_IndexRelationInfo, ResultRelInfo::ri_NumIndices, ResultRelInfo::ri_RelationDesc, and values.
Referenced by ExecInsert(), and FindConflictTuple().
Definition at line 658 of file execMain.c.
References AccessShareLock, aclcheck_error(), ACLCHECK_NO_PRIV, Assert(), bms_add_member(), bms_is_member(), bms_num_members(), CheckRelationOidLockedByMe(), ExecCheckOneRelPerms(), ExecutorCheckPerms_hook, get_rel_name(), get_rel_relkind(), get_relkind_objtype(), getRTEPermissionInfo(), IsParallelWorker, lfirst_node, list_length(), OidIsValid, RangeTblEntry::relid, RTEPermissionInfo::relid, RTE_RELATION, RTE_SUBQUERY, and RangeTblEntry::rtekind.
Referenced by DoCopy(), InitPlan(), and RI_Initial_Check().
int ExecCleanTargetListLength | ( | List * | targetlist | ) |
Definition at line 1187 of file execUtils.c.
References len, and lfirst_node.
Referenced by ApplyRetrieveRule(), check_sql_fn_retval(), and ExecTypeFromTLInternal().
Definition at line 2137 of file execTuples.c.
References ExecTypeFromTLInternal().
Referenced by ExecInitJunkFilter(), PlanCacheComputeResultDesc(), and PortalStart().
void ExecCloseIndices | ( | ResultRelInfo * | resultRelInfo | ) |
Definition at line 239 of file execIndexing.c.
References Assert(), i, index_close(), index_insert_cleanup(), ResultRelInfo::ri_IndexRelationDescs, ResultRelInfo::ri_IndexRelationInfo, ResultRelInfo::ri_NumIndices, and RowExclusiveLock.
Referenced by apply_handle_delete(), apply_handle_insert(), apply_handle_update_internal(), CatalogCloseIndexes(), ExecCleanupTupleRouting(), and ExecCloseResultRelations().
void ExecCloseRangeTableRelations | ( | EState * | estate | ) |
Definition at line 1707 of file execMain.c.
References EState::es_range_table_size, EState::es_relations, i, NoLock, and table_close().
Referenced by CopyFrom(), and ExecEndPlan().
void ExecCloseResultRelations | ( | EState * | estate | ) |
Definition at line 1647 of file execMain.c.
References Assert(), EState::es_opened_result_relations, EState::es_trig_target_relations, ExecCloseIndices(), lfirst, NoLock, ResultRelInfo::ri_ancestorResultRels, ResultRelInfo::ri_NumIndices, ResultRelInfo::ri_RangeTableIndex, ResultRelInfo::ri_RelationDesc, and table_close().
Referenced by afterTriggerInvokeEvents(), CopyFrom(), EvalPlanQualEnd(), and ExecEndPlan().
Definition at line 605 of file execUtils.c.
References ExecAssignProjectionInfo(), ExecInitResultSlot(), PlanState::plan, PlanState::ps_ProjInfo, PlanState::ps_ResultTupleSlot, PlanState::resultops, PlanState::resultopsfixed, PlanState::resultopsset, PlanState::scanops, PlanState::scanopsfixed, PlanState::scanopsset, Plan::targetlist, tlist_matches_tupdesc(), and TTSOpsVirtual.
Referenced by ExecAssignScanProjectionInfo(), ExecAssignScanProjectionInfoWithVarno(), ExecInitGather(), and ExecInitGatherMerge().
void ExecConstraints | ( | ResultRelInfo * | resultRelInfo, |
TupleTableSlot * | slot, | ||
EState * | estate | ||
) |
Definition at line 2054 of file execMain.c.
References Assert(), bms_union(), build_attrmap_by_name_if_req(), TupleDescData::constr, ereport, errcode(), errdetail(), errmsg(), ERROR, errtablecol(), errtableconstraint(), ExecBuildSlotValueDescription(), ExecGetInsertedCols(), ExecGetUpdatedCols(), ExecRelCheck(), execute_attr_map_slot(), TupleConstr::has_not_null, MakeTupleTableSlot(), NameStr, TupleDescData::natts, RelationData::rd_rel, RelationGetDescr, RelationGetRelationName, RelationGetRelid, ResultRelInfo::ri_RelationDesc, ResultRelInfo::ri_RootResultRelInfo, slot_attisnull(), TTSOpsVirtual, and TupleDescAttr().
Referenced by CopyFrom(), ExecInsert(), ExecSimpleRelationInsert(), ExecSimpleRelationUpdate(), and ExecUpdateAct().
void ExecCreateScanSlotFromOuterPlan | ( | EState * | estate, |
ScanState * | scanstate, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 706 of file execUtils.c.
References ExecGetResultType(), ExecInitScanTupleSlot(), outerPlan, and outerPlanState.
Referenced by ExecInitAgg(), ExecInitGroup(), ExecInitIncrementalSort(), ExecInitMaterial(), ExecInitMemoize(), ExecInitSort(), and ExecInitWindowAgg().
bool execCurrentOf | ( | CurrentOfExpr * | cexpr, |
ExprContext * | econtext, | ||
Oid | table_oid, | ||
ItemPointer | current_tid | ||
) |
Definition at line 44 of file execCurrent.c.
References Assert(), PortalData::atEnd, PortalData::atStart, ExecRowMark::curCtid, CurrentOfExpr::cursor_name, CurrentOfExpr::cursor_param, DatumGetObjectId(), DatumGetPointer(), elog, ereport, errcode(), errmsg(), ERROR, EState::es_range_table_size, EState::es_rowmarks, QueryDesc::estate, fetch_cursor_param_value(), get_rel_name(), GetPortalByName(), i, IsA, ItemPointerIsValid(), ExecRowMark::markType, QueryDesc::planstate, PORTAL_ONE_SELECT, PortalIsValid, PortalData::queryDesc, ExecRowMark::relid, RowMarkRequiresRowShareLock, search_plan_tree(), SelfItemPointerAttributeNumber, slot_getsysattr(), ScanState::ss_ScanTupleSlot, PortalData::strategy, TableOidAttributeNumber, TupIsNull, and IndexScanDescData::xs_heaptid.
Referenced by TidListEval().
void ExecEndNode | ( | PlanState * | node | ) |
Definition at line 562 of file execProcnode.c.
References bms_free(), check_stack_depth(), PlanState::chgParam, elog, ERROR, ExecEndAgg(), ExecEndAppend(), ExecEndBitmapAnd(), ExecEndBitmapHeapScan(), ExecEndBitmapIndexScan(), ExecEndBitmapOr(), ExecEndCteScan(), ExecEndCustomScan(), ExecEndForeignScan(), ExecEndFunctionScan(), ExecEndGather(), ExecEndGatherMerge(), ExecEndGroup(), ExecEndHash(), ExecEndHashJoin(), ExecEndIncrementalSort(), ExecEndIndexOnlyScan(), ExecEndIndexScan(), ExecEndLimit(), ExecEndLockRows(), ExecEndMaterial(), ExecEndMemoize(), ExecEndMergeAppend(), ExecEndMergeJoin(), ExecEndModifyTable(), ExecEndNestLoop(), ExecEndProjectSet(), ExecEndRecursiveUnion(), ExecEndResult(), ExecEndSampleScan(), ExecEndSeqScan(), ExecEndSetOp(), ExecEndSort(), ExecEndSubqueryScan(), ExecEndTableFuncScan(), ExecEndTidRangeScan(), ExecEndTidScan(), ExecEndUnique(), ExecEndWindowAgg(), and nodeTag.
Referenced by EvalPlanQualEnd(), ExecEndAgg(), ExecEndAppend(), ExecEndBitmapAnd(), ExecEndBitmapHeapScan(), ExecEndBitmapOr(), ExecEndForeignScan(), ExecEndGather(), ExecEndGatherMerge(), ExecEndGroup(), ExecEndHash(), ExecEndHashJoin(), ExecEndIncrementalSort(), ExecEndLimit(), ExecEndLockRows(), ExecEndMaterial(), ExecEndMemoize(), ExecEndMergeAppend(), ExecEndMergeJoin(), ExecEndModifyTable(), ExecEndNestLoop(), ExecEndPlan(), ExecEndProjectSet(), ExecEndRecursiveUnion(), ExecEndResult(), ExecEndSetOp(), ExecEndSort(), ExecEndSubqueryScan(), ExecEndUnique(), and ExecEndWindowAgg().
|
inlinestatic |
Definition at line 374 of file executor.h.
Referenced by advance_windowaggregate(), advance_windowaggregate_base(), array_map(), ATExecAddColumn(), ATRewriteTable(), CopyFromTextLikeOneRow(), do_cast_value(), EvalOrderByExpressions(), exec_eval_simple_expr(), ExecComputeStoredGenerated(), ExecEvalFuncArgs(), ExecIndexEvalArrayKeys(), ExecIndexEvalRuntimeKeys(), ExecMakeTableFunctionResult(), ExecProjectSRF(), finalize_aggregate(), JsonTableGetValue(), JsonTableInitOpaque(), make_build_data(), MJEvalInnerValues(), MJEvalOuterValues(), NextCopyFrom(), prepare_probe_slot(), process_query_params(), slot_fill_defaults(), tfuncFetchRows(), tfuncInitialize(), tfuncLoadRows(), TupleHashTableHash_internal(), ValuesNext(), WinGetFuncArgCurrent(), WinGetFuncArgInFrame(), and WinGetFuncArgInPartition().
|
inlinestatic |
Definition at line 399 of file executor.h.
References Assert(), and PG_USED_FOR_ASSERTS_ONLY.
Referenced by ExecEvalExprNoReturnSwitchContext().
|
inlinestatic |
Definition at line 439 of file executor.h.
References ExprContext::ecxt_per_tuple_memory, ExecEvalExprNoReturn(), and MemoryContextSwitchTo().
Referenced by advance_aggregates(), and ExecProject().
|
inlinestatic |
Definition at line 417 of file executor.h.
References ExprContext::ecxt_per_tuple_memory, and MemoryContextSwitchTo().
Referenced by calculate_frame_offsets(), compute_expr_stats(), evaluate_expr(), EvaluateParams(), ExecCheck(), ExecHashJoinOuterGetTuple(), ExecParallelHashJoinOuterGetTuple(), ExecParallelHashJoinPartitionOuter(), ExecQual(), ExecScanSubPlan(), ExecuteCallStmt(), FormIndexDatum(), FormPartitionKeyDatum(), get_qual_for_range(), MultiExecParallelHash(), MultiExecPrivateHash(), operator_predicate_proof(), partkey_datum_from_expr(), pgoutput_row_filter_exec_expr(), recompute_limits(), tablesample_init(), TidListEval(), TidRangeEval(), and validateDomainCheckConstraint().
TupleTableSlot * ExecFilterJunk | ( | JunkFilter * | junkfilter, |
TupleTableSlot * | slot | ||
) |
Definition at line 247 of file execJunk.c.
References ExecClearTuple(), ExecStoreVirtualTuple(), i, j, JunkFilter::jf_cleanMap, JunkFilter::jf_cleanTupType, JunkFilter::jf_resultSlot, TupleDescData::natts, slot_getallattrs(), TupleTableSlot::tts_isnull, TupleTableSlot::tts_values, and values.
Referenced by ExecEvalWholeRowVar(), ExecutePlan(), and sqlfunction_receive().
AttrNumber ExecFindJunkAttribute | ( | JunkFilter * | junkfilter, |
const char * | attrName | ||
) |
Definition at line 210 of file execJunk.c.
References ExecFindJunkAttributeInTlist(), and JunkFilter::jf_targetList.
AttrNumber ExecFindJunkAttributeInTlist | ( | List * | targetlist, |
const char * | attrName | ||
) |
Definition at line 222 of file execJunk.c.
References InvalidAttrNumber, lfirst, and TargetEntry::resno.
Referenced by create_foreign_modify(), ExecBuildAuxRowMark(), ExecFindJunkAttribute(), and ExecInitModifyTable().
ExecRowMark * ExecFindRowMark | ( | EState * | estate, |
Index | rti, | ||
bool | missing_ok | ||
) |
Definition at line 2517 of file execMain.c.
References elog, ERROR, and EState::es_rowmarks.
Referenced by ExecInitLockRows(), and ExecInitModifyTable().
TupleTableSlot * ExecGetAllNullSlot | ( | EState * | estate, |
ResultRelInfo * | relInfo | ||
) |
Definition at line 1275 of file execUtils.c.
References EState::es_query_cxt, ExecInitExtraTupleSlot(), ExecStoreAllNullTuple(), MemoryContextSwitchTo(), RelationGetDescr, ResultRelInfo::ri_AllNullSlot, ResultRelInfo::ri_RelationDesc, and table_slot_callbacks().
Referenced by ExecProcessReturning().
Bitmapset * ExecGetAllUpdatedCols | ( | ResultRelInfo * | relinfo, |
EState * | estate | ||
) |
Definition at line 1420 of file execUtils.c.
References bms_union(), ExecGetExtraUpdatedCols(), ExecGetUpdatedCols(), GetPerTupleMemoryContext, and MemoryContextSwitchTo().
Referenced by ExecARUpdateTriggers(), ExecASUpdateTriggers(), ExecBRUpdateTriggers(), ExecBSUpdateTriggers(), and ExecUpdateLockMode().
List * ExecGetAncestorResultRels | ( | EState * | estate, |
ResultRelInfo * | resultRelInfo | ||
) |
Definition at line 1502 of file execMain.c.
References Assert(), elog, ERROR, EState::es_instrument, get_partition_ancestors(), InitResultRelInfo(), lappend(), lfirst_oid, makeNode, NIL, NoLock, RelationData::rd_rel, RelationGetRelid, ResultRelInfo::ri_ancestorResultRels, ResultRelInfo::ri_RelationDesc, ResultRelInfo::ri_RootResultRelInfo, and table_open().
Referenced by ExecCrossPartitionUpdateForeignKey().
TupleConversionMap * ExecGetChildToRootMap | ( | ResultRelInfo * | resultRelInfo | ) |
Definition at line 1302 of file execUtils.c.
References convert_tuples_by_name(), RelationGetDescr, ResultRelInfo::ri_ChildToRootMap, ResultRelInfo::ri_ChildToRootMapValid, ResultRelInfo::ri_RelationDesc, and ResultRelInfo::ri_RootResultRelInfo.
Referenced by adjust_partition_colnos(), AfterTriggerExecute(), AfterTriggerSaveEvent(), ExecCrossPartitionUpdate(), ExecDelete(), and TransitionTableAddTuple().
const TupleTableSlotOps * ExecGetCommonChildSlotOps | ( | PlanState * | ps | ) |
Definition at line 565 of file execUtils.c.
References ExecGetCommonSlotOps(), innerPlanState, outerPlanState, and ps.
Referenced by build_hash_table().
const TupleTableSlotOps * ExecGetCommonSlotOps | ( | PlanState ** | planstates, |
int | nplans | ||
) |
Definition at line 538 of file execUtils.c.
References ExecGetResultSlotOps(), and i.
Referenced by ExecGetCommonChildSlotOps(), ExecInitAppend(), and ExecInitMergeAppend().
Bitmapset * ExecGetExtraUpdatedCols | ( | ResultRelInfo * | relinfo, |
EState * | estate | ||
) |
Definition at line 1405 of file execUtils.c.
References CMD_UPDATE, ExecInitGenerated(), ResultRelInfo::ri_extraUpdatedCols, and ResultRelInfo::ri_extraUpdatedCols_valid.
Referenced by ExecGetAllUpdatedCols(), and index_unchanged_by_update().
Bitmapset * ExecGetInsertedCols | ( | ResultRelInfo * | relinfo, |
EState * | estate | ||
) |
Definition at line 1363 of file execUtils.c.
References TupleConversionMap::attrMap, ExecGetRootToChildMap(), execute_attr_map_cols(), GetResultRTEPermissionInfo(), RTEPermissionInfo::insertedCols, and ResultRelInfo::ri_RootResultRelInfo.
Referenced by build_tuple_value_details(), ExecConstraints(), ExecPartitionCheckEmitError(), and ExecWithCheckOptions().
|
inlinestatic |
Definition at line 185 of file executor.h.
References Assert(), and slot_getattr().
Referenced by EvalPlanQualFetchRowMark(), ExecLockRows(), ExecMergeMatched(), ExecModifyTable(), and execute_foreign_modify().
Definition at line 827 of file execUtils.c.
References AccessShareLock, Assert(), bms_is_member(), CheckRelationLockedByMe(), elog, ERROR, EState::es_relations, EState::es_unpruned_relids, exec_rt_fetch(), IsParallelWorker, NoLock, RangeTblEntry::relid, RTE_RELATION, RangeTblEntry::rtekind, and table_open().
Referenced by CreatePartitionPruneState(), ExecInitResultRelation(), ExecOpenScanRelation(), and InitPlan().
Oid ExecGetResultRelCheckAsUser | ( | ResultRelInfo * | relInfo, |
EState * | estate | ||
) |
Definition at line 1491 of file execUtils.c.
References RTEPermissionInfo::checkAsUser, elog, ERROR, GetResultRTEPermissionInfo(), GetUserId(), RelationGetRelid, and ResultRelInfo::ri_RelationDesc.
Referenced by create_foreign_modify().
const TupleTableSlotOps * ExecGetResultSlotOps | ( | PlanState * | planstate, |
bool * | isfixed | ||
) |
Definition at line 506 of file execUtils.c.
References PlanState::ps_ResultTupleSlot, PlanState::resultops, PlanState::resultopsfixed, PlanState::resultopsset, TTS_FIXED, TupleTableSlot::tts_ops, and TTSOpsVirtual.
Referenced by ExecComputeSlotInfo(), ExecGetCommonSlotOps(), ExecInitAgg(), ExecInitGroup(), ExecInitHashJoin(), ExecInitLimit(), ExecInitLockRows(), ExecInitMergeJoin(), and ExecInitSubqueryScan().
Definition at line 497 of file execUtils.c.
References PlanState::ps_ResultTupleDesc.
Referenced by build_hash_table(), ExecComputeSlotInfo(), ExecCreateScanSlotFromOuterPlan(), ExecIncrementalSort(), ExecInitCteScan(), ExecInitGather(), ExecInitGatherMerge(), ExecInitGroup(), ExecInitHashJoin(), ExecInitIncrementalSort(), ExecInitLimit(), ExecInitMergeJoin(), ExecInitNestLoop(), ExecInitSort(), ExecInitSubqueryScan(), ExecInitUnique(), ExecSort(), ExecWorkTableScan(), initialize_phase(), InitPlan(), and switchToPresortedPrefixMode().
TupleTableSlot * ExecGetReturningSlot | ( | EState * | estate, |
ResultRelInfo * | relInfo | ||
) |
Definition at line 1250 of file execUtils.c.
References EState::es_query_cxt, ExecInitExtraTupleSlot(), MemoryContextSwitchTo(), RelationGetDescr, ResultRelInfo::ri_RelationDesc, ResultRelInfo::ri_ReturningSlot, and table_slot_callbacks().
Referenced by apply_returning_filter(), ExecDelete(), and ExecInsert().
TupleConversionMap * ExecGetRootToChildMap | ( | ResultRelInfo * | resultRelInfo, |
EState * | estate | ||
) |
Definition at line 1328 of file execUtils.c.
References Assert(), build_attrmap_by_name_if_req(), convert_tuples_by_name_attrmap(), EState::es_query_cxt, MemoryContextSwitchTo(), RelationData::rd_rel, RelationGetDescr, ResultRelInfo::ri_RelationDesc, ResultRelInfo::ri_RootResultRelInfo, ResultRelInfo::ri_RootToChildMap, and ResultRelInfo::ri_RootToChildMapValid.
Referenced by apply_handle_tuple_routing(), CopyFrom(), ExecFindPartition(), ExecGetInsertedCols(), ExecGetUpdatedCols(), ExecInitPartitionInfo(), ExecInitRoutingInfo(), ExecInsert(), and ExecPrepareTupleRouting().
TupleTableSlot * ExecGetTriggerNewSlot | ( | EState * | estate, |
ResultRelInfo * | relInfo | ||
) |
Definition at line 1228 of file execUtils.c.
References EState::es_query_cxt, ExecInitExtraTupleSlot(), MemoryContextSwitchTo(), RelationGetDescr, ResultRelInfo::ri_RelationDesc, ResultRelInfo::ri_TrigNewSlot, and table_slot_callbacks().
Referenced by AfterTriggerExecute(), and AfterTriggerSaveEvent().
TupleTableSlot * ExecGetTriggerOldSlot | ( | EState * | estate, |
ResultRelInfo * | relInfo | ||
) |
Definition at line 1206 of file execUtils.c.
References EState::es_query_cxt, ExecInitExtraTupleSlot(), MemoryContextSwitchTo(), RelationGetDescr, ResultRelInfo::ri_RelationDesc, ResultRelInfo::ri_TrigOldSlot, and table_slot_callbacks().
Referenced by AfterTriggerExecute(), AfterTriggerSaveEvent(), ExecARDeleteTriggers(), ExecARUpdateTriggers(), ExecBRDeleteTriggers(), ExecBRUpdateTriggers(), ExecIRDeleteTriggers(), and ExecIRUpdateTriggers().
ResultRelInfo * ExecGetTriggerResultRel | ( | EState * | estate, |
Oid | relid, | ||
ResultRelInfo * | rootRelInfo | ||
) |
Definition at line 1426 of file execMain.c.
References EState::es_instrument, EState::es_opened_result_relations, EState::es_query_cxt, EState::es_trig_target_relations, EState::es_tuple_routing_result_relations, InitResultRelInfo(), lappend(), lfirst, makeNode, MemoryContextSwitchTo(), NoLock, RelationGetRelid, ResultRelInfo::ri_RelationDesc, and table_open().
Referenced by afterTriggerInvokeEvents().
Bitmapset * ExecGetUpdatedCols | ( | ResultRelInfo * | relinfo, |
EState * | estate | ||
) |
Definition at line 1384 of file execUtils.c.
References TupleConversionMap::attrMap, ExecGetRootToChildMap(), execute_attr_map_cols(), GetResultRTEPermissionInfo(), ResultRelInfo::ri_RootResultRelInfo, and RTEPermissionInfo::updatedCols.
Referenced by build_tuple_value_details(), ExecConstraints(), ExecGetAllUpdatedCols(), ExecInitGenerated(), ExecPartitionCheckEmitError(), ExecWithCheckOptions(), and index_unchanged_by_update().
TupleTableSlot * ExecGetUpdateNewTuple | ( | ResultRelInfo * | relinfo, |
TupleTableSlot * | planSlot, | ||
TupleTableSlot * | oldSlot | ||
) |
Definition at line 791 of file nodeModifyTable.c.
References Assert(), ExprContext::ecxt_outertuple, ExprContext::ecxt_scantuple, ExecProject(), ProjectionInfo::pi_exprContext, ResultRelInfo::ri_projectNew, ResultRelInfo::ri_projectNewInfoValid, and TTS_EMPTY.
Referenced by ExecBRUpdateTriggers(), ExecCrossPartitionUpdate(), ExecModifyTable(), and ExecUpdate().
Definition at line 315 of file execExpr.c.
References Assert(), ExecInitExpr(), IsA, make_ands_explicit(), and NIL.
Referenced by ExecPrepareCheck().
Definition at line 143 of file execExpr.c.
References EEOP_DONE_RETURN, ExecCreateExprSetupSteps(), ExecInitExprRec(), ExecReadyExpr(), ExprEvalPushStep(), makeNode, and ExprEvalStep::opcode.
Referenced by ATRewriteTable(), BeginCopyFrom(), evaluate_expr(), ExecIndexBuildScanKeys(), ExecInitCheck(), ExecInitExprList(), ExecInitExprRec(), ExecInitLimit(), ExecInitMemoize(), ExecInitProjectSet(), ExecInitSampleScan(), ExecInitSubPlan(), ExecInitTableFuncScan(), ExecInitTableFunctionResult(), ExecInitWindowAgg(), ExecPrepareExpr(), get_cast_hashentry(), get_qual_for_range(), InitPartitionPruneContext(), MakeTidOpExpr(), MJExamineQuals(), operator_predicate_proof(), prep_domain_constraints(), slot_fill_defaults(), and TidExprListCreate().
Definition at line 335 of file execExpr.c.
References ExecInitExpr(), lappend(), lfirst, and NIL.
Referenced by ExecInitAgg(), ExecInitExprRec(), ExecInitFunctionResultSet(), ExecInitIndexScan(), ExecInitSampleScan(), ExecInitTableFuncScan(), ExecInitTableFunctionResult(), ExecInitValuesScan(), prepare_query_params(), and ValuesNext().
ExprState * ExecInitExprWithParams | ( | Expr * | node, |
ParamListInfo | ext_params | ||
) |
Definition at line 180 of file execExpr.c.
References EEOP_DONE_RETURN, ExecCreateExprSetupSteps(), ExecInitExprRec(), ExecReadyExpr(), ExprEvalPushStep(), makeNode, and ExprEvalStep::opcode.
Referenced by exec_eval_simple_expr(), and InitPartitionPruneContext().
TupleTableSlot * ExecInitExtraTupleSlot | ( | EState * | estate, |
TupleDesc | tupledesc, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 2018 of file execTuples.c.
References EState::es_tupleTable, and ExecAllocTableSlot().
Referenced by apply_handle_delete(), apply_handle_insert(), apply_handle_update(), build_pertrans_for_aggref(), ExecGetAllNullSlot(), ExecGetReturningSlot(), ExecGetTriggerNewSlot(), ExecGetTriggerOldSlot(), ExecInitAgg(), ExecInitFunctionScan(), ExecInitGather(), ExecInitHashJoin(), ExecInitLimit(), ExecInitMergeJoin(), ExecInitNullTupleSlot(), ExecInitSetOp(), ExecInitSubPlan(), ExecInitWholeRowVar(), ExecInitWindowAgg(), gather_merge_setup(), and InitPlan().
SetExprState * ExecInitFunctionResultSet | ( | Expr * | expr, |
ExprContext * | econtext, | ||
PlanState * | parent | ||
) |
Definition at line 444 of file execSRF.c.
References FuncExpr::args, OpExpr::args, Assert(), ExprContext::ecxt_per_query_memory, elog, ERROR, ExecInitExprList(), FuncExpr::funcid, init_sexpr(), InvalidOid, IsA, makeNode, and nodeTag.
Referenced by ExecInitProjectSet().
JunkFilter * ExecInitJunkFilter | ( | List * | targetList, |
TupleTableSlot * | slot | ||
) |
Definition at line 60 of file execJunk.c.
References Assert(), ExecCleanTypeFromTL(), ExecSetSlotDescriptor(), JunkFilter::jf_cleanMap, JunkFilter::jf_cleanTupType, JunkFilter::jf_resultSlot, JunkFilter::jf_targetList, lfirst, makeNode, MakeSingleTupleTableSlot(), TupleDescData::natts, palloc(), TargetEntry::resno, and TTSOpsVirtual.
Referenced by ExecInitWholeRowVar(), init_sql_fcache(), and InitPlan().
JunkFilter * ExecInitJunkFilterConversion | ( | List * | targetList, |
TupleDesc | cleanTupType, | ||
TupleTableSlot * | slot | ||
) |
Definition at line 137 of file execJunk.c.
References ExecSetSlotDescriptor(), i, JunkFilter::jf_cleanMap, JunkFilter::jf_cleanTupType, JunkFilter::jf_resultSlot, JunkFilter::jf_targetList, lfirst, list_head(), lnext(), makeNode, MakeSingleTupleTableSlot(), TupleDescData::natts, palloc0(), TargetEntry::resno, TTSOpsVirtual, and TupleDescCompactAttr().
Referenced by init_sql_fcache().
Definition at line 142 of file execProcnode.c.
References SubPlan::args, Assert(), PlanState::async_capable, check_stack_depth(), elog, ERROR, EState::es_instrument, ExecInitAgg(), ExecInitAppend(), ExecInitBitmapAnd(), ExecInitBitmapHeapScan(), ExecInitBitmapIndexScan(), ExecInitBitmapOr(), ExecInitCteScan(), ExecInitCustomScan(), ExecInitForeignScan(), ExecInitFunctionScan(), ExecInitGather(), ExecInitGatherMerge(), ExecInitGroup(), ExecInitHash(), ExecInitHashJoin(), ExecInitIncrementalSort(), ExecInitIndexOnlyScan(), ExecInitIndexScan(), ExecInitLimit(), ExecInitLockRows(), ExecInitMaterial(), ExecInitMemoize(), ExecInitMergeAppend(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitNamedTuplestoreScan(), ExecInitNestLoop(), ExecInitProjectSet(), ExecInitRecursiveUnion(), ExecInitResult(), ExecInitSampleScan(), ExecInitSeqScan(), ExecInitSetOp(), ExecInitSort(), ExecInitSubPlan(), ExecInitSubqueryScan(), ExecInitTableFuncScan(), ExecInitTidRangeScan(), ExecInitTidScan(), ExecInitUnique(), ExecInitValuesScan(), ExecInitWindowAgg(), ExecInitWorkTableScan(), PlanState::ExecProcNode, ExecSetExecProcNode(), PlanState::initPlan, Plan::initPlan, InstrAlloc(), PlanState::instrument, IsA, lappend(), lfirst, NIL, and nodeTag.
Referenced by EvalPlanQualStart(), ExecInitAgg(), ExecInitAppend(), ExecInitBitmapAnd(), ExecInitBitmapHeapScan(), ExecInitBitmapOr(), ExecInitForeignScan(), ExecInitGather(), ExecInitGatherMerge(), ExecInitGroup(), ExecInitHash(), ExecInitHashJoin(), ExecInitIncrementalSort(), ExecInitLimit(), ExecInitLockRows(), ExecInitMaterial(), ExecInitMemoize(), ExecInitMergeAppend(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitNestLoop(), ExecInitProjectSet(), ExecInitRecursiveUnion(), ExecInitResult(), ExecInitSetOp(), ExecInitSort(), ExecInitSubqueryScan(), ExecInitUnique(), ExecInitWindowAgg(), and InitPlan().
TupleTableSlot * ExecInitNullTupleSlot | ( | EState * | estate, |
TupleDesc | tupType, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 2034 of file execTuples.c.
References ExecInitExtraTupleSlot(), and ExecStoreAllNullTuple().
Referenced by ExecInitHashJoin(), ExecInitMergeJoin(), and ExecInitNestLoop().
Definition at line 229 of file execExpr.c.
References Assert(), ExprEvalStep::d, EEO_FLAG_IS_QUAL, EEOP_DONE_RETURN, EEOP_QUAL, ExecCreateExprSetupSteps(), ExecInitExprRec(), ExecReadyExpr(), ExprEvalPushStep(), foreach_int, foreach_ptr, IsA, ExprEvalStep::jumpdone, lappend_int(), makeNode, NIL, ExprEvalStep::opcode, ExprEvalStep::qualexpr, ExprEvalStep::resnull, and ExprEvalStep::resvalue.
Referenced by CopyFrom(), ExecInitAgg(), ExecInitBitmapHeapScan(), ExecInitCteScan(), ExecInitCustomScan(), ExecInitForeignScan(), ExecInitFunctionScan(), ExecInitGroup(), ExecInitHashJoin(), ExecInitIndexOnlyScan(), ExecInitIndexScan(), ExecInitMerge(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitNamedTuplestoreScan(), ExecInitNestLoop(), ExecInitPartitionInfo(), ExecInitResult(), ExecInitSampleScan(), ExecInitSeqScan(), ExecInitSubqueryScan(), ExecInitTableFuncScan(), ExecInitTidRangeScan(), ExecInitTidScan(), ExecInitValuesScan(), ExecInitWindowAgg(), ExecInitWorkTableScan(), and ExecPrepareQual().
void ExecInitRangeTable | ( | EState * | estate, |
List * | rangeTable, | ||
List * | permInfos, | ||
Bitmapset * | unpruned_relids | ||
) |
Definition at line 775 of file execUtils.c.
References EState::es_range_table, EState::es_range_table_size, EState::es_relations, EState::es_result_relations, EState::es_rowmarks, EState::es_rteperminfos, EState::es_unpruned_relids, list_length(), and palloc0().
Referenced by CopyFrom(), create_edata_for_relation(), create_estate_for_relation(), and InitPlan().
void ExecInitResultRelation | ( | EState * | estate, |
ResultRelInfo * | resultRelInfo, | ||
Index | rti | ||
) |
Definition at line 882 of file execUtils.c.
References EState::es_instrument, EState::es_opened_result_relations, EState::es_range_table_size, EState::es_result_relations, ExecGetRangeTableRelation(), InitResultRelInfo(), lappend(), and palloc0().
Referenced by CopyFrom(), and ExecInitModifyTable().
void ExecInitResultSlot | ( | PlanState * | planstate, |
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1966 of file execTuples.c.
References EState::es_tupleTable, ExecAllocTableSlot(), PlanState::ps_ResultTupleDesc, PlanState::ps_ResultTupleSlot, PlanState::resultops, PlanState::resultopsfixed, PlanState::resultopsset, and PlanState::state.
Referenced by ExecConditionalAssignProjectionInfo(), and ExecInitResultTupleSlotTL().
void ExecInitResultTupleSlotTL | ( | PlanState * | planstate, |
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1986 of file execTuples.c.
References ExecInitResultSlot(), and ExecInitResultTypeTL().
Referenced by ExecInitAgg(), ExecInitAppend(), ExecInitCustomScan(), ExecInitGroup(), ExecInitHash(), ExecInitHashJoin(), ExecInitIncrementalSort(), ExecInitMaterial(), ExecInitMemoize(), ExecInitMergeAppend(), ExecInitMergeJoin(), ExecInitModifyTable(), ExecInitNestLoop(), ExecInitProjectSet(), ExecInitResult(), ExecInitSetOp(), ExecInitSort(), ExecInitUnique(), and ExecInitWindowAgg().
void ExecInitResultTypeTL | ( | PlanState * | planstate | ) |
Definition at line 1942 of file execTuples.c.
References ExecTypeFromTL(), PlanState::plan, PlanState::ps_ResultTupleDesc, and Plan::targetlist.
Referenced by ExecInitBitmapHeapScan(), ExecInitCteScan(), ExecInitForeignScan(), ExecInitFunctionScan(), ExecInitGather(), ExecInitGatherMerge(), ExecInitIndexOnlyScan(), ExecInitIndexScan(), ExecInitLimit(), ExecInitLockRows(), ExecInitModifyTable(), ExecInitNamedTuplestoreScan(), ExecInitRecursiveUnion(), ExecInitResultTupleSlotTL(), ExecInitSampleScan(), ExecInitSeqScan(), ExecInitSubqueryScan(), ExecInitTableFuncScan(), ExecInitTidRangeScan(), ExecInitTidScan(), ExecInitValuesScan(), and ExecInitWorkTableScan().
void ExecInitScanTupleSlot | ( | EState * | estate, |
ScanState * | scanstate, | ||
TupleDesc | tupledesc, | ||
const TupleTableSlotOps * | tts_ops | ||
) |
Definition at line 1998 of file execTuples.c.
References EState::es_tupleTable, ExecAllocTableSlot(), ScanState::ps, PlanState::scandesc, PlanState::scanops, PlanState::scanopsfixed, PlanState::scanopsset, and ScanState::ss_ScanTupleSlot.
Referenced by ExecCreateScanSlotFromOuterPlan(), ExecInitBitmapHeapScan(), ExecInitCteScan(), ExecInitCustomScan(), ExecInitForeignScan(), ExecInitFunctionScan(), ExecInitIndexOnlyScan(), ExecInitIndexScan(), ExecInitNamedTuplestoreScan(), ExecInitSampleScan(), ExecInitSeqScan(), ExecInitSubqueryScan(), ExecInitTableFuncScan(), ExecInitTidRangeScan(), ExecInitTidScan(), ExecInitValuesScan(), and ExecInitWorkTableScan().
SetExprState * ExecInitTableFunctionResult | ( | Expr * | expr, |
ExprContext * | econtext, | ||
PlanState * | parent | ||
) |
Definition at line 56 of file execSRF.c.
References FuncExpr::args, ExprContext::ecxt_per_query_memory, ExecInitExpr(), ExecInitExprList(), FuncExpr::funcid, init_sexpr(), InvalidOid, IsA, and makeNode.
Referenced by ExecInitFunctionScan().
List * ExecInsertIndexTuples | ( | ResultRelInfo * | resultRelInfo, |
TupleTableSlot * | slot, | ||
EState * | estate, | ||
bool | update, | ||
bool | noDupErr, | ||
bool * | specConflict, | ||
List * | arbiterIndexes, | ||
bool | onlySummarizing | ||
) |
Definition at line 310 of file execIndexing.c.
References Assert(), CEOUC_LIVELOCK_PREVENTING_WAIT, CEOUC_NOWAIT, CEOUC_WAIT, check_exclusion_or_unique_constraint(), ExprContext::ecxt_scantuple, ExecPrepareQual(), ExecQual(), FormIndexDatum(), GetPerTupleExprContext, i, IndexInfo::ii_ExclusionOps, IndexInfo::ii_Predicate, IndexInfo::ii_PredicateState, IndexInfo::ii_ReadyForInserts, IndexInfo::ii_Summarizing, index_insert(), INDEX_MAX_KEYS, index_unchanged_by_update(), ItemPointerIsValid(), lappend_oid(), list_member_oid(), NIL, RelationData::rd_index, RelationGetRelid, ResultRelInfo::ri_IndexRelationDescs, ResultRelInfo::ri_IndexRelationInfo, ResultRelInfo::ri_NumIndices, ResultRelInfo::ri_RelationDesc, TupleTableSlot::tts_tableOid, TupleTableSlot::tts_tid, UNIQUE_CHECK_NO, UNIQUE_CHECK_PARTIAL, UNIQUE_CHECK_YES, and values.
Referenced by CopyFrom(), CopyMultiInsertBufferFlush(), ExecInsert(), ExecSimpleRelationInsert(), ExecSimpleRelationUpdate(), and ExecUpdateEpilogue().
ResultRelInfo * ExecLookupResultRelByOid | ( | ModifyTableState * | node, |
Oid | resultoid, | ||
bool | missing_ok, | ||
bool | update_cache | ||
) |
Definition at line 4420 of file nodeModifyTable.c.
References elog, ERROR, HASH_FIND, hash_search(), ModifyTableState::mt_lastResultIndex, ModifyTableState::mt_lastResultOid, ModifyTableState::mt_nrels, ModifyTableState::mt_resultOidHash, RelationGetRelid, MTTargetRelLookup::relationIndex, ModifyTableState::resultRelInfo, and ResultRelInfo::ri_RelationDesc.
Referenced by ExecFindPartition(), and ExecModifyTable().
Datum ExecMakeFunctionResultSet | ( | SetExprState * | fcache, |
ExprContext * | econtext, | ||
MemoryContext | argContext, | ||
bool * | isNull, | ||
ExprDoneCond * | isDone | ||
) |
Definition at line 497 of file execSRF.c.
References ReturnSetInfo::allowedModes, FunctionCallInfoBaseData::args, SetExprState::args, check_stack_depth(), ReturnSetInfo::econtext, ereport, errcode(), errmsg(), ERROR, ExecEvalFuncArgs(), ExecFetchSlotHeapTupleDatum(), ExecPrepareTuplestoreResult(), ReturnSetInfo::expectedDesc, ExprEndResult, ExprMultipleResult, ExprSingleResult, SetExprState::fcinfo, FmgrInfo::fn_strict, SetExprState::func, SetExprState::funcResultDesc, SetExprState::funcResultSlot, SetExprState::funcResultStore, SetExprState::funcReturnsTuple, FunctionCallInvoke, i, ReturnSetInfo::isDone, FunctionCallInfoBaseData::isnull, NullableDatum::isnull, MemoryContextSwitchTo(), FunctionCallInfoBaseData::nargs, pgstat_end_function_usage(), pgstat_init_function_usage(), PointerGetDatum(), RegisterExprContextCallback(), FunctionCallInfoBaseData::resultinfo, ReturnSetInfo::returnMode, SetExprState::setArgsValid, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, SFRM_Materialize, SFRM_ValuePerCall, SetExprState::shutdown_reg, ShutdownSetExpr(), slot_getattr(), TupleTableSlot::tts_mcxt, tuplestore_end(), tuplestore_gettupleslot(), and ReturnSetInfo::type.
Referenced by ExecProjectSRF().
Tuplestorestate * ExecMakeTableFunctionResult | ( | SetExprState * | setexpr, |
ExprContext * | econtext, | ||
MemoryContext | argContext, | ||
TupleDesc | expectedDesc, | ||
bool | randomAccess | ||
) |
Definition at line 101 of file execSRF.c.
References ReturnSetInfo::allowedModes, FunctionCallInfoBaseData::args, SetExprState::args, Assert(), CHECK_FOR_INTERRUPTS, CreateTemplateTupleDesc(), CurrentMemoryContext, DatumGetHeapTupleHeader, ReturnSetInfo::econtext, ExprContext::ecxt_per_query_memory, ExprContext::ecxt_per_tuple_memory, SetExprState::elidedFuncState, ereport, errcode(), errmsg(), ERROR, ExecEvalExpr(), ExecEvalFuncArgs(), ReturnSetInfo::expectedDesc, SetExprState::expr, ExprEndResult, ExprMultipleResult, ExprSingleResult, exprType(), SetExprState::fcinfo, FmgrInfo::fn_strict, FunctionCallInfoBaseData::fncollation, FreeTupleDesc(), SetExprState::func, SetExprState::funcReturnsSet, FunctionCallInvoke, HeapTupleHeaderGetDatumLength(), HeapTupleHeaderGetTypeId(), HeapTupleHeaderGetTypMod(), i, InitFunctionCallInfoData, InvalidOid, ReturnSetInfo::isDone, FunctionCallInfoBaseData::isnull, NullableDatum::isnull, list_length(), lookup_rowtype_tupdesc_copy(), MemoryContextReset(), MemoryContextSwitchTo(), FunctionCallInfoBaseData::nargs, TupleDescData::natts, palloc(), pgstat_end_function_usage(), pgstat_init_function_usage(), ResetExprContext, ReturnSetInfo::returnMode, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, SFRM_Materialize, SFRM_Materialize_Preferred, SFRM_Materialize_Random, SFRM_ValuePerCall, SizeForFunctionCallInfo, HeapTupleData::t_data, HeapTupleData::t_len, TupleDescData::tdrefcount, TupleDescData::tdtypeid, TupleDescData::tdtypmod, tupledesc_match(), TupleDescInitEntry(), tuplestore_begin_heap(), tuplestore_puttuple(), tuplestore_putvalues(), ReturnSetInfo::type, type_is_rowtype(), and work_mem.
Referenced by FunctionNext().
void ExecMarkPos | ( | PlanState * | node | ) |
Definition at line 327 of file execAmi.c.
References DEBUG2, elog, ExecCustomMarkPos(), ExecIndexMarkPos(), ExecIndexOnlyMarkPos(), ExecMaterialMarkPos(), ExecResultMarkPos(), ExecSortMarkPos(), and nodeTag.
Referenced by ExecMergeJoin(), and ExecResultMarkPos().
bool ExecMaterializesOutput | ( | NodeTag | plantype | ) |
Definition at line 636 of file execAmi.c.
Referenced by build_subplan(), consider_parallel_nestloop(), cost_subplan(), and match_unsorted_outer().
void ExecOpenIndices | ( | ResultRelInfo * | resultRelInfo, |
bool | speculative | ||
) |
Definition at line 160 of file execIndexing.c.
References Assert(), BuildIndexInfo(), BuildSpeculativeIndexInfo(), i, IndexInfo::ii_Unique, index_open(), len, lfirst_oid, list_free(), list_length(), palloc(), RelationData::rd_index, RelationGetForm, RelationGetIndexList(), ResultRelInfo::ri_IndexRelationDescs, ResultRelInfo::ri_IndexRelationInfo, ResultRelInfo::ri_NumIndices, ResultRelInfo::ri_RelationDesc, and RowExclusiveLock.
Referenced by apply_handle_delete(), apply_handle_insert(), apply_handle_update_internal(), CatalogOpenIndexes(), CopyFrom(), ExecInitPartitionInfo(), ExecInsert(), and ExecUpdatePrologue().
Definition at line 744 of file execUtils.c.
References ereport, errcode(), errhint(), errmsg(), ERROR, EXEC_FLAG_EXPLAIN_ONLY, EXEC_FLAG_WITH_NO_DATA, ExecGetRangeTableRelation(), RelationGetRelationName, and RelationIsScannable.
Referenced by ExecInitBitmapHeapScan(), ExecInitCustomScan(), ExecInitForeignScan(), ExecInitIndexOnlyScan(), ExecInitIndexScan(), ExecInitSampleScan(), ExecInitSeqScan(), ExecInitTidRangeScan(), ExecInitTidScan(), and postgresBeginDirectModify().
bool ExecPartitionCheck | ( | ResultRelInfo * | resultRelInfo, |
TupleTableSlot * | slot, | ||
EState * | estate, | ||
bool | emitError | ||
) |
Definition at line 1930 of file execMain.c.
References ExprContext::ecxt_scantuple, EState::es_query_cxt, ExecCheck(), ExecPartitionCheckEmitError(), ExecPrepareCheck(), GetPerTupleExprContext, MemoryContextSwitchTo(), RelationGetPartitionQual(), ResultRelInfo::ri_PartitionCheckExpr, ResultRelInfo::ri_RelationDesc, and success.
Referenced by apply_handle_tuple_routing(), CopyFrom(), ExecBRInsertTriggers(), ExecFindPartition(), ExecInsert(), ExecSimpleRelationInsert(), ExecSimpleRelationUpdate(), and ExecUpdateAct().
void ExecPartitionCheckEmitError | ( | ResultRelInfo * | resultRelInfo, |
TupleTableSlot * | slot, | ||
EState * | estate | ||
) |
Definition at line 1983 of file execMain.c.
References bms_union(), build_attrmap_by_name_if_req(), ereport, errcode(), errdetail(), errmsg(), ERROR, errtable(), ExecBuildSlotValueDescription(), ExecGetInsertedCols(), ExecGetUpdatedCols(), execute_attr_map_slot(), MakeTupleTableSlot(), RelationGetDescr, RelationGetRelationName, RelationGetRelid, ResultRelInfo::ri_RelationDesc, ResultRelInfo::ri_RootResultRelInfo, and TTSOpsVirtual.
Referenced by ExecCrossPartitionUpdate(), and ExecPartitionCheck().
|
inlinestatic |
Definition at line 270 of file executor.h.
References CachedPlanValid(), EState::es_cachedplan, and true.
Referenced by ExecDoInitialPruning(), InitPlan(), and standard_ExecutorStart().
Definition at line 816 of file execExpr.c.
References EState::es_query_cxt, ExecInitCheck(), expression_planner(), and MemoryContextSwitchTo().
Referenced by ExecPartitionCheck().
Definition at line 765 of file execExpr.c.
References EState::es_query_cxt, ExecInitExpr(), expression_planner(), and MemoryContextSwitchTo().
Referenced by ATExecAddColumn(), ATRewriteTable(), check_default_partition_contents(), compute_expr_stats(), ExecInitGenerated(), ExecPrepareExprList(), ExecRelCheck(), ExecuteCallStmt(), pgoutput_row_filter_init(), and validateDomainCheckConstraint().
Definition at line 839 of file execExpr.c.
References EState::es_query_cxt, ExecPrepareExpr(), lappend(), lfirst, MemoryContextSwitchTo(), and NIL.
Referenced by EvaluateParams(), FormIndexDatum(), FormPartitionKeyDatum(), and make_build_data().
Definition at line 793 of file execExpr.c.
References EState::es_query_cxt, ExecInitQual(), expression_planner(), and MemoryContextSwitchTo().
Referenced by compute_index_stats(), ExecCheckIndexConstraints(), ExecInsertIndexTuples(), heapam_index_build_range_scan(), heapam_index_validate_scan(), IndexCheckExclusion(), and TriggerEnabled().
|
inlinestatic |
Definition at line 295 of file executor.h.
References PlanState::chgParam, PlanState::ExecProcNode, and ExecReScan().
Referenced by begin_partition(), buildSubPlanHash(), CteScanNext(), EvalPlanQualNext(), ExecAppend(), ExecGroup(), ExecHashJoinImpl(), ExecHashJoinOuterGetTuple(), ExecIncrementalSort(), ExecLimit(), ExecLockRows(), ExecMaterial(), ExecMemoize(), ExecMergeAppend(), ExecMergeJoin(), ExecModifyTable(), ExecNestLoop(), ExecParallelHashJoinOuterGetTuple(), ExecParallelHashJoinPartitionOuter(), ExecPostprocessPlan(), ExecProjectSet(), ExecRecursiveUnion(), ExecResult(), ExecScanSubPlan(), ExecSetParamPlan(), ExecSort(), ExecUnique(), ExecutePlan(), fetch_input_tuple(), gather_getnext(), gather_merge_readnext(), MultiExecParallelHash(), MultiExecPrivateHash(), postgresRecheckForeignScan(), setop_fill_hash_table(), setop_load_group(), setop_retrieve_sorted(), spool_tuples(), and SubqueryNext().
|
inlinestatic |
Definition at line 464 of file executor.h.
References ExecClearTuple(), ExecEvalExprNoReturnSwitchContext(), TupleDescData::natts, ProjectionInfo::pi_exprContext, ProjectionInfo::pi_state, TupleTableSlot::tts_flags, TupleTableSlot::tts_nvalid, and TupleTableSlot::tts_tupleDescriptor.
Referenced by buildSubPlanHash(), ExecGather(), ExecGatherMerge(), ExecGetInsertNewTuple(), ExecGetUpdateNewTuple(), ExecGroup(), ExecHashJoinImpl(), ExecHashSubPlan(), ExecMergeJoin(), ExecMergeMatched(), ExecMergeNotMatched(), ExecNestLoop(), ExecOnConflictUpdate(), ExecProcessReturning(), ExecResult(), ExecScanExtended(), ExecWindowAgg(), MJFillInner(), MJFillOuter(), and project_aggregates().
|
inlinestatic |
Definition at line 500 of file executor.h.
References Assert(), DatumGetBool(), EEO_FLAG_IS_QUAL, and ExecEvalExprSwitchContext().
Referenced by agg_retrieve_direct(), compute_index_stats(), CopyFrom(), ExecCheckIndexConstraints(), ExecEvalPreOrderedDistinctMulti(), ExecGroup(), ExecHashJoinImpl(), ExecInsertIndexTuples(), ExecMergeJoin(), ExecMergeMatched(), ExecMergeNotMatched(), ExecNestLoop(), ExecOnConflictUpdate(), ExecQualAndReset(), ExecResult(), ExecScanExtended(), ExecWindowAgg(), ExecWithCheckOptions(), ForeignRecheck(), heapam_index_build_range_scan(), heapam_index_validate_scan(), IndexCheckExclusion(), MemoizeHash_equal(), MJFillInner(), MJFillOuter(), process_ordered_aggregate_multi(), project_aggregates(), and TriggerEnabled().
|
inlinestatic |
Definition at line 527 of file executor.h.
References ExprContext::ecxt_per_tuple_memory, ExecQual(), and MemoryContextReset().
Referenced by agg_retrieve_direct(), are_peers(), BitmapHeapNext(), BitmapHeapRecheck(), ExecGroup(), ExecLimit(), ExecParallelScanHashBucket(), ExecScanHashBucket(), ExecUnique(), hypothetical_dense_rank_final(), IndexNext(), IndexNextWithReorder(), IndexOnlyNext(), IndexRecheck(), spool_tuples(), and TupleHashTableMatch().
Definition at line 731 of file execUtils.c.
References EState::es_plannedstmt, list_member_int(), and PlannedStmt::resultRelations.
void ExecReScan | ( | PlanState * | node | ) |
Definition at line 77 of file execAmi.c.
References bms_free(), PlanState::chgParam, elog, ERROR, ExecReScanAgg(), ExecReScanAppend(), ExecReScanBitmapAnd(), ExecReScanBitmapHeapScan(), ExecReScanBitmapIndexScan(), ExecReScanBitmapOr(), ExecReScanCteScan(), ExecReScanCustomScan(), ExecReScanForeignScan(), ExecReScanFunctionScan(), ExecReScanGather(), ExecReScanGatherMerge(), ExecReScanGroup(), ExecReScanHash(), ExecReScanHashJoin(), ExecReScanIncrementalSort(), ExecReScanIndexOnlyScan(), ExecReScanIndexScan(), ExecReScanLimit(), ExecReScanLockRows(), ExecReScanMaterial(), ExecReScanMemoize(), ExecReScanMergeAppend(), ExecReScanMergeJoin(), ExecReScanModifyTable(), ExecReScanNamedTuplestoreScan(), ExecReScanNestLoop(), ExecReScanProjectSet(), ExecReScanRecursiveUnion(), ExecReScanResult(), ExecReScanSampleScan(), ExecReScanSeqScan(), ExecReScanSetOp(), ExecReScanSetParamPlan(), ExecReScanSort(), ExecReScanSubqueryScan(), ExecReScanTableFuncScan(), ExecReScanTidRangeScan(), ExecReScanTidScan(), ExecReScanUnique(), ExecReScanValuesScan(), ExecReScanWindowAgg(), ExecReScanWorkTableScan(), PlanState::initPlan, innerPlanState, InstrEndLoop(), PlanState::instrument, lfirst, nodeTag, outerPlanState, SubPlanState::planstate, PlanState::ps_ExprContext, ReScanExprContext(), splan, PlanState::subPlan, and UpdateChangedParamSet().
Referenced by buildSubPlanHash(), ExecAsyncRequest(), ExecIndexOnlyScan(), ExecIndexScan(), ExecNestLoop(), ExecProcNode(), ExecReScanAgg(), ExecReScanAppend(), ExecReScanBitmapAnd(), ExecReScanBitmapHeapScan(), ExecReScanBitmapOr(), ExecReScanForeignScan(), ExecReScanGather(), ExecReScanGatherMerge(), ExecReScanGroup(), ExecReScanHash(), ExecReScanHashJoin(), ExecReScanIncrementalSort(), ExecReScanLimit(), ExecReScanLockRows(), ExecReScanMaterial(), ExecReScanMemoize(), ExecReScanMergeAppend(), ExecReScanMergeJoin(), ExecReScanNestLoop(), ExecReScanProjectSet(), ExecReScanRecursiveUnion(), ExecReScanResult(), ExecReScanSetOp(), ExecReScanSort(), ExecReScanSubqueryScan(), ExecReScanUnique(), ExecReScanWindowAgg(), ExecScanSubPlan(), ExecutorRewind(), MultiExecBitmapIndexScan(), and MultiExecProcNode().
void ExecRestrPos | ( | PlanState * | node | ) |
Definition at line 376 of file execAmi.c.
References elog, ERROR, ExecCustomRestrPos(), ExecIndexOnlyRestrPos(), ExecIndexRestrPos(), ExecMaterialRestrPos(), ExecResultRestrPos(), ExecSortRestrPos(), and nodeTag.
Referenced by ExecMergeJoin(), and ExecResultRestrPos().
TupleTableSlot * ExecScan | ( | ScanState * | node, |
ExecScanAccessMtd | accessMtd, | ||
ExecScanRecheckMtd | recheckMtd | ||
) |
Definition at line 47 of file execScan.c.
References EState::es_epq_active, ExecScanExtended(), ScanState::ps, PlanState::ps_ProjInfo, PlanState::qual, and PlanState::state.
Referenced by ExecBitmapHeapScan(), ExecCteScan(), ExecForeignScan(), ExecFunctionScan(), ExecIndexOnlyScan(), ExecIndexScan(), ExecNamedTuplestoreScan(), ExecSampleScan(), ExecSeqScanEPQ(), ExecSubqueryScan(), ExecTableFuncScan(), ExecTidRangeScan(), ExecTidScan(), ExecValuesScan(), and ExecWorkTableScan().
void ExecScanReScan | ( | ScanState * | node | ) |
Definition at line 108 of file execScan.c.
References Assert(), bms_next_member(), elog, ERROR, EState::es_epq_active, ExecClearTuple(), IsA, nodeTag, PlanState::plan, ScanState::ps, EPQState::relsubs_blocked, EPQState::relsubs_done, ScanState::ss_ScanTupleSlot, and PlanState::state.
Referenced by ExecReScanBitmapHeapScan(), ExecReScanCteScan(), ExecReScanForeignScan(), ExecReScanFunctionScan(), ExecReScanIndexOnlyScan(), ExecReScanIndexScan(), ExecReScanNamedTuplestoreScan(), ExecReScanSampleScan(), ExecReScanSeqScan(), ExecReScanSubqueryScan(), ExecReScanTableFuncScan(), ExecReScanTidRangeScan(), ExecReScanTidScan(), ExecReScanValuesScan(), and ExecReScanWorkTableScan().
void ExecSetExecProcNode | ( | PlanState * | node, |
ExecProcNodeMtd | function | ||
) |
Definition at line 430 of file execProcnode.c.
References PlanState::ExecProcNode, ExecProcNodeFirst(), PlanState::ExecProcNodeReal, and function.
Referenced by ExecHashJoinInitializeDSM(), ExecHashJoinInitializeWorker(), and ExecInitNode().
Definition at line 848 of file execProcnode.c.
References AppendState::appendplans, AppendState::as_nplans, SortState::bound, IncrementalSortState::bound, SortState::bounded, IncrementalSortState::bounded, ExecSetTupleBound(), i, IsA, MergeAppendState::mergeplans, MergeAppendState::ms_nplans, outerPlanState, ScanState::ps, PlanState::qual, SubqueryScanState::ss, SubqueryScanState::subplan, GatherState::tuples_needed, and GatherMergeState::tuples_needed.
Referenced by ExecSetTupleBound(), ParallelQueryMain(), and recompute_limits().
|
inlinestatic |
Definition at line 281 of file executor.h.
References CachedPlanRequiresLocking(), EState::es_cachedplan, and false.
Referenced by ExecDoInitialPruning().
void ExecShutdownNode | ( | PlanState * | node | ) |
Definition at line 772 of file execProcnode.c.
References ExecShutdownNode_walker().
Referenced by ExecutePlan().
void ExecSimpleRelationDelete | ( | ResultRelInfo * | resultRelInfo, |
EState * | estate, | ||
EPQState * | epqstate, | ||
TupleTableSlot * | searchslot | ||
) |
Definition at line 696 of file execReplication.c.
References CheckCmdReplicaIdentity(), CMD_DELETE, EState::es_snapshot, ExecARDeleteTriggers(), ExecBRDeleteTriggers(), ResultRelInfo::ri_RelationDesc, ResultRelInfo::ri_TrigDesc, simple_table_tuple_delete(), TriggerDesc::trig_delete_before_row, and TupleTableSlot::tts_tid.
Referenced by apply_handle_delete_internal(), and apply_handle_tuple_routing().
void ExecSimpleRelationInsert | ( | ResultRelInfo * | resultRelInfo, |
EState * | estate, | ||
TupleTableSlot * | slot | ||
) |
Definition at line 524 of file execReplication.c.
References Assert(), CheckAndReportConflict(), CheckCmdReplicaIdentity(), CMD_INSERT, TupleDescData::constr, CT_INSERT_EXISTS, ExecARInsertTriggers(), ExecBRInsertTriggers(), ExecComputeStoredGenerated(), ExecConstraints(), ExecInsertIndexTuples(), ExecPartitionCheck(), TupleConstr::has_generated_stored, list_free(), NIL, RelationData::rd_att, RelationData::rd_rel, ResultRelInfo::ri_NumIndices, ResultRelInfo::ri_onConflictArbiterIndexes, ResultRelInfo::ri_RelationDesc, ResultRelInfo::ri_TrigDesc, simple_table_tuple_insert(), and TriggerDesc::trig_insert_before_row.
Referenced by apply_handle_insert_internal().
void ExecSimpleRelationUpdate | ( | ResultRelInfo * | resultRelInfo, |
EState * | estate, | ||
EPQState * | epqstate, | ||
TupleTableSlot * | searchslot, | ||
TupleTableSlot * | slot | ||
) |
Definition at line 613 of file execReplication.c.
References Assert(), CheckAndReportConflict(), CheckCmdReplicaIdentity(), CMD_UPDATE, TupleDescData::constr, CT_UPDATE_EXISTS, EState::es_snapshot, ExecARUpdateTriggers(), ExecBRUpdateTriggers(), ExecComputeStoredGenerated(), ExecConstraints(), ExecInsertIndexTuples(), ExecPartitionCheck(), TupleConstr::has_generated_stored, IsCatalogRelation(), list_free(), NIL, RelationData::rd_att, RelationData::rd_rel, ResultRelInfo::ri_NumIndices, ResultRelInfo::ri_onConflictArbiterIndexes, ResultRelInfo::ri_RelationDesc, ResultRelInfo::ri_TrigDesc, simple_table_tuple_update(), TriggerDesc::trig_update_before_row, TupleTableSlot::tts_tid, TU_None, and TU_Summarizing.
Referenced by apply_handle_tuple_routing(), and apply_handle_update_internal().
bool ExecSupportsBackwardScan | ( | Plan * | node | ) |
Definition at line 511 of file execAmi.c.
References CUSTOMPATH_SUPPORT_BACKWARD_SCAN, ExecSupportsBackwardScan(), IndexSupportsBackwardScan(), lfirst, nodeTag, outerPlan, and Plan::parallel_aware.
Referenced by ExecSupportsBackwardScan(), PerformCursorOpen(), SPI_cursor_open_internal(), and standard_planner().
bool ExecSupportsMarkRestore | ( | struct Path * | pathnode | ) |
Definition at line 418 of file execAmi.c.
References Assert(), castNode, CUSTOMPATH_SUPPORT_MARK_RESTORE, ExecSupportsMarkRestore(), IsA, linitial, list_length(), Path::pathtype, subpath(), AppendPath::subpaths, and MergeAppendPath::subpaths.
Referenced by ExecSupportsMarkRestore(), and final_cost_mergejoin().
int ExecTargetListLength | ( | List * | targetlist | ) |
Definition at line 1177 of file execUtils.c.
References list_length().
Referenced by ExecTypeFromTLInternal().
void execTuplesHashPrepare | ( | int | numCols, |
const Oid * | eqOperators, | ||
Oid ** | eqFuncOids, | ||
FmgrInfo ** | hashFunctions | ||
) |
Definition at line 97 of file execGrouping.c.
References Assert(), elog, ERROR, fmgr_info(), get_op_hash_functions(), get_opcode(), i, and palloc().
Referenced by ExecInitRecursiveUnion(), ExecInitSetOp(), and find_hash_columns().
ExprState * execTuplesMatchPrepare | ( | TupleDesc | desc, |
int | numCols, | ||
const AttrNumber * | keyColIdx, | ||
const Oid * | eqOperators, | ||
const Oid * | collations, | ||
PlanState * | parent | ||
) |
Definition at line 58 of file execGrouping.c.
References ExecBuildGroupingEqual(), get_opcode(), i, and palloc().
Referenced by build_pertrans_for_aggref(), ExecInitAgg(), ExecInitGroup(), ExecInitLimit(), ExecInitUnique(), ExecInitWindowAgg(), and hypothetical_dense_rank_final().
Definition at line 2184 of file execTuples.c.
References CreateTemplateTupleDesc(), exprCollation(), exprType(), exprTypmod(), lfirst, list_length(), TupleDescInitEntry(), and TupleDescInitEntryCollation().
Referenced by ExecInitExprRec(), ExecInitMemoize(), and ExecInitValuesScan().
Definition at line 2125 of file execTuples.c.
References ExecTypeFromTLInternal().
Referenced by build_pertrans_for_aggref(), ExecInitCustomScan(), ExecInitForeignScan(), ExecInitIndexOnlyScan(), ExecInitResultTypeTL(), ExecInitSubPlan(), find_hash_columns(), and ordered_set_startup().
Definition at line 2217 of file execTuples.c.
References Assert(), lfirst, namestrcpy(), TupleDescData::natts, strVal, TupleDescData::tdtypeid, TupleDescData::tdtypmod, and TupleDescAttr().
Referenced by ExecEvalWholeRowVar(), and ExecInitExprRec().
LockTupleMode ExecUpdateLockMode | ( | EState * | estate, |
ResultRelInfo * | relinfo | ||
) |
Definition at line 2491 of file execMain.c.
References bms_overlap(), ExecGetAllUpdatedCols(), INDEX_ATTR_BITMAP_KEY, LockTupleExclusive, LockTupleNoKeyExclusive, RelationGetIndexAttrBitmap(), and ResultRelInfo::ri_RelationDesc.
Referenced by ExecBRUpdateTriggers(), ExecMergeMatched(), and ExecOnConflictUpdate().
int executor_errposition | ( | EState * | estate, |
int | location | ||
) |
Definition at line 938 of file execUtils.c.
References errposition(), EState::es_sourceText, and pg_mbstrlen_with_len().
Referenced by ExecInitFunc(), ExecInitSubscriptingRef(), and init_sexpr().
void ExecutorEnd | ( | QueryDesc * | queryDesc | ) |
Definition at line 535 of file execMain.c.
References ExecutorEnd_hook, and standard_ExecutorEnd().
Referenced by _SPI_pquery(), EndCopyTo(), ExecCreateTableAs(), execute_sql_string(), ExecutorStartCachedPlan(), ExplainOnePlan(), ParallelQueryMain(), PersistHoldablePortal(), PortalCleanup(), postquel_end(), ProcessQuery(), and refresh_matview_datafill().
void ExecutorFinish | ( | QueryDesc * | queryDesc | ) |
Definition at line 472 of file execMain.c.
References ExecutorFinish_hook, and standard_ExecutorFinish().
Referenced by _SPI_pquery(), EndCopyTo(), ExecCreateTableAs(), execute_sql_string(), ExplainOnePlan(), ParallelQueryMain(), PersistHoldablePortal(), PortalCleanup(), postquel_end(), ProcessQuery(), and refresh_matview_datafill().
void ExecutorRewind | ( | QueryDesc * | queryDesc | ) |
Definition at line 612 of file execMain.c.
References Assert(), CMD_SELECT, EState::es_query_cxt, QueryDesc::estate, ExecReScan(), MemoryContextSwitchTo(), QueryDesc::operation, and QueryDesc::planstate.
Referenced by DoPortalRewind(), and PersistHoldablePortal().
void ExecutorRun | ( | QueryDesc * | queryDesc, |
ScanDirection | direction, | ||
uint64 | count | ||
) |
Definition at line 362 of file execMain.c.
References ExecutorRun_hook, and standard_ExecutorRun().
Referenced by _SPI_pquery(), DoCopyTo(), ExecCreateTableAs(), execute_sql_string(), ExplainOnePlan(), ParallelQueryMain(), PersistHoldablePortal(), PortalRunSelect(), postquel_getnext(), ProcessQuery(), and refresh_matview_datafill().
bool ExecutorStart | ( | QueryDesc * | queryDesc, |
int | eflags | ||
) |
Definition at line 125 of file execMain.c.
References ExecutorStart_hook, pgstat_report_query_id(), QueryDesc::plannedstmt, PlannedStmt::queryId, and standard_ExecutorStart().
Referenced by _SPI_pquery(), BeginCopyTo(), ExecCreateTableAs(), execute_sql_string(), ExecutorStartCachedPlan(), ExplainOnePlan(), ParallelQueryMain(), PortalStart(), postquel_start(), ProcessQuery(), and refresh_matview_datafill().
void ExecutorStartCachedPlan | ( | QueryDesc * | queryDesc, |
int | eflags, | ||
CachedPlanSource * | plansource, | ||
int | query_index | ||
) |
Definition at line 292 of file execMain.c.
References QueryDesc::cplan, elog, ERROR, EState::es_aborted, QueryDesc::estate, ExecutorEnd(), ExecutorStart(), QueryDesc::plannedstmt, QueryDesc::queryEnv, unlikely, and UpdateCachedPlan().
Referenced by _SPI_pquery(), ExplainOnePlan(), PortalStart(), and ProcessQuery().
void ExecWithCheckOptions | ( | WCOKind | kind, |
ResultRelInfo * | resultRelInfo, | ||
TupleTableSlot * | slot, | ||
EState * | estate | ||
) |
Definition at line 2189 of file execMain.c.
References bms_union(), build_attrmap_by_name_if_req(), ExprContext::ecxt_scantuple, elog, ereport, errcode(), errdetail(), errmsg(), ERROR, ExecBuildSlotValueDescription(), ExecGetInsertedCols(), ExecGetUpdatedCols(), ExecQual(), execute_attr_map_slot(), forboth, GetPerTupleExprContext, WithCheckOption::kind, lfirst, MakeTupleTableSlot(), WithCheckOption::polname, RelationGetDescr, RelationGetRelid, WithCheckOption::relname, ResultRelInfo::ri_RelationDesc, ResultRelInfo::ri_RootResultRelInfo, ResultRelInfo::ri_WithCheckOptionExprs, ResultRelInfo::ri_WithCheckOptions, TTSOpsVirtual, WCO_RLS_CONFLICT_CHECK, WCO_RLS_INSERT_CHECK, WCO_RLS_MERGE_DELETE_CHECK, WCO_RLS_MERGE_UPDATE_CHECK, WCO_RLS_UPDATE_CHECK, and WCO_VIEW_CHECK.
Referenced by ExecBatchInsert(), ExecInsert(), ExecMergeMatched(), ExecOnConflictUpdate(), ExecUpdateAct(), and ExecUpdateEpilogue().
TupleHashEntry FindTupleHashEntry | ( | TupleHashTable | hashtable, |
TupleTableSlot * | slot, | ||
ExprState * | eqcomp, | ||
ExprState * | hashexpr | ||
) |
Definition at line 379 of file execGrouping.c.
References TupleHashTableData::cur_eq_func, TupleHashTableData::hashtab, TupleHashTableData::in_hash_expr, TupleHashTableData::inputslot, sort-test::key, MemoryContextSwitchTo(), and TupleHashTableData::tempcxt.
Referenced by ExecHashSubPlan().
void FreeExecutorState | ( | EState * | estate | ) |
Definition at line 193 of file execUtils.c.
References DestroyPartitionDirectory(), EState::es_exprcontexts, EState::es_jit, EState::es_partition_directory, EState::es_query_cxt, FreeExprContext(), jit_release_context(), linitial, and MemoryContextDelete().
Referenced by afterTriggerInvokeEvents(), ATExecAddColumn(), ATRewriteTable(), check_default_partition_contents(), compute_expr_stats(), compute_index_stats(), CopyFrom(), EvalPlanQualEnd(), evaluate_expr(), ExecuteCallStmt(), ExecuteQuery(), ExecuteTruncateGuts(), ExplainExecuteQuery(), finish_edata(), freestate_cluster(), get_qual_for_range(), heapam_index_build_range_scan(), heapam_index_validate_scan(), IndexCheckExclusion(), make_build_data(), operator_predicate_proof(), plpgsql_inline_handler(), plpgsql_xact_cb(), standard_ExecutorEnd(), and validateDomainCheckConstraint().
void FreeExprContext | ( | ExprContext * | econtext, |
bool | isCommit | ||
) |
Definition at line 418 of file execUtils.c.
References ExprContext::ecxt_estate, ExprContext::ecxt_per_tuple_memory, EState::es_exprcontexts, list_delete_ptr(), MemoryContextDelete(), pfree(), and ShutdownExprContext().
Referenced by FreeExecutorState(), plpgsql_destroy_econtext(), and plpgsql_subxact_cb().
Datum GetAttributeByName | ( | HeapTupleHeader | tuple, |
const char * | attname, | ||
bool * | isNull | ||
) |
Definition at line 1063 of file execUtils.c.
References attname, elog, ERROR, heap_getattr(), HeapTupleHeaderGetDatumLength(), HeapTupleHeaderGetTypeId(), HeapTupleHeaderGetTypMod(), i, InvalidAttrNumber, InvalidOid, ItemPointerSetInvalid(), lookup_rowtype_tupdesc(), namestrcmp(), TupleDescData::natts, ReleaseTupleDesc, HeapTupleData::t_data, HeapTupleData::t_len, HeapTupleData::t_self, HeapTupleData::t_tableOid, and TupleDescAttr().
Referenced by c_overpaid(), and overpaid().
Datum GetAttributeByNum | ( | HeapTupleHeader | tuple, |
AttrNumber | attrno, | ||
bool * | isNull | ||
) |
Definition at line 1126 of file execUtils.c.
References AttributeNumberIsValid, elog, ERROR, heap_getattr(), HeapTupleHeaderGetDatumLength(), HeapTupleHeaderGetTypeId(), HeapTupleHeaderGetTypMod(), InvalidOid, ItemPointerSetInvalid(), lookup_rowtype_tupdesc(), ReleaseTupleDesc, HeapTupleData::t_data, HeapTupleData::t_len, HeapTupleData::t_self, and HeapTupleData::t_tableOid.
void InitResultRelInfo | ( | ResultRelInfo * | resultRelInfo, |
Relation | resultRelationDesc, | ||
Index | resultRelationIndex, | ||
ResultRelInfo * | partition_root_rri, | ||
int | instrument_options | ||
) |
Definition at line 1326 of file execMain.c.
References CopyTriggerDesc(), GetFdwRoutineForRelation(), InstrAlloc(), IsInplaceUpdateRelation(), MemSet, MERGE_WHEN_MATCHED, MERGE_WHEN_NOT_MATCHED_BY_SOURCE, MERGE_WHEN_NOT_MATCHED_BY_TARGET, NIL, TriggerDesc::numtriggers, palloc0(), RelationData::rd_rel, ResultRelInfo::ri_AllNullSlot, ResultRelInfo::ri_ChildToRootMap, ResultRelInfo::ri_ChildToRootMapValid, ResultRelInfo::ri_ConstraintExprs, ResultRelInfo::ri_CopyMultiInsertBuffer, ResultRelInfo::ri_extraUpdatedCols, ResultRelInfo::ri_FdwRoutine, ResultRelInfo::ri_FdwState, ResultRelInfo::ri_GeneratedExprsI, ResultRelInfo::ri_GeneratedExprsU, ResultRelInfo::ri_IndexRelationDescs, ResultRelInfo::ri_IndexRelationInfo, ResultRelInfo::ri_MergeActions, ResultRelInfo::ri_MergeJoinCondition, ResultRelInfo::ri_needLockTagTuple, ResultRelInfo::ri_newTupleSlot, ResultRelInfo::ri_NumIndices, ResultRelInfo::ri_oldTupleSlot, ResultRelInfo::ri_onConflict, ResultRelInfo::ri_onConflictArbiterIndexes, ResultRelInfo::ri_PartitionTupleSlot, ResultRelInfo::ri_projectNew, ResultRelInfo::ri_projectNewInfoValid, ResultRelInfo::ri_projectReturning, ResultRelInfo::ri_RangeTableIndex, ResultRelInfo::ri_RelationDesc, ResultRelInfo::ri_ReturningSlot, ResultRelInfo::ri_RootResultRelInfo, ResultRelInfo::ri_RootToChildMap, ResultRelInfo::ri_RootToChildMapValid, ResultRelInfo::ri_RowIdAttNo, ResultRelInfo::ri_TrigDesc, ResultRelInfo::ri_TrigFunctions, ResultRelInfo::ri_TrigInstrument, ResultRelInfo::ri_TrigNewSlot, ResultRelInfo::ri_TrigOldSlot, ResultRelInfo::ri_TrigWhenExprs, ResultRelInfo::ri_usesFdwDirectModify, RelationData::trigdesc, and ResultRelInfo::type.
Referenced by create_edata_for_relation(), ExecGetAncestorResultRels(), ExecGetTriggerResultRel(), ExecInitPartitionDispatchInfo(), ExecInitPartitionInfo(), ExecInitResultRelation(), and ExecuteTruncateGuts().
TupleHashEntry LookupTupleHashEntry | ( | TupleHashTable | hashtable, |
TupleTableSlot * | slot, | ||
bool * | isnew, | ||
uint32 * | hash | ||
) |
Definition at line 292 of file execGrouping.c.
References Assert(), TupleHashTableData::cur_eq_func, hash(), TupleHashEntryData::hash, TupleHashTableData::hashtab, TupleHashTableData::in_hash_expr, TupleHashTableData::inputslot, LookupTupleHashEntry_internal(), MemoryContextSwitchTo(), TupleHashTableData::tab_eq_func, TupleHashTableData::tab_hash_expr, TupleHashTableData::tempcxt, and TupleHashTableHash_internal().
Referenced by buildSubPlanHash(), ExecRecursiveUnion(), lookup_hash_entries(), and setop_fill_hash_table().
TupleHashEntry LookupTupleHashEntryHash | ( | TupleHashTable | hashtable, |
TupleTableSlot * | slot, | ||
bool * | isnew, | ||
uint32 | hash | ||
) |
Definition at line 347 of file execGrouping.c.
References Assert(), TupleHashTableData::cur_eq_func, hash(), TupleHashEntryData::hash, TupleHashTableData::in_hash_expr, TupleHashTableData::inputslot, LookupTupleHashEntry_internal(), MemoryContextSwitchTo(), TupleHashTableData::tab_eq_func, TupleHashTableData::tab_hash_expr, and TupleHashTableData::tempcxt.
Referenced by agg_refill_hash_table().
ExprContext * MakePerTupleExprContext | ( | EState * | estate | ) |
Definition at line 460 of file execUtils.c.
References CreateExprContext(), and EState::es_per_tuple_exprcontext.
Definition at line 507 of file execProcnode.c.
References CHECK_FOR_INTERRUPTS, check_stack_depth(), PlanState::chgParam, elog, ERROR, ExecReScan(), MultiExecBitmapAnd(), MultiExecBitmapIndexScan(), MultiExecBitmapOr(), MultiExecHash(), and nodeTag.
Referenced by BitmapTableScanSetup(), ExecHashJoinImpl(), MultiExecBitmapAnd(), and MultiExecBitmapOr().
void RegisterExprContextCallback | ( | ExprContext * | econtext, |
ExprContextCallbackFunction | function, | ||
Datum | arg | ||
) |
Definition at line 965 of file execUtils.c.
References arg, ExprContext_CB::arg, ExprContext::ecxt_callbacks, ExprContext::ecxt_per_query_memory, function, ExprContext_CB::function, MemoryContextAlloc(), and ExprContext_CB::next.
Referenced by AggRegisterCallback(), ExecMakeFunctionResultSet(), ExecPrepareTuplestoreResult(), fmgr_sql(), and init_MultiFuncCall().
bool RelationFindReplTupleByIndex | ( | Relation | rel, |
Oid | idxoid, | ||
LockTupleMode | lockmode, | ||
TupleTableSlot * | searchslot, | ||
TupleTableSlot * | outslot | ||
) |
Definition at line 179 of file execReplication.c.
References build_replindex_scan_key(), ExecMaterializeSlot(), ForwardScanDirection, GetActiveSnapshot(), GetCurrentCommandId(), GetLatestSnapshot(), GetRelationIdentityOrPK(), index_beginscan(), index_close(), index_endscan(), index_getnext_slot(), INDEX_MAX_KEYS, index_open(), index_rescan(), InitDirtySnapshot, LockWaitBlock, TupleDescData::natts, NoLock, palloc0(), PopActiveSnapshot(), PushActiveSnapshot(), RowExclusiveLock, should_refetch_tuple(), table_tuple_lock(), TransactionIdIsValid, TupleTableSlot::tts_tid, TupleTableSlot::tts_tupleDescriptor, tuples_equal(), XactLockTableWait(), XLTW_None, SnapshotData::xmax, and SnapshotData::xmin.
Referenced by FindReplTupleInLocalRel().
bool RelationFindReplTupleSeq | ( | Relation | rel, |
LockTupleMode | lockmode, | ||
TupleTableSlot * | searchslot, | ||
TupleTableSlot * | outslot | ||
) |
Definition at line 355 of file execReplication.c.
References Assert(), equalTupleDescs(), ExecCopySlot(), ExecDropSingleTupleTableSlot(), ForwardScanDirection, GetActiveSnapshot(), GetCurrentCommandId(), GetLatestSnapshot(), InitDirtySnapshot, LockWaitBlock, TupleDescData::natts, palloc0(), PG_USED_FOR_ASSERTS_ONLY, PopActiveSnapshot(), PushActiveSnapshot(), RelationGetDescr, should_refetch_tuple(), table_beginscan(), table_endscan(), table_rescan(), table_scan_getnextslot(), table_slot_create(), table_tuple_lock(), TransactionIdIsValid, TupleTableSlot::tts_tid, TupleTableSlot::tts_tupleDescriptor, tuples_equal(), XactLockTableWait(), XLTW_None, SnapshotData::xmax, and SnapshotData::xmin.
Referenced by FindReplTupleInLocalRel().
void ReScanExprContext | ( | ExprContext * | econtext | ) |
Definition at line 445 of file execUtils.c.
References ExprContext::ecxt_per_tuple_memory, MemoryContextReset(), and ShutdownExprContext().
Referenced by agg_refill_hash_table(), agg_retrieve_direct(), domain_check_input(), ExecEndAgg(), ExecReScan(), ExecReScanAgg(), and ValuesNext().
void ResetTupleHashTable | ( | TupleHashTable | hashtable | ) |
Definition at line 271 of file execGrouping.c.
References TupleHashTableData::hashtab.
Referenced by agg_refill_hash_table(), build_hash_tables(), buildSubPlanHash(), ExecReScanRecursiveUnion(), and ExecReScanSetOp().
void standard_ExecutorEnd | ( | QueryDesc * | queryDesc | ) |
Definition at line 544 of file execMain.c.
References AfterTriggerAbortQuery(), Assert(), EState::es_aborted, EState::es_crosscheck_snapshot, EState::es_finished, EState::es_parallel_workers_launched, EState::es_parallel_workers_to_launch, EState::es_query_cxt, EState::es_snapshot, EState::es_top_eflags, QueryDesc::estate, EXEC_FLAG_EXPLAIN_ONLY, EXEC_FLAG_SKIP_TRIGGERS, ExecEndPlan(), FreeExecutorState(), MemoryContextSwitchTo(), pgstat_update_parallel_workers_stats(), QueryDesc::planstate, QueryDesc::totaltime, QueryDesc::tupDesc, and UnregisterSnapshot().
Referenced by ExecutorEnd(), explain_ExecutorEnd(), and pgss_ExecutorEnd().
void standard_ExecutorFinish | ( | QueryDesc * | queryDesc | ) |
Definition at line 481 of file execMain.c.
References AfterTriggerEndQuery(), Assert(), EState::es_aborted, EState::es_finished, EState::es_query_cxt, EState::es_top_eflags, QueryDesc::estate, EXEC_FLAG_EXPLAIN_ONLY, EXEC_FLAG_SKIP_TRIGGERS, ExecPostprocessPlan(), InstrStartNode(), InstrStopNode(), MemoryContextSwitchTo(), and QueryDesc::totaltime.
Referenced by ExecutorFinish(), explain_ExecutorFinish(), and pgss_ExecutorFinish().
void standard_ExecutorRun | ( | QueryDesc * | queryDesc, |
ScanDirection | direction, | ||
uint64 | count | ||
) |
Definition at line 372 of file execMain.c.
References Assert(), CMD_SELECT, generate_unaccent_rules::dest, QueryDesc::dest, EState::es_aborted, EState::es_processed, EState::es_query_cxt, EState::es_snapshot, EState::es_top_eflags, EState::es_total_processed, QueryDesc::estate, EXEC_FLAG_EXPLAIN_ONLY, ExecutePlan(), GetActiveSnapshot(), PlannedStmt::hasReturning, InstrStartNode(), InstrStopNode(), MemoryContextSwitchTo(), QueryDesc::operation, QueryDesc::plannedstmt, ScanDirectionIsNoMovement, QueryDesc::totaltime, and QueryDesc::tupDesc.
Referenced by ExecutorRun(), explain_ExecutorRun(), and pgss_ExecutorRun().
bool standard_ExecutorStart | ( | QueryDesc * | queryDesc, |
int | eflags | ||
) |
Definition at line 148 of file execMain.c.
References AfterTriggerBeginQuery(), Assert(), CMD_DELETE, CMD_INSERT, CMD_MERGE, CMD_SELECT, CMD_UPDATE, CreateExecutorState(), QueryDesc::crosscheck_snapshot, elog, ERROR, EState::es_crosscheck_snapshot, EState::es_instrument, EState::es_jit_flags, EState::es_output_cid, EState::es_param_exec_vals, EState::es_param_list_info, EState::es_query_cxt, EState::es_queryEnv, EState::es_snapshot, EState::es_sourceText, EState::es_top_eflags, QueryDesc::estate, EXEC_FLAG_EXPLAIN_ONLY, EXEC_FLAG_SKIP_TRIGGERS, ExecCheckXactReadOnly(), ExecPlanStillValid(), GetActiveSnapshot(), GetCurrentCommandId(), PlannedStmt::hasModifyingCTE, InitPlan(), QueryDesc::instrument_options, IsInParallelMode(), PlannedStmt::jitFlags, list_length(), MemoryContextSwitchTo(), NIL, QueryDesc::operation, palloc0(), PlannedStmt::paramExecTypes, QueryDesc::params, QueryDesc::plannedstmt, QueryDesc::queryEnv, RegisterSnapshot(), PlannedStmt::rowMarks, QueryDesc::snapshot, QueryDesc::sourceText, and XactReadOnly.
Referenced by ExecutorStart(), explain_ExecutorStart(), and pgss_ExecutorStart().
uint32 TupleHashTableHash | ( | TupleHashTable | hashtable, |
TupleTableSlot * | slot | ||
) |
Definition at line 324 of file execGrouping.c.
References hash(), TupleHashTableData::hashtab, TupleHashTableData::in_hash_expr, TupleHashTableData::inputslot, MemoryContextSwitchTo(), TupleHashTableData::tab_hash_expr, TupleHashTableData::tempcxt, and TupleHashTableHash_internal().
void UnregisterExprContextCallback | ( | ExprContext * | econtext, |
ExprContextCallbackFunction | function, | ||
Datum | arg | ||
) |
Definition at line 991 of file execUtils.c.
References arg, ExprContext_CB::arg, ExprContext::ecxt_callbacks, function, ExprContext_CB::function, ExprContext_CB::next, and pfree().
Referenced by end_MultiFuncCall(), and fmgr_sql().
Definition at line 912 of file execUtils.c.
References Plan::allParam, bms_intersect(), bms_join(), PlanState::chgParam, and PlanState::plan.
Referenced by ExecReScan(), ExecReScanAppend(), ExecReScanBitmapAnd(), ExecReScanBitmapOr(), ExecReScanMergeAppend(), and ExecReScanSubqueryScan().
|
extern |
Definition at line 76 of file execMain.c.
Referenced by _PG_init(), and ExecCheckPermissions().
|
extern |
Definition at line 73 of file execMain.c.
Referenced by _PG_init(), and ExecutorEnd().
|
extern |
Definition at line 72 of file execMain.c.
Referenced by _PG_init(), and ExecutorFinish().
|
extern |
Definition at line 71 of file execMain.c.
Referenced by _PG_init(), and ExecutorRun().
|
extern |
Definition at line 70 of file execMain.c.
Referenced by _PG_init(), and ExecutorStart().