PostgreSQL Source Code git master
|
#include "postgres.h"
#include "access/nbtree.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
#include "executor/execExpr.h"
#include "executor/nodeSubplan.h"
#include "funcapi.h"
#include "jit/jit.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "nodes/subscripting.h"
#include "optimizer/optimizer.h"
#include "pgstat.h"
#include "utils/acl.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/jsonfuncs.h"
#include "utils/jsonpath.h"
#include "utils/lsyscache.h"
#include "utils/typcache.h"
Go to the source code of this file.
Data Structures | |
struct | ExprSetupInfo |
Typedefs | |
typedef struct ExprSetupInfo | ExprSetupInfo |
typedef struct ExprSetupInfo ExprSetupInfo |
ExprState * ExecBuildAggTrans | ( | AggState * | aggstate, |
AggStatePerPhase | phase, | ||
bool | doSort, | ||
bool | doHash, | ||
bool | nullcheck | ||
) |
Definition at line 3661 of file execExpr.c.
References ExprEvalStep::agg_deserialize, AGG_HASHED, ExprEvalStep::agg_presorted_distinctcheck, ExprEvalStep::agg_strict_input_check, Aggref::aggdirectargs, Aggref::aggdistinct, Aggref::aggfilter, Aggref::aggorder, AggStatePerTransData::aggref, AggStatePerTransData::aggsortrequired, AggState::aggsplit, AggState::aggstrategy, arg, ExprEvalStep::args, FunctionCallInfoBaseData::args, Aggref::args, Assert, bail, ExprEvalStep::d, AggStatePerTransData::deserialfn, AggStatePerTransData::deserialfn_fcinfo, AggStatePerTransData::deserialfn_oid, DO_AGGSPLIT_COMBINE, EEOP_AGG_DESERIALIZE, EEOP_AGG_PRESORTED_DISTINCT_MULTI, EEOP_AGG_PRESORTED_DISTINCT_SINGLE, EEOP_AGG_STRICT_DESERIALIZE, EEOP_AGG_STRICT_INPUT_CHECK_ARGS, EEOP_AGG_STRICT_INPUT_CHECK_NULLS, EEOP_DONE, EEOP_JUMP_IF_NOT_TRUE, ExecBuildAggTransCall(), ExecInitExprRec(), ExecPushExprSetupSteps(), ExecReadyExpr(), TargetEntry::expr, expr_setup_walker(), ExprEvalPushStep(), ExprEvalStep::fcinfo_data, FunctionCallInfoBaseData::flinfo, FmgrInfo::fn_strict, NullableDatum::isnull, ExprEvalStep::jump, ExprEvalStep::jumpdistinct, ExprEvalStep::jumpdone, ExprEvalStep::jumpnull, lappend_int(), lfirst, lfirst_int, linitial, list_length(), makeNode, Max, AggState::maxsets, ExprEvalStep::nargs, NIL, ExprEvalStep::nulls, AggState::num_hashes, AggStatePerTransData::numDistinctCols, AggStatePerTransData::numInputs, AggStatePerPhaseData::numsets, AggStatePerTransData::numSortCols, AggState::numtrans, AggStatePerTransData::numTransInputs, OidIsValid, ExprEvalStep::opcode, ExprEvalStep::pertrans, AggState::pertrans, PointerGetDatum(), ScanState::ps, ExprEvalStep::resnull, ExprEvalStep::resvalue, AggStatePerTransData::sortslot, AggState::ss, AggStatePerTransData::transfn_fcinfo, TupleTableSlot::tts_isnull, TupleTableSlot::tts_values, NullableDatum::value, and values.
Referenced by ExecInitAgg(), and hashagg_recompile_expressions().
|
static |
Definition at line 4000 of file execExpr.c.
References ExprEvalStep::agg_plain_pergroup_nullcheck, ExprEvalStep::agg_trans, ExprEvalStep::aggcontext, AggState::aggcontexts, AggStatePerTransData::aggsortrequired, Assert, ExprEvalStep::d, EEOP_AGG_ORDERED_TRANS_DATUM, EEOP_AGG_ORDERED_TRANS_TUPLE, EEOP_AGG_PLAIN_PERGROUP_NULLCHECK, EEOP_AGG_PLAIN_TRANS_BYREF, EEOP_AGG_PLAIN_TRANS_BYVAL, EEOP_AGG_PLAIN_TRANS_INIT_STRICT_BYREF, EEOP_AGG_PLAIN_TRANS_INIT_STRICT_BYVAL, EEOP_AGG_PLAIN_TRANS_STRICT_BYREF, EEOP_AGG_PLAIN_TRANS_STRICT_BYVAL, ExprEvalPushStep(), FunctionCallInfoBaseData::flinfo, FmgrInfo::fn_strict, AggState::hashcontext, AggStatePerTransData::initValueIsNull, ExprEvalStep::jumpnull, AggStatePerTransData::numInputs, ExprEvalStep::opcode, ExprEvalStep::pertrans, ExprEvalStep::setno, ExprEvalStep::setoff, ExprEvalStep::transno, and AggStatePerTransData::transtypeByVal.
Referenced by ExecBuildAggTrans().
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 4446 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, 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 4281 of file execExpr.c.
References FunctionCallInfoBaseData::args, Assert, ExprEvalStep::d, EEOP_DONE, 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 4122 of file execExpr.c.
References FunctionCallInfoBaseData::args, Assert, attnum, ExprEvalStep::attnum, ExprEvalStep::d, EEOP_DONE, 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 4605 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, 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, 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().
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, 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().
|
static |
Definition at line 3046 of file execExpr.c.
References Assert, ExprEvalStep::d, EEOP_INNER_FETCHSOME, EEOP_NEW_FETCHSOME, EEOP_OLD_FETCHSOME, EEOP_OUTER_FETCHSOME, EEOP_SCAN_FETCHSOME, ExecGetResultSlotOps(), ExecGetResultType(), ExprEvalStep::fetch, ExprEvalStep::fixed, PlanState::innerops, PlanState::inneropsfixed, PlanState::inneropsset, innerPlanState, ExprEvalStep::kind, ExprEvalStep::known_desc, ExprEvalStep::opcode, PlanState::outerops, PlanState::outeropsfixed, PlanState::outeropsset, outerPlanState, PlanState::scandesc, PlanState::scanops, PlanState::scanopsfixed, PlanState::scanopsset, and TTSOpsVirtual.
Referenced by ExecBuildGroupingEqual(), ExecBuildHash32FromAttrs(), ExecBuildParamSetEqual(), and ExecPushExprSetupSteps().
Definition at line 2865 of file execExpr.c.
References ExecPushExprSetupSteps(), expr_setup_walker(), and NIL.
Referenced by ExecBuildHash32Expr(), ExecBuildProjectionInfo(), ExecInitExpr(), ExecInitExprWithParams(), and ExecInitQual().
Definition at line 315 of file execExpr.c.
References Assert, ExecInitExpr(), IsA, make_ands_explicit(), and NIL.
Referenced by ExecPrepareCheck().
|
static |
Definition at line 3506 of file execExpr.c.
References CoerceToDomain::arg, DomainConstraintState::check_expr, ExprEvalStep::checknull, ExprEvalStep::checkvalue, ExprEvalStep::constraintname, DomainConstraintRef::constraints, DomainConstraintState::constrainttype, CurrentMemoryContext, ExprEvalStep::d, DOM_CONSTRAINT_CHECK, DOM_CONSTRAINT_NOTNULL, ExprEvalStep::domaincheck, EEOP_DOMAIN_CHECK, EEOP_DOMAIN_NOTNULL, EEOP_MAKE_READONLY, elog, ERROR, ExprEvalStep::escontext, ExecInitExprRec(), ExprEvalPushStep(), get_typlen(), InitDomainConstraintRef(), ExprEvalStep::isnull, lfirst, ExprEvalStep::make_readonly, DomainConstraintState::name, ExprEvalStep::opcode, palloc(), ExprEvalStep::resnull, ExprEvalStep::resulttype, CoerceToDomain::resulttype, ExprEvalStep::resvalue, and ExprEvalStep::value.
Referenced by ExecInitExprRec().
Definition at line 143 of file execExpr.c.
References EEOP_DONE, 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().
Definition at line 919 of file execExpr.c.
References ACL_EXECUTE, aclcheck_error(), ACLCHECK_OK, WindowFuncExprState::aggfilter, WindowFunc::aggfilter, ExprEvalStep::aggno, ExprEvalStep::aggref, AggState::aggs, ExprEvalStep::amstate, AND_EXPR, ExprEvalStep::anynull, arg, FieldSelect::arg, FieldStore::arg, RelabelType::arg, CoerceViaIO::arg, ArrayCoerceExpr::arg, CaseExpr::arg, NullTest::arg, BooleanTest::arg, JsonConstructorExprState::arg_nulls, JsonConstructorExprState::arg_type_cache, JsonConstructorExprState::arg_types, JsonConstructorExprState::arg_values, ExprEvalStep::argnull, generate_unaccent_rules::args, FunctionCallInfoBaseData::args, WindowFuncExprState::args, WindowFunc::args, FuncExpr::args, OpExpr::args, ScalarArrayOpExpr::args, BoolExpr::args, CaseExpr::args, RowExpr::args, CoalesceExpr::args, MinMaxExpr::args, XmlExpr::args, JsonConstructorExpr::args, ExprEvalStep::argvalue, ExprEvalStep::arraycoerce, ExprEvalStep::arrayexpr, Assert, ExprEvalStep::attnum, BlessTupleDesc(), ExprEvalStep::boolexpr, BoolExpr::boolop, BooleanTest::booltesttype, BTORDER_PROC, ExprEvalRowtypeCache::cacheptr, ExprEvalStep::casetest, castNode, JsonConstructorExprState::category, check_stack_depth(), ExprEvalStep::clauses, CMD_MERGE, TypeCacheEntry::cmp_proc, ExprEvalStep::cmptype, RowCompareExpr::cmptype, JsonConstructorExpr::coercion, JsonConstructorExprState::constructor, ExprEvalStep::constval, FunctionCallInfoBaseData::context, convert(), ExprEvalStep::convert_rowtype, ExprEvalStep::d, CaseExpr::defresult, EEO_FLAG_HAS_NEW, EEO_FLAG_HAS_OLD, EEO_FLAG_NEW_IS_NULL, EEO_FLAG_OLD_IS_NULL, EEOP_AGGREF, EEOP_ARRAYCOERCE, EEOP_ARRAYEXPR, EEOP_BOOL_AND_STEP, EEOP_BOOL_AND_STEP_FIRST, EEOP_BOOL_AND_STEP_LAST, EEOP_BOOL_NOT_STEP, EEOP_BOOL_OR_STEP, EEOP_BOOL_OR_STEP_FIRST, EEOP_BOOL_OR_STEP_LAST, EEOP_BOOLTEST_IS_FALSE, EEOP_BOOLTEST_IS_NOT_FALSE, EEOP_BOOLTEST_IS_NOT_TRUE, EEOP_BOOLTEST_IS_TRUE, EEOP_CASE_TESTVAL, EEOP_CONST, EEOP_CONVERT_ROWTYPE, EEOP_CURRENTOFEXPR, EEOP_DISTINCT, EEOP_DOMAIN_TESTVAL, EEOP_DONE, EEOP_FIELDSELECT, EEOP_FIELDSTORE_DEFORM, EEOP_FIELDSTORE_FORM, EEOP_GROUPING_FUNC, EEOP_HASHED_SCALARARRAYOP, EEOP_INNER_SYSVAR, EEOP_INNER_VAR, EEOP_IOCOERCE, EEOP_IOCOERCE_SAFE, EEOP_IS_JSON, EEOP_JSON_CONSTRUCTOR, EEOP_JUMP, EEOP_JUMP_IF_NOT_NULL, EEOP_JUMP_IF_NOT_TRUE, EEOP_MAKE_READONLY, EEOP_MERGE_SUPPORT_FUNC, EEOP_MINMAX, EEOP_NEW_SYSVAR, EEOP_NEW_VAR, EEOP_NEXTVALUEEXPR, EEOP_NULLIF, EEOP_NULLTEST_ISNOTNULL, EEOP_NULLTEST_ISNULL, EEOP_NULLTEST_ROWISNOTNULL, EEOP_NULLTEST_ROWISNULL, EEOP_OLD_SYSVAR, EEOP_OLD_VAR, EEOP_OUTER_SYSVAR, EEOP_OUTER_VAR, EEOP_PARAM_EXEC, EEOP_PARAM_EXTERN, EEOP_RETURNINGEXPR, EEOP_ROW, EEOP_ROWCOMPARE_FINAL, EEOP_ROWCOMPARE_STEP, EEOP_SCALARARRAYOP, EEOP_SCAN_SYSVAR, EEOP_SCAN_VAR, EEOP_SQLVALUEFUNCTION, EEOP_WINDOW_FUNC, EEOP_XMLEXPR, ExprEvalStep::elemalign, ExprEvalStep::elembyval, ExprEvalStep::element_type, ArrayExpr::elements, ArrayCoerceExpr::elemexpr, ExprEvalStep::elemexprstate, ExprEvalStep::elemlength, ExprEvalStep::elemnulls, ExprEvalStep::elemtype, ExprEvalStep::elemvalues, elog, ereport, errcode(), errmsg(), ERROR, ExecInitCoerceToDomain(), ExecInitExpr(), ExecInitExprList(), ExecInitExprRec(), ExecInitFunc(), ExecInitJsonExpr(), ExecInitSubPlanExpr(), ExecInitSubscriptingRef(), ExecInitWholeRowVar(), ExecReadyExpr(), ExecTypeFromExprList(), ExecTypeSetColNames(), ExprState::expr, JsonIsPredicate::expr, ExprEvalPushStep(), exprType(), ExprState::ext_params, ExprEvalStep::fcinfo_data, ExprEvalStep::fcinfo_data_in, ExprEvalStep::fcinfo_data_out, ExprEvalStep::fieldnum, FieldSelect::fieldnum, ExprEvalStep::fieldselect, ExprEvalStep::fieldstore, ExprEvalStep::finfo, ExprEvalStep::finfo_in, ExprEvalStep::finfo_out, fmgr_info(), fmgr_info_set_expr, ExprEvalStep::fn_addr, FmgrInfo::fn_addr, forboth, forfive, JsonReturning::format, JsonFormat::format_type, format_type_be(), JsonValueExpr::formatted_expr, JsonExpr::formatted_expr, ExprEvalStep::fstore, ExprEvalStep::func, JsonConstructorExpr::func, FuncExpr::funcid, WindowAggState::funcs, get_element_type(), get_func_name(), get_op_opfamily_properties(), get_opfamily_proc(), get_typlen(), get_typlenbyvalalign(), getTypeInputInfo(), getTypeOutputInfo(), GetUserId(), ExprEvalStep::grouping_func, Agg::groupingSets, ExprEvalStep::hashedscalararrayop, i, ExprEvalStep::incache, ExprEvalStep::inclause, InitFunctionCallInfoData, INNER_VAR, ExprState::innermost_casenull, ExprState::innermost_caseval, ExprEvalStep::inputtype, Int32GetDatum(), InvalidAttrNumber, InvalidOid, InvokeFunctionExecuteHook, ExprEvalStep::iocoerce, IS_FALSE, ExprEvalStep::is_json, IS_NOT_FALSE, IS_NOT_NULL, IS_NOT_TRUE, IS_NOT_UNKNOWN, IS_NULL, IS_TRUE, IS_UNKNOWN, IsA, ExprEvalStep::isnull, NullableDatum::isnull, ExprEvalStep::jcstate, JS_FORMAT_JSONB, JSCTOR_JSON_PARSE, JSCTOR_JSON_SCALAR, JSCTOR_JSON_SERIALIZE, json_categorize_type(), ExprEvalStep::json_constructor, JSON_TABLE_OP, ExprEvalStep::jump, ExprEvalStep::jumpdone, ExprEvalStep::jumpnull, lappend(), lappend_int(), RowCompareExpr::largs, lfirst, lfirst_int, lfirst_oid, linitial, list_length(), lookup_rowtype_tupdesc(), lookup_rowtype_tupdesc_copy(), lookup_type_cache(), lsecond, ExprEvalStep::make_readonly, ExprEvalStep::make_ro, makeNode, makeNullConst(), ExprEvalStep::map, Max, ExprEvalStep::minmax, ExprEvalStep::multidims, MULTIEXPR_SUBLINK, ExprEvalStep::named_argnull, XmlExpr::named_args, ExprEvalStep::named_argvalue, JsonConstructorExprState::nargs, TupleDescData::natts, ExprEvalStep::ncolumns, ExprEvalStep::nelems, FieldStore::newvals, ExprEvalStep::nextvalueexpr, NIL, nodeTag, NOT_EXPR, ExprEvalStep::nullflag, ExprEvalStep::nulls, ExprEvalStep::nulltest_row, NullTest::nulltesttype, WindowAggState::numaggs, WindowAggState::numfuncs, object_aclcheck(), OBJECT_FUNCTION, ObjectIdGetDatum(), OidIsValid, ExprEvalStep::op, MinMaxExpr::op, JsonExpr::op, ExprEvalStep::opcode, OR_EXPR, ExprEvalStep::outcache, OUTER_VAR, JsonConstructorExprState::outfuncid, ExprEvalStep::outputtype, palloc(), palloc0(), ExprEvalStep::param, PARAM_EXEC, PARAM_EXTERN, ParamListInfoData::paramCompile, ExprEvalStep::paramid, Param::paramid, Param::paramkind, ExprEvalStep::paramtype, Param::paramtype, ExprState::parent, ExprEvalStep::pred, RowCompareExpr::rargs, JsonValueExpr::raw_expr, ReleaseTupleDesc, ExprEvalStep::resnull, ExprState::resnull, ExprEvalStep::resultelemtype, ExprEvalStep::resulttype, CoerceViaIO::resulttype, ArrayCoerceExpr::resulttype, ExprEvalStep::resvalue, ExprState::resvalue, ReturningExpr::retexpr, ReturningExpr::retold, JsonConstructorExpr::returning, ExprEvalStep::returningexpr, ExprEvalStep::row, ExprEvalStep::rowcache, ExprEvalStep::rowcompare_final, ExprEvalStep::rowcompare_step, ExprEvalStep::saop, ExprEvalStep::scalararrayop, ExprEvalStep::seqid, NextValueExpr::seqid, ExprEvalStep::seqtypid, SizeForFunctionCallInfo, ExprEvalStep::sqlvaluefunction, ExprState::steps, ExprState::steps_len, SubPlan::subLinkType, ExprEvalStep::svf, ExprEvalStep::tupdesc, TupleDescAttr(), JsonConstructorExpr::type, TYPECACHE_CMP_PROC, NextValueExpr::typeId, JsonConstructorExpr::unique, ExprEvalStep::useOr, ScalarArrayOpExpr::useOr, ExprEvalStep::value, NullableDatum::value, values, ExprEvalStep::values, ExprEvalStep::var, VAR_RETURNING_DEFAULT, VAR_RETURNING_NEW, VAR_RETURNING_OLD, ExprEvalStep::varreturningtype, ExprEvalStep::vartype, ExprEvalStep::wfstate, WindowFuncExprState::wfunc, ExprEvalStep::window_func, ExprEvalStep::xexpr, and ExprEvalStep::xmlexpr.
Referenced by ExecBuildAggTrans(), ExecBuildHash32Expr(), ExecBuildProjectionInfo(), ExecBuildUpdateProjection(), ExecInitCoerceToDomain(), ExecInitExpr(), ExecInitExprRec(), ExecInitExprWithParams(), ExecInitFunc(), ExecInitJsonExpr(), ExecInitQual(), ExecInitSubPlanExpr(), and ExecInitSubscriptingRef().
ExprState * ExecInitExprWithParams | ( | Expr * | node, |
ParamListInfo | ext_params | ||
) |
Definition at line 180 of file execExpr.c.
References EEOP_DONE, ExecCreateExprSetupSteps(), ExecInitExprRec(), ExecReadyExpr(), ExprEvalPushStep(), makeNode, and ExprEvalStep::opcode.
Referenced by exec_eval_simple_expr(), and InitPartitionPruneContext().
|
static |
Definition at line 2696 of file execExpr.c.
References ACL_EXECUTE, aclcheck_error(), ACLCHECK_OK, arg, generate_unaccent_rules::args, FunctionCallInfoBaseData::args, ExprEvalStep::d, EEOP_FUNCEXPR, EEOP_FUNCEXPR_FUSAGE, EEOP_FUNCEXPR_STRICT, EEOP_FUNCEXPR_STRICT_FUSAGE, ereport, errcode(), errmsg(), errmsg_plural(), ERROR, ExecInitExprRec(), executor_errposition(), exprLocation(), ExprEvalStep::fcinfo_data, ExprEvalStep::finfo, fmgr_info(), fmgr_info_set_expr, ExprEvalStep::fn_addr, FmgrInfo::fn_addr, FmgrInfo::fn_retset, FmgrInfo::fn_strict, ExprEvalStep::func, FUNC_MAX_ARGS, get_func_name(), GetUserId(), InitFunctionCallInfoData, InvokeFunctionExecuteHook, IsA, NullableDatum::isnull, lfirst, list_length(), ExprEvalStep::nargs, object_aclcheck(), OBJECT_FUNCTION, ExprEvalStep::opcode, palloc0(), SizeForFunctionCallInfo, and NullableDatum::value.
Referenced by ExecInitExprRec().
|
static |
Definition at line 5031 of file execExpr.c.
References ExprEvalStep::d, DomainHasConstraints(), EEOP_JSONEXPR_COERCION, ExprEvalStep::escontext, ExprEvalStep::exists_cast_to_int, ExprEvalStep::exists_check_domain, ExprEvalStep::exists_coerce, ExprEvalPushStep(), getBaseType(), ExprEvalStep::json_coercion_cache, ExprEvalStep::jsonexpr_coercion, ExprEvalStep::omit_quotes, ExprEvalStep::opcode, ExprEvalStep::resnull, ExprEvalStep::resvalue, ExprEvalStep::targettype, ExprEvalStep::targettypmod, JsonReturning::typid, and JsonReturning::typmod.
Referenced by ExecInitJsonExpr().
|
static |
Definition at line 4729 of file execExpr.c.