86 (
errcode(ERRCODE_TOO_MANY_COLUMNS),
87 errmsg(
"target lists can have at most %d entries",
149 pcbstate->
pstate = pstate;
212 if (*containerType == INT2VECTOROID)
213 *containerType = INT2ARRAYOID;
214 else if (*containerType == OIDVECTOROID)
215 *containerType = OIDARRAYOID;
251 int32 containerTypMod,
258 bool isSlice =
false;
276 (
errcode(ERRCODE_DATATYPE_MISMATCH),
277 errmsg(
"cannot subscript type %s because it does not support subscripting",
288 foreach(
idx, indirection)
304 sbsref->refcontainertype = containerType;
305 sbsref->refelemtype = elementType;
307 sbsref->reftypmod = containerTypMod;
317 sbsroutines->
transform(sbsref, indirection, pstate,
318 isSlice, isAssignment);
326 (
errcode(ERRCODE_DATATYPE_MISMATCH),
327 errmsg(
"cannot subscript type %s because it does not support subscripting",
381 typelen =
sizeof(
int32);
402 if (val64 == (int64) val32)
407 typelen =
sizeof(
int32);
415 typelen =
sizeof(int64);
Datum idx(PG_FUNCTION_ARGS)
Datum numeric_in(PG_FUNCTION_ARGS)
#define OidIsValid(objectId)
elog(ERROR, "%s: %s", p2, msg)
ErrorContextCallback * error_context_stack
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
int errposition(int cursorpos)
#define ereport(elevel,...)
Datum Int64GetDatum(int64 X)
#define DirectFunctionCall3(func, arg1, arg2, arg3)
#define MaxTupleAttributeNumber
Oid getBaseTypeAndTypmod(Oid typid, int32 *typmod)
const struct SubscriptRoutines * getSubscriptingRoutines(Oid typid, Oid *typelemp)
Const * makeConst(Oid consttype, int32 consttypmod, Oid constcollid, int constlen, Datum constvalue, bool constisnull, bool constbyval)
int pg_mbstrlen_with_len(const char *mbstr, int limit)
void pfree(void *pointer)
void * palloc0(Size size)
int exprLocation(const Node *expr)
int64 pg_strtoint64_safe(const char *s, Node *escontext)
void cancel_parser_errposition_callback(ParseCallbackState *pcbstate)
void free_parsestate(ParseState *pstate)
SubscriptingRef * transformContainerSubscripts(ParseState *pstate, Node *containerBase, Oid containerType, int32 containerTypMod, List *indirection, bool isAssignment)
int parser_errposition(ParseState *pstate, int location)
void setup_parser_errposition_callback(ParseCallbackState *pcbstate, ParseState *pstate, int location)
ParseState * make_parsestate(ParseState *parentParseState)
void transformContainerType(Oid *containerType, int32 *containerTypmod)
static void pcb_error_callback(void *arg)
Const * make_const(ParseState *pstate, A_Const *aconst)
#define lfirst_node(type, lc)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static Datum CStringGetDatum(const char *X)
static Datum Int32GetDatum(int32 X)
struct ErrorContextCallback * previous
void(* callback)(void *arg)
ErrorContextCallback errcallback
ParseState * parentParseState
ParseParamRefHook p_paramref_hook
PreParseColumnRefHook p_pre_columnref_hook
QueryEnvironment * p_queryEnv
const char * p_sourcetext
Relation p_target_relation
CoerceParamHook p_coerce_param_hook
PostParseColumnRefHook p_post_columnref_hook
SubscriptTransform transform
void table_close(Relation relation, LOCKMODE lockmode)
Datum bit_in(PG_FUNCTION_ARGS)