56 foreach(
idx, indirection)
67 errmsg(
"jsonb subscript does not support slices"),
89 for (
int i = 0;
i < 2;
i++)
101 errhint(
"jsonb subscript must be coercible to only one type, integer or text."),
115 errhint(
"jsonb subscript must be coercible to either integer or text."),
136 errmsg(
"jsonb subscript must have text type"),
148 errmsg(
"jsonb subscript does not support slices"),
161 sbsref->reftypmod = -1;
204 errmsg(
"jsonb subscript in assignment must not be null")));
407 .fetch_strict =
true,
408 .fetch_leakproof =
true,
409 .store_leakproof =
false
Datum idx(PG_FUNCTION_ARGS)
#define CStringGetTextDatum(s)
#define Assert(condition)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define DirectFunctionCall1(func, arg1)
#define PG_RETURN_POINTER(x)
Datum int4out(PG_FUNCTION_ARGS)
static Jsonb * DatumGetJsonbP(Datum d)
void JsonbToJsonbValue(Jsonb *jsonb, JsonbValue *val)
Jsonb * JsonbValueToJsonb(JsonbValue *val)
static bool jsonb_subscript_check_subscripts(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static void jsonb_subscript_transform(SubscriptingRef *sbsref, List *indirection, ParseState *pstate, bool isSlice, bool isAssignment)
Datum jsonb_subscript_handler(PG_FUNCTION_ARGS)
static void jsonb_subscript_assign(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static void jsonb_subscript_fetch(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static void jsonb_exec_setup(const SubscriptingRef *sbsref, SubscriptingRefState *sbsrefstate, SubscriptExecSteps *methods)
static void jsonb_subscript_fetch_old(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
Datum jsonb_set_element(Jsonb *jb, const Datum *path, int path_len, JsonbValue *newval)
Datum jsonb_get_element(Jsonb *jb, const Datum *path, int npath, bool *isnull, bool as_text)
List * lappend(List *list, void *datum)
void * palloc0(Size size)
Oid exprType(const Node *expr)
int exprLocation(const Node *expr)
Node * coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId, int32 targetTypeMod, CoercionContext ccontext, CoercionForm cformat, int location)
bool can_coerce_type(int nargs, const Oid *input_typeids, const Oid *target_typeids, CoercionContext ccontext)
Node * transformExpr(ParseState *pstate, Node *expr, ParseExprKind exprKind)
int parser_errposition(ParseState *pstate, int location)
#define lfirst_node(type, lc)
#define foreach_current_index(var_or_cell)
static char * DatumGetCString(Datum X)
struct SubscriptingRefState * state
struct ExprEvalStep::@58::@87 sbsref
struct ExprEvalStep::@58::@86 sbsref_subscript
union ExprEvalStep::@58 d
ParseExprKind p_expr_kind
ExecEvalSubroutine sbs_fetch_old
ExecEvalBoolSubroutine sbs_check_subscripts
ExecEvalSubroutine sbs_assign
ExecEvalSubroutine sbs_fetch
SubscriptTransform transform