|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <math.h>#include "access/htup_details.h"#include "executor/executor.h"#include "executor/nodeSubplan.h"#include "miscadmin.h"#include "nodes/makefuncs.h"#include "nodes/nodeFuncs.h"#include "utils/array.h"#include "utils/lsyscache.h"#include "utils/memutils.h"
Go to the source code of this file.
|
static |
Definition at line 476 of file nodeSubplan.c.
References ANY_SUBLINK, Assert(), BuildTupleHashTable(), SubPlanState::descRight, ExprContext::ecxt_param_exec_vals, ExprContext::ecxt_per_query_memory, ExprContext::ecxt_per_tuple_memory, EState::es_query_cxt, ExecClearTuple(), ParamExecData::execPlan, ExecProcNode(), ExecProject(), ExecReScan(), SubPlanState::hashnulls, SubPlanState::hashtable, SubPlanState::havehashrows, SubPlanState::havenullrows, SubPlanState::innerecontext, ParamExecData::isnull, SubPlanState::keyColIdx, lfirst_int, LookupTupleHashEntry(), MemoryContextSwitchTo(), SubPlanState::numCols, SubPlan::paramIds, SubPlanState::parent, ProjectionInfo::pi_state, PlanState::plan, Plan::plan_rows, SubPlanState::planstate, SubPlanState::projRight, ResetExprContext, ResetTupleHashTable(), ExprState::resultslot, slot_getattr(), slotNoNulls(), PlanState::state, SubPlan::subLinkType, SubPlanState::subplan, SubPlanState::tab_collations, SubPlanState::tab_eq_funcoids, SubPlanState::tab_hash_funcs, TTSOpsVirtual, TupIsNull, SubPlanState::tuplesContext, SubPlan::unknownEqFalse, and ParamExecData::value.
Referenced by ExecHashSubPlan().
Definition at line 638 of file nodeSubplan.c.
References EstimateTupleHashTableSpace().
Referenced by subpath_is_hashable(), and subplan_is_hashable().
|
static |
Definition at line 100 of file nodeSubplan.c.
References SubPlan::args, BoolGetDatum(), buildSubPlanHash(), PlanState::chgParam, SubPlanState::cur_eq_comp, SubPlanState::cur_eq_funcs, elog, ERROR, ExecClearTuple(), ExecProject(), findPartialMatch(), FindTupleHashEntry(), SubPlanState::hashnulls, SubPlanState::hashtable, SubPlanState::havehashrows, SubPlanState::havenullrows, SubPlanState::innerecontext, SubPlanState::lhs_hash_expr, NIL, SubPlan::parParam, ProjectionInfo::pi_exprContext, SubPlanState::planstate, SubPlanState::projLeft, ResetExprContext, slotAllNulls(), slotNoNulls(), and SubPlanState::subplan.
Referenced by ExecSubPlan().
| SubPlanState * ExecInitSubPlan | ( | SubPlan * | subplan, |
| PlanState * | parent | ||
| ) |
Definition at line 852 of file nodeSubplan.c.
References ALLOCSET_DEFAULT_SIZES, OpExpr::args, Assert(), BumpContextCreate(), castNode, CreateExprContext(), CTE_SUBLINK, SubPlanState::cur_eq_comp, SubPlanState::cur_eq_funcs, SubPlanState::curArray, CurrentMemoryContext, SubPlanState::curTuple, SubPlanState::descRight, elog, ERROR, EState::es_param_exec_vals, EState::es_subplanstates, ExecBuildGroupingEqual(), ExecBuildHash32FromAttrs(), ExecBuildProjectionInfo(), ExecInitExpr(), ExecInitExtraTupleSlot(), ParamExecData::execPlan, ExecTypeFromTL(), fmgr_info(), fmgr_info_set_expr, get_compatible_hash_operators(), get_op_hash_functions(), get_opcode(), SubPlanState::hashnulls, SubPlanState::hashtable, i, SubPlanState::innerecontext, is_andclause(), IsA, SubPlanState::keyColIdx, lappend(), lfirst_int, lfirst_node, SubPlanState::lhs_hash_expr, linitial, list_length(), list_make1, list_nth(), lsecond, makeNode, makeTargetEntry(), NIL, nodeTag, SubPlanState::numCols, OpExpr::opno, palloc(), SubPlanState::parent, SubPlan::parParam, SubPlan::plan_id, SubPlan::plan_name, SubPlanState::planstate, PointerGetDatum(), SubPlanState::projLeft, SubPlanState::projRight, SubPlan::setParam, PlanState::state, SubPlan::subLinkType, SubPlanState::subplan, SubPlanState::tab_collations, SubPlanState::tab_eq_funcoids, SubPlanState::tab_hash_funcs, SubPlanState::testexpr, SubPlan::testexpr, TTSOpsMinimalTuple, TTSOpsVirtual, SubPlanState::tuplesContext, and SubPlan::useHashTable.
Referenced by ExecInitNode(), and ExecInitSubPlanExpr().
| void ExecReScanSetParamPlan | ( | SubPlanState * | node, |
| PlanState * | parent | ||
| ) |
Definition at line 1319 of file nodeSubplan.c.
References bms_add_member(), bms_is_empty, PlanState::chgParam, CTE_SUBLINK, elog, ERROR, EState::es_param_exec_vals, ParamExecData::execPlan, Plan::extParam, lfirst_int, NIL, SubPlan::parParam, PlanState::plan, SubPlanState::planstate, SubPlan::setParam, PlanState::state, SubPlan::subLinkType, and SubPlanState::subplan.
Referenced by ExecReScan().
|
static |
Definition at line 203 of file nodeSubplan.c.
References accumArrayResultAny(), ALL_SUBLINK, ANY_SUBLINK, ARRAY_SUBLINK, Assert(), bms_add_member(), BoolGetDatum(), PlanState::chgParam, CurrentMemoryContext, SubPlanState::curTuple, DatumGetBool(), ExprContext::ecxt_param_exec_vals, ExprContext::ecxt_per_query_memory, ereport, errcode(), errmsg(), ERROR, ExecCopySlotHeapTuple(), ExecEvalExprSwitchContext(), ParamExecData::execPlan, ExecProcNode(), ExecReScan(), EXISTS_SUBLINK, EXPR_SUBLINK, SubPlan::firstColType, heap_freetuple(), heap_getattr(), initArrayResultAny(), ParamExecData::isnull, lfirst_int, makeArrayResultAny(), MemoryContextSwitchTo(), MULTIEXPR_SUBLINK, SubPlan::paramIds, SubPlan::parParam, SubPlanState::planstate, ROWCOMPARE_SUBLINK, SubPlan::setParam, slot_getattr(), SubPlan::subLinkType, SubPlanState::subplan, SubPlanState::testexpr, TupleTableSlot::tts_tupleDescriptor, TupIsNull, TupleDescAttr(), and ParamExecData::value.
Referenced by ExecSubPlan().
| void ExecSetParamPlan | ( | SubPlanState * | node, |
| ExprContext * | econtext | ||
| ) |
Definition at line 1120 of file nodeSubplan.c.
References accumArrayResultAny(), ALL_SUBLINK, ANY_SUBLINK, SubPlan::args, ARRAY_SUBLINK, Assert(), BoolGetDatum(), CTE_SUBLINK, SubPlanState::curArray, CurrentMemoryContext, SubPlanState::curTuple, DatumGetPointer(), ExprContext::ecxt_param_exec_vals, ExprContext::ecxt_per_query_memory, elog, ereport, errcode(), errmsg(), ERROR, EState::es_direction, ExecCopySlotHeapTuple(), ParamExecData::execPlan, ExecProcNode(), EXISTS_SUBLINK, EXPR_SUBLINK, SubPlan::firstColType, ForwardScanDirection, heap_freetuple(), heap_getattr(), i, initArrayResultAny(), ParamExecData::isnull, lfirst_int, linitial_int, makeArrayResultAny(), MemoryContextSwitchTo(), MULTIEXPR_SUBLINK, SubPlan::parParam, pfree(), SubPlanState::planstate, PointerGetDatum(), ROWCOMPARE_SUBLINK, SubPlan::setParam, slot_getattr(), PlanState::state, SubPlan::subLinkType, SubPlanState::subplan, TupleTableSlot::tts_tupleDescriptor, TupIsNull, TupleDescAttr(), and ParamExecData::value.
Referenced by ExecEvalParamExec(), and ExecSetParamPlanMulti().
| void ExecSetParamPlanMulti | ( | const Bitmapset * | params, |
| ExprContext * | econtext | ||
| ) |
Definition at line 1296 of file nodeSubplan.c.
References Assert(), bms_next_member(), ExprContext::ecxt_param_exec_vals, ParamExecData::execPlan, and ExecSetParamPlan().
Referenced by EvalPlanQualBegin(), EvalPlanQualStart(), ExecInitParallelPlan(), and ExecParallelReinitialize().
| Datum ExecSubPlan | ( | SubPlanState * | node, |
| ExprContext * | econtext, | ||
| bool * | isNull | ||
| ) |
Definition at line 61 of file nodeSubplan.c.
References CHECK_FOR_INTERRUPTS, CTE_SUBLINK, elog, ERROR, EState::es_direction, ExecHashSubPlan(), ExecScanSubPlan(), ForwardScanDirection, MULTIEXPR_SUBLINK, NIL, SubPlanState::planstate, SubPlan::setParam, PlanState::state, SubPlan::subLinkType, SubPlanState::subplan, and SubPlan::useHashTable.
Referenced by ExecEvalSubPlan().
|
static |
Definition at line 700 of file nodeSubplan.c.
References DatumGetBool(), FunctionCall2Coll(), i, MemoryContextReset(), MemoryContextSwitchTo(), and slot_getattr().
Referenced by findPartialMatch().
|
static |
Definition at line 769 of file nodeSubplan.c.
References CHECK_FOR_INTERRUPTS, ExecStoreMinimalTuple(), execTuplesUnequal(), InitTupleHashIterator, TupleHashTableData::keyColIdx, TupleHashTableData::numCols, ScanTupleHashTable, TupleHashTableData::tab_collations, TupleHashTableData::tableslot, TupleHashTableData::tempcxt, TermTupleHashIterator, and TupleHashEntryGetTuple().
Referenced by ExecHashSubPlan().
|
static |
Definition at line 804 of file nodeSubplan.c.
References i, TupleDescData::natts, slot_attisnull(), and TupleTableSlot::tts_tupleDescriptor.
Referenced by ExecHashSubPlan().
|
static |
Definition at line 824 of file nodeSubplan.c.
References i, TupleDescData::natts, slot_attisnull(), and TupleTableSlot::tts_tupleDescriptor.
Referenced by buildSubPlanHash(), and ExecHashSubPlan().