PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "executor/execExpr.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
#include "nodes/subscripting.h"
#include "parser/parse_coerce.h"
#include "parser/parse_expr.h"
#include "utils/array.h"
#include "utils/fmgrprotos.h"
#include "utils/lsyscache.h"
Go to the source code of this file.
Data Structures | |
struct | ArraySubWorkspace |
Typedefs | |
typedef struct ArraySubWorkspace | ArraySubWorkspace |
typedef struct ArraySubWorkspace ArraySubWorkspace |
|
static |
Definition at line 473 of file arraysubs.c.
References array_subscript_assign(), array_subscript_assign_slice(), array_subscript_check_subscripts(), array_subscript_fetch(), array_subscript_fetch_old(), array_subscript_fetch_old_slice(), array_subscript_fetch_slice(), elog, ereport, errcode(), errmsg(), ERROR, get_typlen(), get_typlenbyvalalign(), MAXDIM, SubscriptingRefState::numlower, SubscriptingRefState::numupper, palloc(), ArraySubWorkspace::refattrlength, ArraySubWorkspace::refelemalign, ArraySubWorkspace::refelembyval, ArraySubWorkspace::refelemlength, ArraySubWorkspace::refelemtype, SubscriptExecSteps::sbs_assign, SubscriptExecSteps::sbs_check_subscripts, SubscriptExecSteps::sbs_fetch, SubscriptExecSteps::sbs_fetch_old, and SubscriptingRefState::workspace.
Referenced by array_subscript_handler(), and raw_array_subscript_handler().
|
static |
Definition at line 294 of file arraysubs.c.
References array_set_element(), construct_empty_array(), ExprEvalStep::d, if(), SubscriptingRefState::numupper, PointerGetDatum(), ArraySubWorkspace::refattrlength, ArraySubWorkspace::refelemalign, ArraySubWorkspace::refelembyval, ArraySubWorkspace::refelemlength, ArraySubWorkspace::refelemtype, SubscriptingRefState::replacenull, SubscriptingRefState::replacevalue, ExprEvalStep::resnull, ExprEvalStep::resvalue, ExprEvalStep::sbsref, ArraySubWorkspace::upperindex, and SubscriptingRefState::workspace.
Referenced by array_exec_setup().
|
static |
Definition at line 344 of file arraysubs.c.
References array_set_slice(), construct_empty_array(), ExprEvalStep::d, if(), ArraySubWorkspace::lowerindex, SubscriptingRefState::lowerprovided, SubscriptingRefState::numupper, PointerGetDatum(), ArraySubWorkspace::refattrlength, ArraySubWorkspace::refelemalign, ArraySubWorkspace::refelembyval, ArraySubWorkspace::refelemlength, ArraySubWorkspace::refelemtype, SubscriptingRefState::replacenull, SubscriptingRefState::replacevalue, ExprEvalStep::resnull, ExprEvalStep::resvalue, ExprEvalStep::sbsref, ArraySubWorkspace::upperindex, SubscriptingRefState::upperprovided, and SubscriptingRefState::workspace.
Referenced by array_exec_setup().
|
static |
Definition at line 180 of file arraysubs.c.
References ExprEvalStep::d, DatumGetInt32(), ereport, errcode(), errmsg(), ERROR, for(), i, SubscriptingRefState::isassignment, ArraySubWorkspace::lowerindex, SubscriptingRefState::lowerindex, SubscriptingRefState::lowerindexnull, SubscriptingRefState::lowerprovided, SubscriptingRefState::numlower, SubscriptingRefState::numupper, ExprEvalStep::resnull, ExprEvalStep::sbsref_subscript, ArraySubWorkspace::upperindex, SubscriptingRefState::upperindex, SubscriptingRefState::upperindexnull, SubscriptingRefState::upperprovided, and SubscriptingRefState::workspace.
Referenced by array_exec_setup().
|
static |
Definition at line 236 of file arraysubs.c.
References array_get_element(), Assert, ExprEvalStep::d, SubscriptingRefState::numupper, ArraySubWorkspace::refattrlength, ArraySubWorkspace::refelemalign, ArraySubWorkspace::refelembyval, ArraySubWorkspace::refelemlength, ExprEvalStep::resnull, ExprEvalStep::resvalue, ExprEvalStep::sbsref, ArraySubWorkspace::upperindex, and SubscriptingRefState::workspace.
Referenced by array_exec_setup().
|
static |
Definition at line 399 of file arraysubs.c.
References array_get_element(), ExprEvalStep::d, if(), SubscriptingRefState::numupper, SubscriptingRefState::prevnull, SubscriptingRefState::prevvalue, ArraySubWorkspace::refattrlength, ArraySubWorkspace::refelemalign, ArraySubWorkspace::refelembyval, ArraySubWorkspace::refelemlength, ExprEvalStep::resnull, ExprEvalStep::resvalue, ExprEvalStep::sbsref, ArraySubWorkspace::upperindex, and SubscriptingRefState::workspace.
Referenced by array_exec_setup().
|
static |
Definition at line 439 of file arraysubs.c.
References array_get_slice(), ExprEvalStep::d, if(), ArraySubWorkspace::lowerindex, SubscriptingRefState::lowerprovided, SubscriptingRefState::numupper, SubscriptingRefState::prevnull, SubscriptingRefState::prevvalue, ArraySubWorkspace::refattrlength, ArraySubWorkspace::refelemalign, ArraySubWorkspace::refelembyval, ArraySubWorkspace::refelemlength, ExprEvalStep::resnull, ExprEvalStep::resvalue, ExprEvalStep::sbsref, ArraySubWorkspace::upperindex, SubscriptingRefState::upperprovided, and SubscriptingRefState::workspace.
Referenced by array_exec_setup().
|
static |
Definition at line 264 of file arraysubs.c.
References array_get_slice(), Assert, ExprEvalStep::d, ArraySubWorkspace::lowerindex, SubscriptingRefState::lowerprovided, SubscriptingRefState::numupper, ArraySubWorkspace::refattrlength, ArraySubWorkspace::refelemalign, ArraySubWorkspace::refelembyval, ArraySubWorkspace::refelemlength, ExprEvalStep::resnull, ExprEvalStep::resvalue, ExprEvalStep::sbsref, ArraySubWorkspace::upperindex, SubscriptingRefState::upperprovided, and SubscriptingRefState::workspace.
Referenced by array_exec_setup().
Datum array_subscript_handler | ( | PG_FUNCTION_ARGS | ) |
Definition at line 539 of file arraysubs.c.
References array_exec_setup(), array_subscript_transform(), PG_RETURN_POINTER, and SubscriptRoutines::transform.
|
static |
Definition at line 55 of file arraysubs.c.
References Assert, COERCE_IMPLICIT_CAST, coerce_to_target_type(), COERCION_ASSIGNMENT, ereport, errcode(), errmsg(), ERROR, exprLocation(), exprType(), idx(), Int32GetDatum(), InvalidOid, A_Indices::is_slice, lappend(), lfirst_node, A_Indices::lidx, list_length(), makeConst(), MAXDIM, NIL, ParseState::p_expr_kind, parser_errposition(), SubscriptingRef::reflowerindexpr, SubscriptingRef::refupperindexpr, transformExpr(), and A_Indices::uidx.
Referenced by array_subscript_handler(), and raw_array_subscript_handler().
Datum raw_array_subscript_handler | ( | PG_FUNCTION_ARGS | ) |
Definition at line 566 of file arraysubs.c.
References array_exec_setup(), array_subscript_transform(), PG_RETURN_POINTER, and SubscriptRoutines::transform.