17#include "catalog/pg_type_d.h"
57 foreach(
idx, indirection)
68 errmsg(
"jsonb subscript does not support slices"),
90 for (
int i = 0;
i < 2;
i++)
102 errhint(
"jsonb subscript must be coercible to only one type, integer or text."),
116 errhint(
"jsonb subscript must be coercible to either integer or text."),
137 errmsg(
"jsonb subscript must have text type"),
149 errmsg(
"jsonb subscript does not support slices"),
162 sbsref->reftypmod = -1;
205 errmsg(
"jsonb subscript in assignment must not be null")));
408 .fetch_strict =
true,
409 .fetch_leakproof =
true,
410 .store_leakproof =
false
Datum idx(PG_FUNCTION_ARGS)
#define CStringGetTextDatum(s)
#define Assert(condition)
int errcode(int sqlerrcode)
int errhint(const char *fmt,...) pg_attribute_printf(1
#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)
union ExprEvalStep::@60 d
struct SubscriptingRefState * state
struct ExprEvalStep::@60::@88 sbsref_subscript
struct ExprEvalStep::@60::@89 sbsref
ParseExprKind p_expr_kind
ExecEvalSubroutine sbs_fetch_old
ExecEvalBoolSubroutine sbs_check_subscripts
ExecEvalSubroutine sbs_assign
ExecEvalSubroutine sbs_fetch
SubscriptTransform transform