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/miscnodes.h"
#include "nodes/nodeFuncs.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/jsonfuncs.h"
#include "utils/jsonpath.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 125 of file execExprInterp.c.
#define EEO_DISPATCH | ( | ) | goto starteval |
Definition at line 126 of file execExprInterp.c.
#define EEO_JUMP | ( | stepno | ) |
Definition at line 137 of file execExprInterp.c.
#define EEO_NEXT | ( | ) |
Definition at line 131 of file execExprInterp.c.
#define EEO_OPCODE | ( | opcode | ) | (opcode) |
Definition at line 127 of file execExprInterp.c.
#define EEO_SWITCH | ( | ) | starteval: switch ((ExprEvalOp) op->opcode) |
Definition at line 124 of file execExprInterp.c.
#define SH_DECLARE |
Definition at line 200 of file execExprInterp.c.
#define SH_DEFINE |
Definition at line 229 of file execExprInterp.c.
#define SH_ELEMENT_TYPE ScalarArrayOpExprHashEntry |
Definition at line 221 of file execExprInterp.c.
#define SH_ELEMENT_TYPE ScalarArrayOpExprHashEntry |
Definition at line 221 of file execExprInterp.c.
#define SH_EQUAL | ( | tb, | |
a, | |||
b | |||
) | saop_hash_element_match(tb, a, b) |
Definition at line 225 of file execExprInterp.c.
Definition at line 228 of file execExprInterp.c.
#define SH_HASH_KEY | ( | tb, | |
key | |||
) | saop_element_hash(tb, key) |
Definition at line 224 of file execExprInterp.c.
#define SH_KEY key |
Definition at line 223 of file execExprInterp.c.
#define SH_KEY_TYPE Datum |
Definition at line 222 of file execExprInterp.c.
#define SH_KEY_TYPE Datum |
Definition at line 222 of file execExprInterp.c.
#define SH_PREFIX saophash |
Definition at line 220 of file execExprInterp.c.
#define SH_PREFIX saophash |
Definition at line 220 of file execExprInterp.c.
#define SH_SCOPE static inline |
Definition at line 226 of file execExprInterp.c.
#define SH_SCOPE static inline |
Definition at line 226 of file execExprInterp.c.
#define SH_STORE_HASH |
Definition at line 227 of file execExprInterp.c.
typedef struct ScalarArrayOpExprHashEntry ScalarArrayOpExprHashEntry |
typedef struct ScalarArrayOpExprHashTable ScalarArrayOpExprHashTable |
void CheckExprStillValid | ( | ExprState * | state, |
ExprContext * | econtext | ||
) |
Definition at line 2041 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 2143 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 2092 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().
Datum ExecAggCopyTransValue | ( | AggState * | aggstate, |
AggStatePerTrans | pertrans, | ||
Datum | newValue, | ||
bool | newValueIsNull, | ||
Datum | oldValue, | ||
bool | oldValueIsNull | ||
) |
Definition at line 5195 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 ExecAggInitGroup | ( | AggState * | aggstate, |
AggStatePerTrans | pertrans, | ||
AggStatePerGroup | pergroup, | ||
ExprContext * | aggcontext | ||
) |
Definition at line 5142 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 5394 of file execExprInterp.c.
References ExprEvalStep::aggcontext, FunctionCallInfoBaseData::args, AggState::curaggcontext, AggState::curpertrans, AggState::current_set, DatumGetPointer(), ExprContext::ecxt_per_tuple_memory, ExecAggCopyTransValue(), 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 5362 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().
void ExecEvalAggOrderedTransDatum | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 5334 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 5348 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 3183 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 2969 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 ExecEvalCoerceViaIOSafe | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 2703 of file execExprInterp.c.
References FunctionCallInfoBaseData::args, Assert, FunctionCallInfoBaseData::context, DatumGetCString(), FunctionCallInvoke, IsA, FunctionCallInfoBaseData::isnull, NullableDatum::isnull, ExprEvalStep::op, PointerGetDatum(), SOFT_ERROR_OCCURRED, str, and NullableDatum::value.
Referenced by ExecInterpExpr().
void ExecEvalConstraintCheck | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 3990 of file execExprInterp.c.
References DatumGetBool(), errcode(), errdomainconstraint(), errmsg(), errsave, format_type_be(), and ExprEvalStep::op.
Referenced by ExecInterpExpr().
void ExecEvalConstraintNotNull | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 3976 of file execExprInterp.c.
References errcode(), errdatatype(), errmsg(), errsave, format_type_be(), and ExprEvalStep::op.
Referenced by ExecInterpExpr().
void ExecEvalConvertRowtype | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 3496 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 3297 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 3422 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 3472 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 2558 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 2579 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 4814 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 3794 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 ExecEvalJsonCoercion | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 4680 of file execExprInterp.c.
References bool_int4(), CStringGetDatum(), DatumGetBool(), DirectFunctionCall1, domain_check_safe(), ExprContext::ecxt_per_query_memory, ExprEvalStep::escontext, json_populate_type(), jsonb_in(), and ExprEvalStep::op.
Referenced by ExecInterpExpr().
void ExecEvalJsonCoercionFinish | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 4760 of file execExprInterp.c.
References BoolGetDatum(), DatumGetBool(), ErrorSaveContext::details_wanted, JsonExprState::empty, ereport, errcode(), errdetail(), errmsg(), JsonExprState::error, ERROR, ErrorSaveContext::error_data, ErrorSaveContext::error_occurred, JsonExprState::escontext, GetJsonBehaviorValueString(), ExprEvalStep::jsestate, JsonExprState::jsexpr, ErrorData::message, JsonExpr::on_empty, JsonExpr::on_error, ExprEvalStep::op, SOFT_ERROR_OCCURRED, and NullableDatum::value.
Referenced by ExecInterpExpr().
void ExecEvalJsonConstructor | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 4225 of file execExprInterp.c.
References JsonConstructorExpr::absent_on_null, JsonConstructorExprState::arg_nulls, JsonConstructorExprState::arg_type_cache, JsonConstructorExprState::arg_types, JsonConstructorExprState::arg_values, JsonConstructorExprState::category, JsonConstructorExprState::constructor, datum_to_json(), datum_to_jsonb(), DatumGetTextP, elog, ERROR, JsonReturning::format, JsonFormat::format_type, if(), ExprEvalStep::isnull, ExprEvalStep::jcstate, JS_FORMAT_JSONB, JSCTOR_JSON_ARRAY, JSCTOR_JSON_OBJECT, JSCTOR_JSON_PARSE, JSCTOR_JSON_SCALAR, json_build_array_worker(), json_build_object_worker(), json_validate(), jsonb_build_array_worker(), jsonb_build_object_worker(), jsonb_from_text(), JsonConstructorExprState::nargs, ExprEvalStep::op, JsonConstructorExprState::outfuncid, res, JsonConstructorExpr::returning, JsonConstructorExpr::type, JsonConstructorExpr::unique, and value.
Referenced by ExecInterpExpr().
int ExecEvalJsonExprPath | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 4403 of file execExprInterp.c.
References FunctionCallInfoBaseData::args, JsonExprState::args, Assert, BoolGetDatum(), JsonBehavior::btype, JsonExpr::column_name, CStringGetDatum(), DatumGetCString(), DatumGetJsonPathP(), DatumGetPointer(), ErrorSaveContext::details_wanted, DirectFunctionCall1, elog, JsonExprState::empty, ereport, errcode(), errmsg(), JsonExprState::error, ERROR, error(), ErrorSaveContext::error_data, ErrorSaveContext::error_occurred, JsonExprState::escontext, ExecGetJsonValueItemString(), JsonExprState::formatted_expr, FunctionCallInvoke, JsonExprState::input_fcinfo, FunctionCallInfoBaseData::isnull, NullableDatum::isnull, ExprEvalStep::jsestate, JsonExprState::jsexpr, JSON_BEHAVIOR_ERROR, JSON_EXISTS_OP, JSON_QUERY_OP, JSON_VALUE_OP, jsonb_out(), JsonbPGetDatum(), JsonbValueToJsonb(), JsonPathExists(), JsonPathQuery(), JsonPathValue(), JsonExprState::jump_empty, JsonExprState::jump_end, JsonExprState::jump_error, JsonExprState::jump_eval_coercion, JsonExpr::on_empty, JsonExpr::on_error, ExprEvalStep::op, JsonExpr::op, JsonExprState::pathspec, PointerGetDatum(), JsonExpr::returning, SOFT_ERROR_OCCURRED, textin(), JsonReturning::typid, JsonExpr::use_io_coercion, JsonExpr::use_json_coercion, val_string, NullableDatum::value, and JsonExpr::wrapper.
Referenced by ExecInterpExpr().
void ExecEvalJsonIsPredicate | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 4303 of file execExprInterp.c.
References BoolGetDatum(), DatumGetJsonbP(), DatumGetTextP, JsonIsPredicate::expr, exprType(), JsonIsPredicate::item_type, JB_ROOT_IS_ARRAY, JB_ROOT_IS_OBJECT, JB_ROOT_IS_SCALAR, JS_TYPE_ANY, JS_TYPE_ARRAY, JS_TYPE_OBJECT, JS_TYPE_SCALAR, json_get_first_token(), JSON_TOKEN_ARRAY_START, JSON_TOKEN_FALSE, JSON_TOKEN_NULL, JSON_TOKEN_NUMBER, JSON_TOKEN_OBJECT_START, JSON_TOKEN_STRING, JSON_TOKEN_TRUE, json_validate(), ExprEvalStep::op, ExprEvalStep::pred, res, and JsonIsPredicate::unique_keys.
Referenced by ExecInterpExpr().
void ExecEvalMergeSupportFunc | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 4841 of file execExprInterp.c.
References castNode, CMD_DELETE, CMD_INSERT, CMD_NOTHING, CMD_UPDATE, MergeAction::commandType, cstring_to_text_with_len(), elog, ERROR, MergeActionState::mas_action, ModifyTableState::mt_merge_action, ExprEvalStep::op, and PointerGetDatum().
Referenced by ExecInterpExpr().
void ExecEvalMinMax | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 3244 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 2841 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 2616 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 2638 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().
void ExecEvalParamSet | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 2681 of file execExprInterp.c.
References Assert, ExprContext::ecxt_param_exec_vals, ParamExecData::execPlan, ParamExecData::isnull, ExprEvalStep::op, and ParamExecData::value.
Referenced by ExecInterpExpr().
bool ExecEvalPreOrderedDistinctMulti | ( | AggState * | aggstate, |
AggStatePerTrans | pertrans | ||
) |
Definition at line 5287 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 5244 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 3224 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 2876 of file execExprInterp.c.
References ExecEvalRowNullInt(), and ExprEvalStep::op.
Referenced by ExecInterpExpr().
void ExecEvalRowNull | ( | ExprState * | state, |
ExprEvalStep * | op, | ||
ExprContext * | econtext | ||
) |
Definition at line 2867 of file execExprInterp.c.
References ExecEvalRowNullInt(), and ExprEvalStep::op.
Referenced by ExecInterpExpr().
|
static |
Definition at line 2883 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 3591 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().
void ExecEvalSQLValueFunction | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 2763 of file execExprInterp.c.
References current_database(), current_schema(), current_user(), DateADTGetDatum(), GetSQLCurrentDate(), GetSQLCurrentTime(), GetSQLCurrentTimestamp(), GetSQLLocalTime(), GetSQLLocalTimestamp(), InitFunctionCallInfoData, InvalidOid, LOCAL_FCINFO, ExprEvalStep::op, SQLValueFunction::op, session_user(), ExprEvalStep::svf, SVFOP_CURRENT_CATALOG, SVFOP_CURRENT_DATE, SVFOP_CURRENT_ROLE, SVFOP_CURRENT_SCHEMA, SVFOP_CURRENT_TIME, SVFOP_CURRENT_TIME_N, SVFOP_CURRENT_TIMESTAMP, SVFOP_CURRENT_TIMESTAMP_N, SVFOP_CURRENT_USER, SVFOP_LOCALTIME, SVFOP_LOCALTIME_N, SVFOP_LOCALTIMESTAMP, SVFOP_LOCALTIMESTAMP_N, SVFOP_SESSION_USER, SVFOP_USER, TimeADTGetDatum(), TimestampGetDatum(), TimestampTzGetDatum(), TimeTzADTPGetDatum(), and SQLValueFunction::typmod.
Referenced by ExecInterpExpr().
ExprEvalOp ExecEvalStepOp | ( | ExprState * | state, |
ExprEvalStep * | op | ||
) |
Definition at line 2528 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 4878 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 5122 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 4895 of file execExprInterp.c.
References Assert, BlessTupleDesc(), CreateTupleDescCopy(), ExprContext::ecxt_estate, ExprContext::ecxt_innertuple, ExprContext::ecxt_outertuple, ExprContext::ecxt_per_query_memory, ExprContext::ecxt_scantuple, 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 4010 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 4605 of file execExprInterp.c.
References Assert, BoolGetDatum(), boolout(), date_out(), DatumGetCString(), DirectFunctionCall1, elog, ERROR, jbvArray, jbvBinary, jbvBool, jbvDatetime, jbvNull, jbvNumeric, jbvObject, jbvString, jsonb_out(), JsonbPGetDatum(), JsonbValueToJsonb(), numeric_out(), NumericGetDatum(), palloc(), ExprEvalStep::resnull, str, time_out(), timestamp_out(), timestamptz_out(), timetz_out(), JsonbValue::type, and JsonbValue::val.
Referenced by ExecEvalJsonExprPath().
|
static |
Definition at line 2496 of file execExprInterp.c.
References DatumGetPointer(), EEOP_LAST, ExecInterpExpr(), i, and qsort.
Referenced by ExecReadyInterpretedExpr().
|
static |
Definition at line 396 of file execExprInterp.c.