73 foreach(idx, indirection)
92 (
errcode(ERRCODE_DATATYPE_MISMATCH),
93 errmsg(
"array subscript must have type integer"),
112 lowerIndexpr =
lappend(lowerIndexpr, subexpr);
129 (
errcode(ERRCODE_DATATYPE_MISMATCH),
130 errmsg(
"array subscript must have type integer"),
139 upperIndexpr =
lappend(upperIndexpr, subexpr);
149 (
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
150 errmsg(
"number of array dimensions (%d) exceeds the maximum allowed (%d)",
197 (
errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
198 errmsg(
"array subscript in assignment must not be null")));
216 (
errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
217 errmsg(
"array subscript in assignment must not be null")));
477 bool is_slice = (sbsrefstate->
numlower != 0);
487 (
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
488 errmsg(
"number of array dimensions (%d) exceeds the maximum allowed (%d)",
494 elog(
ERROR,
"upper and lower index lists are not same length");
544 .fetch_strict =
true,
545 .fetch_leakproof =
true,
546 .store_leakproof =
false 571 .fetch_strict =
true,
572 .fetch_leakproof =
true,
573 .store_leakproof =
false
#define PG_RETURN_POINTER(x)
Datum array_subscript_handler(PG_FUNCTION_ARGS)
Datum array_get_slice(Datum arraydatum, int nSubscripts, int *upperIndx, int *lowerIndx, bool *upperProvided, bool *lowerProvided, int arraytyplen, int elmlen, bool elmbyval, char elmalign)
static void array_subscript_assign(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
int exprLocation(const Node *expr)
static void array_subscript_fetch_old(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void get_typlenbyvalalign(Oid typid, int16 *typlen, bool *typbyval, char *typalign)
#define PointerGetDatum(X)
ExecEvalSubroutine sbs_fetch
static void array_exec_setup(const SubscriptingRef *sbsref, SubscriptingRefState *sbsrefstate, SubscriptExecSteps *methods)
Node * transformExpr(ParseState *pstate, Node *expr, ParseExprKind exprKind)
static void array_subscript_fetch(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
int errcode(int sqlerrcode)
ExecEvalSubroutine sbs_fetch_old
Datum array_set_element(Datum arraydatum, int nSubscripts, int *indx, Datum dataValue, bool isNull, int arraytyplen, int elmlen, bool elmbyval, char elmalign)
Datum idx(PG_FUNCTION_ARGS)
ArrayType * construct_empty_array(Oid elmtype)
ExecEvalSubroutine sbs_assign
Const * makeConst(Oid consttype, int32 consttypmod, Oid constcollid, int constlen, Datum constvalue, bool constisnull, bool constbyval)
Datum array_set_slice(Datum arraydatum, int nSubscripts, int *upperIndx, int *lowerIndx, bool *upperProvided, bool *lowerProvided, Datum srcArrayDatum, bool isNull, int arraytyplen, int elmlen, bool elmbyval, char elmalign)
static bool array_subscript_check_subscripts(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
union ExprEvalStep::@49 d
Node * coerce_to_target_type(ParseState *pstate, Node *expr, Oid exprtype, Oid targettype, int32 targettypmod, CoercionContext ccontext, CoercionForm cformat, int location)
#define lfirst_node(type, lc)
static void array_subscript_assign_slice(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static void array_subscript_fetch_slice(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
struct ExprEvalStep::@49::@76 sbsref_subscript
List * lappend(List *list, void *datum)
ParseExprKind p_expr_kind
#define ereport(elevel,...)
Datum array_get_element(Datum arraydatum, int nSubscripts, int *indx, int arraytyplen, int elmlen, bool elmbyval, char elmalign, bool *isNull)
#define Assert(condition)
Datum raw_array_subscript_handler(PG_FUNCTION_ARGS)
Oid exprType(const Node *expr)
static int list_length(const List *l)
int parser_errposition(ParseState *pstate, int location)
static void array_subscript_fetch_old_slice(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
struct ExprEvalStep::@49::@77 sbsref
struct ArraySubWorkspace ArraySubWorkspace
int16 get_typlen(Oid typid)
int errmsg(const char *fmt,...)
static void array_subscript_transform(SubscriptingRef *sbsref, List *indirection, ParseState *pstate, bool isSlice, bool isAssignment)
SubscriptTransform transform
ExecEvalBoolSubroutine sbs_check_subscripts