PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/heaptoast.h"
#include "catalog/pg_type.h"
#include "commands/sequence.h"
#include "executor/execExpr.h"
#include "executor/nodeSubplan.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "nodes/nodeFuncs.h"
#include "parser/parsetree.h"
#include "pgstat.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/date.h"
#include "utils/datum.h"
#include "utils/expandedrecord.h"
#include "utils/json.h"
#include "utils/jsonb.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/timestamp.h"
#include "utils/typcache.h"
#include "utils/xml.h"
#include "lib/simplehash.h"
Go to the source code of this file.
Data Structures | |
struct | ScalarArrayOpExprHashEntry |
struct | ScalarArrayOpExprHashTable |
Macros | |
#define | EEO_SWITCH() starteval: switch ((ExprEvalOp) op->opcode) |
#define | EEO_CASE(name) case name: |
#define | EEO_DISPATCH() goto starteval |
#define | EEO_OPCODE(opcode) (opcode) |
#define | EEO_NEXT() |
#define | EEO_JUMP(stepno) |
#define | SH_PREFIX saophash |
#define | SH_ELEMENT_TYPE ScalarArrayOpExprHashEntry |
#define | SH_KEY_TYPE Datum |
#define | SH_SCOPE static inline |
#define | SH_DECLARE |
#define | SH_PREFIX saophash |
#define | SH_ELEMENT_TYPE ScalarArrayOpExprHashEntry |
#define | SH_KEY_TYPE Datum |
#define | SH_KEY key |
#define | SH_HASH_KEY(tb, key) saop_element_hash(tb, key) |
#define | SH_EQUAL(tb, a, b) saop_hash_element_match(tb, a, b) |
#define | SH_SCOPE static inline |
#define | SH_STORE_HASH |
#define | SH_GET_HASH(tb, a) a->hash |
#define | SH_DEFINE |
Typedefs | |
typedef struct ScalarArrayOpExprHashEntry | ScalarArrayOpExprHashEntry |
typedef struct ScalarArrayOpExprHashTable | ScalarArrayOpExprHashTable |
#define EEO_CASE | ( | name | ) | case name: |
Definition at line 124 of file execExprInterp.c.
#define EEO_DISPATCH | ( | ) | goto starteval |
Definition at line 125 of file execExprInterp.c.
#define EEO_JUMP | ( | stepno | ) |
Definition at line 136 of file execExprInterp.c.
#define EEO_NEXT | ( | ) |
Definition at line 130 of file execExprInterp.c.
#define EEO_OPCODE | ( | opcode | ) | (opcode) |
Definition at line 126 of file execExprInterp.c.
#define EEO_SWITCH | ( | ) | starteval: switch ((ExprEvalOp) op->opcode) |
Definition at line 123 of file execExprInterp.c.
#define SH_DECLARE |
Definition at line 198 of file execExprInterp.c.
#define SH_DEFINE |
Definition at line 227 of file execExprInterp.c.
#define SH_ELEMENT_TYPE ScalarArrayOpExprHashEntry |
Definition at line 219 of file execExprInterp.c.
#define SH_ELEMENT_TYPE ScalarArrayOpExprHashEntry |
Definition at line 219 of file execExprInterp.c.
#define SH_EQUAL | ( | tb, | |
a, | |||
b | |||
) | saop_hash_element_match(tb, a, b) |
Definition at line 223 of file execExprInterp.c.
Definition at line 226 of file execExprInterp.c.
#define SH_HASH_KEY | ( | tb, | |
key | |||
) | saop_element_hash(tb, key) |
Definition at line 222 of file execExprInterp.c.
#define SH_KEY key |
Definition at line 221 of file execExprInterp.c.
#define SH_KEY_TYPE Datum |
Definition at line 220 of file execExprInterp.c.
#define SH_KEY_TYPE Datum |
Definition at line 220 of file execExprInterp.c.
#define SH_PREFIX saophash |
Definition at line 218 of file execExprInterp.c.
#define SH_PREFIX saophash |
Definition at line 218 of file execExprInterp.c.
#define SH_SCOPE static inline |
Definition at line 224 of file execExprInterp.c.
#define SH_SCOPE static inline |
Definition at line 224 of file execExprInterp.c.
#define SH_STORE_HASH |
Definition at line 225 of file execExprInterp.c.
typedef struct ScalarArrayOpExprHashEntry ScalarArrayOpExprHashEntry |
typedef struct ScalarArrayOpExprHashTable ScalarArrayOpExprHashTable |
void CheckExprStillValid | ( | ExprState * | state, |
ExprContext * | econtext | ||
) |
Definition at line 1856 of file execExprInterp.c.
References attnum, CheckVarSlotCompatibility(), ExprContext::ecxt_innertuple, ExprContext::ecxt_outertuple, ExprContext::ecxt_scantuple, EEOP_INNER_VAR, EEOP_OUTER_VAR, EEOP_SCAN_VAR, ExecEvalStepOp(), i, and ExprEvalStep::op.
Referenced by ExecInterpExprStillValid(), and ExecRunCompiledExpr().
|
static |
Definition at line 1958 of file execExprInterp.c.
References Assert(), ExprEvalStep::op, TupleTableSlot::tts_ops, TTSOpsBufferHeapTuple, TTSOpsHeapTuple, and TTSOpsVirtual.
Referenced by ExecInterpExpr(), ExecJustAssignVarImpl(), and ExecJustVarImpl().
|
static |
Definition at line 1907 of file execExprInterp.c.
References attnum, elog(), ereport, errcode(), errdetail(), errmsg(), ERROR, format_type_be(), TupleDescData::natts, TupleDescData::tdtypeid, TupleTableSlot::tts_tupleDescriptor, TupleDescAttr, and ExprEvalStep::vartype.
Referenced by CheckExprStillValid().
void ExecAggInitGroup | ( | AggState * | aggstate, |
AggStatePerTrans | pertrans, | ||
AggStatePerGroup | pergroup, | ||
ExprContext * | aggcontext | ||
) |
Definition at line 4186 of file execExprInterp.c.
References ExprEvalStep::aggcontext, FunctionCallInfoBaseData::args, datumCopy(), ExprContext::ecxt_per_tuple_memory, MemoryContextSwitchTo(), AggStatePerGroupData::noTransValue, ExprEvalStep::pertrans, AggStatePerTransData::transfn_fcinfo, AggStatePerTransData::transtypeByVal, AggStatePerTransData::transtypeLen, AggStatePerGroupData::transValue, AggStatePerGroupData::transValueIsNull, and NullableDatum::value.
Referenced by ExecInterpExpr().
|
static |
Definition at line 4399 of file execExprInterp.c.
References ExprEvalStep::aggcontext, FunctionCallInfoBaseData::args, AggState::curaggcontext, AggState::curpertrans, AggState::current_set, DatumGetPointer(), ExprContext::ecxt_per_tuple_memory, ExecAggTransReparent(), FunctionCallInvoke, FunctionCallInfoBaseData::isnull, NullableDatum::isnull, MemoryContextSwitchTo(), ExprEvalStep::pertrans, ExprEvalStep::setno, AggState::tmpcontext, AggStatePerTransData::transfn_fcinfo, AggStatePerGroupData::transValue, AggStatePerGroupData::transValueIsNull, and NullableDatum::value.
Referenced by ExecInterpExpr().
|
static |
Definition at line 4367 of file execExprInterp.c.
References ExprEvalStep::aggcontext, FunctionCallInfoBaseData::args, AggState::curaggcontext, AggState::curpertrans, AggState::current_set, ExprContext::ecxt_per_tuple_memory, FunctionCallInvoke, FunctionCallInfoBaseData::isnull, NullableDatum::isnull, MemoryContextSwitchTo(), ExprEvalStep::pertrans, ExprEvalStep::setno, AggState::tmpcontext, AggStatePerTransData::transfn_fcinfo, AggStatePerGroupData::transValue, AggStatePerGroupData::transValueIsNull, and NullableDatum::value.
Referenced by ExecInterpExpr().
Datum ExecAggTransReparent | ( | AggState * | aggstate, |
AggStatePerTrans | pertrans, | ||
Datum | newValue, | ||
bool | newValueIsNull, | ||
Datum | oldValue, | ||
bool | oldValueIsNull | ||
) |
Definition at line 4214 of file execExprInterp.c.
References Assert(), AggState::curaggcontext, CurrentMemoryContext, datumCopy(), DatumGetEOHP(), DatumGetPointer(), DatumIsReadWriteExpandedObject, DeleteExpandedObject(), ExprContext::ecxt_per_tuple_memory, MemoryContextGetParent(), MemoryContextSwitchTo(), ExprEvalStep::pertrans, pfree(), AggStatePerTransData::transtypeByVal, and AggStatePerTransData::transtypeLen.
Referenced by advance_transition_function(), and ExecAggPlainTransByRef().
void ExecEvalAggOrderedTransDatum | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 4339 of file execExprInterp.c.
References ExprEvalStep::op, ExprEvalStep::pertrans, ExprEvalStep::setno, AggStatePerTransData::sortstates, and tuplesort_putdatum().
Referenced by ExecInterpExpr().
void ExecEvalAggOrderedTransTuple | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 4353 of file execExprInterp.c.
References ExecClearTuple(), ExecStoreVirtualTuple(), AggStatePerTransData::numInputs, ExprEvalStep::op, ExprEvalStep::pertrans, ExprEvalStep::setno, AggStatePerTransData::sortslot, AggStatePerTransData::sortstates, TupleTableSlot::tts_nvalid, and tuplesort_puttupleslot().
Referenced by ExecInterpExpr().
void ExecEvalArrayCoerce | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 2853 of file execExprInterp.c.
References ARR_ELEMTYPE, array_map(), DatumGetArrayTypePCopy, ExprEvalStep::op, and PointerGetDatum().
Referenced by ExecInterpExpr().
void ExecEvalArrayExpr | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 2639 of file execExprInterp.c.
References AllocSizeIsValid, ARR_DATA_OFFSET, ARR_DATA_PTR, ARR_DIMS, ARR_ELEMTYPE, ARR_HASNULL, ARR_LBOUND, ARR_NDIM, ARR_NULLBITMAP, ARR_OVERHEAD_NONULLS, ARR_OVERHEAD_WITHNULLS, ARR_SIZE, array_bitmap_copy(), ArrayCheckBounds(), ArrayGetNItems(), construct_empty_array(), construct_md_array(), ArrayType::dataoffset, DatumGetArrayTypeP, ExprEvalStep::element_type, ArrayType::elemtype, ereport, errcode(), errdetail(), errmsg(), ERROR, format_type_be(), i, MaxAllocSize, MAXDIM, ArrayType::ndim, ExprEvalStep::nelems, nitems, ExprEvalStep::op, palloc(), palloc0(), PointerGetDatum(), and SET_VARSIZE.
Referenced by ExecInterpExpr().
void ExecEvalConstraintCheck | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 3656 of file execExprInterp.c.
References DatumGetBool(), ereport, errcode(), errdomainconstraint(), errmsg(), ERROR, format_type_be(), and ExprEvalStep::op.
Referenced by ExecInterpExpr().
void ExecEvalConstraintNotNull | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 3642 of file execExprInterp.c.
References ereport, errcode(), errdatatype(), errmsg(), ERROR, format_type_be(), and ExprEvalStep::op.
Referenced by ExecInterpExpr().
void ExecEvalConvertRowtype | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 3162 of file execExprInterp.c.
References Assert(), convert_tuples_by_name(), DatumGetHeapTupleHeader, DecrTupleDescRefCount(), ExprContext::ecxt_per_query_memory, execute_attr_map_tuple(), get_cached_rowtype(), heap_copy_tuple_as_datum(), HeapTupleGetDatum(), HeapTupleHeaderGetDatumLength, HeapTupleHeaderGetTypeId, IncrTupleDescRefCount(), MemoryContextSwitchTo(), ExprEvalStep::op, HeapTupleData::t_data, HeapTupleData::t_len, and TupleDescData::tdtypeid.
Referenced by ExecInterpExpr().
void ExecEvalCurrentOfExpr | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
void ExecEvalFieldSelect | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 2967 of file execExprInterp.c.
References Assert(), DatumGetEOHP(), DatumGetHeapTupleHeader, DatumGetPointer(), elog(), ER_MAGIC, ExpandedRecordHeader::er_magic, ereport, errcode(), errdetail(), errmsg(), ERROR, expanded_record_get_field(), expanded_record_get_tupdesc(), ExprEvalStep::fieldnum, format_type_be(), get_cached_rowtype(), heap_getattr(), HeapTupleHeaderGetDatumLength, HeapTupleHeaderGetTypeId, HeapTupleHeaderGetTypMod, TupleDescData::natts, ExprEvalStep::op, HeapTupleData::t_data, HeapTupleData::t_len, TupleDescAttr, and VARATT_IS_EXTERNAL_EXPANDED.
Referenced by ExecInterpExpr().
void ExecEvalFieldStoreDeForm | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 3092 of file execExprInterp.c.
References DatumGetHeapTupleHeader, elog(), ERROR, get_cached_rowtype(), heap_deform_tuple(), HeapTupleHeaderGetDatumLength, InvalidOid, ItemPointerSetInvalid(), TupleDescData::natts, ExprEvalStep::op, HeapTupleData::t_data, HeapTupleData::t_len, HeapTupleData::t_self, HeapTupleData::t_tableOid, and unlikely.
Referenced by ExecInterpExpr().
void ExecEvalFieldStoreForm | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 3138 of file execExprInterp.c.
References get_cached_rowtype(), heap_form_tuple(), HeapTupleGetDatum(), and ExprEvalStep::op.
Referenced by ExecInterpExpr().
void ExecEvalFuncExprFusage | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 2372 of file execExprInterp.c.
References ExprEvalStep::d, FunctionCallInfoBaseData::isnull, ExprEvalStep::op, pgstat_end_function_usage(), and pgstat_init_function_usage().
Referenced by ExecInterpExpr().
void ExecEvalFuncExprStrictFusage | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 2393 of file execExprInterp.c.
References generate_unaccent_rules::args, FunctionCallInfoBaseData::args, ExprEvalStep::d, ExprEvalStep::isnull, FunctionCallInfoBaseData::isnull, ExprEvalStep::nargs, ExprEvalStep::op, pgstat_end_function_usage(), and pgstat_init_function_usage().
Referenced by ExecInterpExpr().
void ExecEvalGroupingFunc | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 3897 of file execExprInterp.c.
References attnum, bms_is_member(), castNode, AggState::grouped_cols, Int32GetDatum(), lfirst_int, and ExprEvalStep::op.
Referenced by ExecInterpExpr().
void ExecEvalHashedScalarArrayOp | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 3460 of file execExprInterp.c.
References FunctionCallInfoBaseData::args, ARR_DATA_PTR, ARR_DIMS, ARR_ELEMTYPE, ARR_NDIM, ARR_NULLBITMAP, ArrayGetNItems(), Assert(), att_addlength_pointer, att_align_nominal, BoolGetDatum(), CurrentMemoryContext, DatumGetArrayTypeP, ExprContext::ecxt_per_query_memory, element(), ExprEvalStep::elements_tab, fetch_att(), fmgr_info(), fmgr_info_set_expr, get_typlenbyvalalign(), ExprEvalStep::has_nulls, ScalarArrayOpExprHashTable::hash_fcinfo_data, ScalarArrayOpExprHashTable::hash_finfo, ScalarArrayOpExprHashTable::hashtab, i, ExprEvalStep::inclause, InitFunctionCallInfoData, FunctionCallInfoBaseData::isnull, NullableDatum::isnull, MemoryContextSwitchTo(), nitems, ScalarArrayOpExprHashTable::op, ExprEvalStep::op, palloc0(), ExprEvalStep::saop, SizeForFunctionCallInfo, typalign, ExprEvalStep::typbyval, ExprEvalStep::typlen, and NullableDatum::value.
Referenced by ExecInterpExpr().
void ExecEvalJsonConstructor | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 4455 of file execExprInterp.c.
References JsonConstructorExpr::absent_on_null, JsonConstructorExprState::arg_nulls, JsonConstructorExprState::arg_types, JsonConstructorExprState::arg_values, JsonConstructorExprState::constructor, elog(), ERROR, JsonReturning::format, JsonFormat::format_type, ExprEvalStep::isnull, ExprEvalStep::jcstate, JS_FORMAT_JSONB, JSCTOR_JSON_ARRAY, JSCTOR_JSON_OBJECT, json_build_array_worker(), json_build_object_worker(), jsonb_build_array_worker(), jsonb_build_object_worker(), JsonConstructorExprState::nargs, ExprEvalStep::op, res, JsonConstructorExpr::returning, JsonConstructorExpr::type, and JsonConstructorExpr::unique.
Referenced by ExecInterpExpr().
void ExecEvalMinMax | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 2914 of file execExprInterp.c.
References FunctionCallInfoBaseData::args, Assert(), DatumGetInt32(), FunctionCallInvoke, IS_GREATEST, IS_LEAST, FunctionCallInfoBaseData::isnull, NullableDatum::isnull, ExprEvalStep::nulls, ExprEvalStep::op, NullableDatum::value, and values.
Referenced by ExecInterpExpr().
void ExecEvalNextValueExpr | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 2511 of file execExprInterp.c.
References elog(), ERROR, Int16GetDatum(), Int32GetDatum(), Int64GetDatum(), newval, nextval_internal(), and ExprEvalStep::op.
Referenced by ExecInterpExpr().
void ExecEvalParamExec | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 2430 of file execExprInterp.c.
References Assert(), ExprContext::ecxt_param_exec_vals, ParamExecData::execPlan, ExecSetParamPlan(), ParamExecData::isnull, ExprEvalStep::op, unlikely, and ParamExecData::value.
Referenced by ExecInterpExpr().
void ExecEvalParamExtern | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 2452 of file execExprInterp.c.
References ExprContext::ecxt_param_list_info, ereport, errcode(), errmsg(), ERROR, format_type_be(), ParamExternData::isnull, likely, OidIsValid, ExprEvalStep::op, ParamListInfoData::paramFetch, ParamListInfoData::params, ParamExternData::ptype, unlikely, and ParamExternData::value.
Referenced by ExecInterpExpr().
bool ExecEvalPreOrderedDistinctMulti | ( | AggState * | aggstate, |
AggStatePerTrans | pertrans | ||
) |
Definition at line 4305 of file execExprInterp.c.
References FunctionCallInfoBaseData::args, ExprContext::ecxt_innertuple, ExprContext::ecxt_outertuple, AggStatePerTransData::equalfnMulti, ExecClearTuple(), ExecCopySlot(), ExecQual(), ExecStoreVirtualTuple(), AggStatePerTransData::haslast, i, NullableDatum::isnull, AggStatePerTransData::numInputs, AggStatePerTransData::numTransInputs, ExprEvalStep::pertrans, AggStatePerTransData::sortslot, AggState::tmpcontext, AggStatePerTransData::transfn_fcinfo, TupleTableSlot::tts_isnull, TupleTableSlot::tts_nvalid, TupleTableSlot::tts_values, AggStatePerTransData::uniqslot, and NullableDatum::value.
Referenced by ExecInterpExpr().
bool ExecEvalPreOrderedDistinctSingle | ( | AggState * | aggstate, |
AggStatePerTrans | pertrans | ||
) |
Definition at line 4263 of file execExprInterp.c.
References AggStatePerTransData::aggCollation, FunctionCallInfoBaseData::args, AggState::curaggcontext, datumCopy(), DatumGetBool(), DatumGetPointer(), ExprContext::ecxt_per_tuple_memory, AggStatePerTransData::equalfnOne, FunctionCall2Coll(), AggStatePerTransData::haslast, AggStatePerTransData::inputtypeByVal, AggStatePerTransData::inputtypeLen, ExprEvalStep::isnull, NullableDatum::isnull, AggStatePerTransData::lastdatum, AggStatePerTransData::lastisnull, MemoryContextSwitchTo(), ExprEvalStep::pertrans, pfree(), AggStatePerTransData::transfn_fcinfo, NullableDatum::value, and value.
Referenced by ExecInterpExpr().
void ExecEvalRow | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 2894 of file execExprInterp.c.
References heap_form_tuple(), HeapTupleGetDatum(), and ExprEvalStep::op.
Referenced by ExecInterpExpr().
void ExecEvalRowNotNull | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 2546 of file execExprInterp.c.
References ExecEvalRowNullInt(), and ExprEvalStep::op.
Referenced by ExecInterpExpr().
void ExecEvalRowNull | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 2537 of file execExprInterp.c.
References ExecEvalRowNullInt(), and ExprEvalStep::op.
Referenced by ExecInterpExpr().
|
static |
Definition at line 2553 of file execExprInterp.c.
References BoolGetDatum(), DatumGetHeapTupleHeader, get_cached_rowtype(), heap_attisnull(), HeapTupleHeaderGetDatumLength, HeapTupleHeaderGetTypeId, HeapTupleHeaderGetTypMod, ExprEvalStep::isnull, TupleDescData::natts, ExprEvalStep::op, HeapTupleData::t_data, HeapTupleData::t_len, TupleDescAttr, and value.
Referenced by ExecEvalRowNotNull(), and ExecEvalRowNull().
void ExecEvalScalarArrayOp | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 3257 of file execExprInterp.c.
References FunctionCallInfoBaseData::args, ARR_DATA_PTR, ARR_DIMS, ARR_ELEMTYPE, ARR_NDIM, ARR_NULLBITMAP, ArrayGetNItems(), att_addlength_pointer, att_align_nominal, BoolGetDatum(), DatumGetArrayTypeP, DatumGetBool(), fetch_att(), get_typlenbyvalalign(), i, FunctionCallInfoBaseData::isnull, NullableDatum::isnull, nitems, ExprEvalStep::op, typalign, ExprEvalStep::typbyval, ExprEvalStep::typlen, ExprEvalStep::useOr, and NullableDatum::value.
Referenced by ExecInterpExpr().
ExprEvalOp ExecEvalStepOp | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 2342 of file execExprInterp.c.
References Assert(), EEO_FLAG_DIRECT_THREADED, EEOP_LAST, sort-test::key, ExprEvalStep::op, and res.
Referenced by CheckExprStillValid().
void ExecEvalSubPlan | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 3922 of file execExprInterp.c.
References check_stack_depth(), ExecSubPlan(), ExprEvalStep::op, and ExprEvalStep::sstate.
Referenced by ExecInterpExpr().
void ExecEvalSysVar | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext, | ||
TupleTableSlot * | slot | ||
) |
Definition at line 4166 of file execExprInterp.c.
References ExprEvalStep::d, elog(), ERROR, ExprEvalStep::op, slot_getsysattr(), and unlikely.
Referenced by ExecInterpExpr().
void ExecEvalWholeRowVar | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 3939 of file execExprInterp.c.
References Assert(), BlessTupleDesc(), Alias::colnames, CreateTupleDescCopy(), ExprContext::ecxt_estate, ExprContext::ecxt_innertuple, ExprContext::ecxt_outertuple, ExprContext::ecxt_per_query_memory, ExprContext::ecxt_scantuple, RangeTblEntry::eref, ereport, errcode(), errdetail(), errdetail_plural(), errmsg(), ERROR, EState::es_range_table_size, exec_rt_fetch(), ExecFilterJunk(), ExecTypeSetColNames(), format_type_be(), HeapTupleHeaderSetTypeId, HeapTupleHeaderSetTypMod, i, INNER_VAR, InvalidAttrNumber, lookup_rowtype_tupdesc_domain(), MemoryContextSwitchTo(), TupleDescData::natts, ExprEvalStep::op, OUTER_VAR, PointerGetDatum(), ReleaseTupleDesc, slot_getallattrs(), HeapTupleData::t_data, TupleDescData::tdtypeid, TupleDescData::tdtypmod, toast_build_flattened_tuple(), TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, and TupleDescAttr.
Referenced by ExecInterpExpr().
void ExecEvalXmlExpr | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 3676 of file execExprInterp.c.
References appendStringInfo(), arg, ExprEvalStep::argnull, XmlExpr::args, ExprEvalStep::argvalue, Assert(), BoolGetDatum(), buf, cstring_to_text_with_len(), data, DatumGetBool(), DatumGetInt32(), DatumGetPointer(), DatumGetTextPP, DatumGetXmlP(), elog(), ERROR, exprType(), forboth, i, XmlExpr::indent, initStringInfo(), IS_DOCUMENT, IS_XMLCONCAT, IS_XMLELEMENT, IS_XMLFOREST, IS_XMLPARSE, IS_XMLPI, IS_XMLROOT, IS_XMLSERIALIZE, ExprEvalStep::isnull, lappend(), lfirst, list_length(), map_sql_value_to_xml_value(), XmlExpr::named_args, NIL, ExprEvalStep::op, XmlExpr::op, pfree(), PointerGetDatum(), strVal, value, values, ExprEvalStep::xexpr, xml_is_document(), xmlconcat(), xmlelement(), xmlparse(), xmlpi(), xmlroot(), and xmltotext_with_options().
Referenced by ExecInterpExpr().
|
static |
Definition at line 2310 of file execExprInterp.c.
References DatumGetPointer(), EEOP_LAST, ExecInterpExpr(), i, and qsort.
Referenced by ExecReadyInterpretedExpr().
|
static |
Definition at line 394 of file execExprInterp.c.
References ExprEvalStep::aggno, AggState::all_pergroups, generate_unaccent_rules::args, FunctionCallInfoBaseData::args, Assert(), attnum, BoolGetDatum(), ExprContext::caseValue_datum, ExprContext::caseValue_isNull, castNode, CheckOpSlotCompatibility(), ExprEvalStep::d, DatumGetBool(), DatumGetCString(), DatumGetInt32(), ExprContext::domainValue_datum, ExprContext::domainValue_isNull, ExprContext::ecxt_aggnulls, ExprContext::ecxt_aggvalues, ExprContext::ecxt_innertuple, ExprContext::ecxt_outertuple, ExprContext::ecxt_per_tuple_memory, ExprContext::ecxt_scantuple, EEO_CASE, EEO_DISPATCH, EEO_JUMP, EEO_NEXT, EEO_SWITCH, EEOP_AGG_DESERIALIZE, 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, 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_AGGREF, EEOP_ARRAYCOERCE, EEOP_ARRAYEXPR, EEOP_ASSIGN_INNER_VAR, EEOP_ASSIGN_OUTER_VAR, EEOP_ASSIGN_SCAN_VAR, EEOP_ASSIGN_TMP, EEOP_ASSIGN_TMP_MAKE_RO, 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_CHECK, EEOP_DOMAIN_NOTNULL, EEOP_DOMAIN_TESTVAL, EEOP_DONE, EEOP_FIELDSELECT, EEOP_FIELDSTORE_DEFORM, EEOP_FIELDSTORE_FORM, EEOP_FUNCEXPR, EEOP_FUNCEXPR_FUSAGE, EEOP_FUNCEXPR_STRICT, EEOP_FUNCEXPR_STRICT_FUSAGE, EEOP_GROUPING_FUNC, EEOP_HASHED_SCALARARRAYOP, EEOP_INNER_FETCHSOME, EEOP_INNER_SYSVAR, EEOP_INNER_VAR, EEOP_IOCOERCE, EEOP_JSON_CONSTRUCTOR, EEOP_JUMP, EEOP_JUMP_IF_NOT_NULL, EEOP_JUMP_IF_NOT_TRUE, EEOP_JUMP_IF_NULL, EEOP_LAST, EEOP_MAKE_READONLY, EEOP_MINMAX, EEOP_NEXTVALUEEXPR, EEOP_NOT_DISTINCT, EEOP_NULLIF, EEOP_NULLTEST_ISNOTNULL, EEOP_NULLTEST_ISNULL, EEOP_NULLTEST_ROWISNOTNULL, EEOP_NULLTEST_ROWISNULL, EEOP_OUTER_FETCHSOME, EEOP_OUTER_SYSVAR, EEOP_OUTER_VAR, EEOP_PARAM_CALLBACK, EEOP_PARAM_EXEC, EEOP_PARAM_EXTERN, EEOP_QUAL, EEOP_ROW, EEOP_ROWCOMPARE_FINAL, EEOP_ROWCOMPARE_STEP, EEOP_SBSREF_ASSIGN, EEOP_SBSREF_FETCH, EEOP_SBSREF_OLD, EEOP_SBSREF_SUBSCRIPTS, EEOP_SCALARARRAYOP, EEOP_SCAN_FETCHSOME, EEOP_SCAN_SYSVAR, EEOP_SCAN_VAR, EEOP_SUBPLAN, EEOP_WHOLEROW, EEOP_WINDOW_FUNC, EEOP_XMLEXPR, ExecAggInitGroup(), ExecAggPlainTransByRef(), ExecAggPlainTransByVal(), ExecEvalAggOrderedTransDatum(), ExecEvalAggOrderedTransTuple(), ExecEvalArrayCoerce(), ExecEvalArrayExpr(), ExecEvalConstraintCheck(), ExecEvalConstraintNotNull(), ExecEvalConvertRowtype(), ExecEvalCurrentOfExpr(), ExecEvalFieldSelect(), ExecEvalFieldStoreDeForm(), ExecEvalFieldStoreForm(), ExecEvalFuncExprFusage(), ExecEvalFuncExprStrictFusage(), ExecEvalGroupingFunc(), ExecEvalHashedScalarArrayOp(), ExecEvalJsonConstructor(), ExecEvalMinMax(), ExecEvalNextValueExpr(), ExecEvalParamExec(), ExecEvalParamExtern(), ExecEvalPreOrderedDistinctMulti(), ExecEvalPreOrderedDistinctSingle(), ExecEvalRow(), ExecEvalRowNotNull(), ExecEvalRowNull(), ExecEvalScalarArrayOp(), ExecEvalSubPlan(), ExecEvalSysVar(), ExecEvalWholeRowVar(), ExecEvalXmlExpr(), FunctionCallInvoke, ExprEvalStep::isnull, FunctionCallInfoBaseData::isnull, NullableDatum::isnull, lengthof, likely, MakeExpandedObjectReadOnlyInternal(), MemoryContextSwitchTo(), ExprEvalStep::nargs, AggStatePerGroupData::noTransValue, ExprEvalStep::nulls, ExprEvalStep::op, ExprEvalStep::pertrans, PointerGetDatum(), ExprEvalStep::rctype, ExprEvalStep::resultnum, ROWCOMPARE_GE, ROWCOMPARE_GT, ROWCOMPARE_LE, ROWCOMPARE_LT, slot_getsomeattrs(), StaticAssertDecl, generate_unaccent_rules::str, AggState::tmpcontext, AggStatePerTransData::transtypeByVal, AggStatePerGroupData::transValueIsNull, TupleTableSlot::tts_isnull, TupleTableSlot::tts_values, unlikely, NullableDatum::value, and WindowFuncExprState::wfuncno.
Referenced by ExecInitInterpreter(), and ExecReadyInterpretedExpr().
Datum ExecInterpExprStillValid | ( | ExprState * | state, |
ExprContext * | econtext, | ||
bool * | isNull | ||
) |
Definition at line 1836 of file execExprInterp.c.
References CheckExprStillValid().
Referenced by ExecReadyInterpretedExpr().
|
static |
Definition at line 2155 of file execExprInterp.c.
References generate_unaccent_rules::args, FunctionCallInfoBaseData::args, ExprEvalStep::d, ExprEvalStep::isnull, FunctionCallInfoBaseData::isnull, ExprEvalStep::nargs, and ExprEvalStep::op.
Referenced by ExecReadyInterpretedExpr().