88#ifdef HAVE_COMPUTED_GOTO
89#define EEO_USE_COMPUTED_GOTO
102#if defined(EEO_USE_COMPUTED_GOTO)
118#define EEO_CASE(name) CASE_##name:
119#define EEO_DISPATCH() goto *((void *) op->opcode)
120#define EEO_OPCODE(opcode) ((intptr_t) dispatch_table[opcode])
124#define EEO_SWITCH() starteval: switch ((ExprEvalOp) op->opcode)
125#define EEO_CASE(name) case name:
126#define EEO_DISPATCH() goto starteval
127#define EEO_OPCODE(opcode) (opcode)
137#define EEO_JUMP(stepno) \
139 op = &state->steps[stepno]; \
202#define SH_PREFIX saophash
203#define SH_ELEMENT_TYPE ScalarArrayOpExprHashEntry
204#define SH_KEY_TYPE Datum
205#define SH_SCOPE static inline
226#define SH_PREFIX saophash
227#define SH_ELEMENT_TYPE ScalarArrayOpExprHashEntry
228#define SH_KEY_TYPE Datum
230#define SH_HASH_KEY(tb, key) saop_element_hash(tb, key)
231#define SH_EQUAL(tb, a, b) saop_hash_element_match(tb, a, b)
232#define SH_SCOPE static inline
234#define SH_GET_HASH(tb, a) a->hash
283 if (
state->steps_len == 5)
299 else if (
state->steps_len == 4)
327 else if (
state->steps_len == 3)
389 else if (
state->steps_len == 2)
430#if defined(EEO_USE_COMPUTED_GOTO)
436 for (
int off = 0; off <
state->steps_len; off++)
473#if defined(EEO_USE_COMPUTED_GOTO)
599 "dispatch_table out of whack with ExprEvalOp");
609 resultslot =
state->resultslot;
616#if defined(EEO_USE_COMPUTED_GOTO)
625 return state->resvalue;
789 int attnum =
op->d.assign_var.attnum;
806 int attnum =
op->d.assign_var.attnum;
823 int attnum =
op->d.assign_var.attnum;
840 int attnum =
op->d.assign_var.attnum;
857 int attnum =
op->d.assign_var.attnum;
899 *
op->resnull =
op->d.constval.isnull;
900 *
op->resvalue =
op->d.constval.value;
926 d =
op->d.func.fn_addr(fcinfo);
953 d =
op->d.func.fn_addr(fcinfo);
977 d =
op->d.func.fn_addr(fcinfo);
1001 d =
op->d.func.fn_addr(fcinfo);
1037 *
op->d.boolexpr.anynull =
false;
1051 *
op->d.boolexpr.anynull =
true;
1079 else if (*
op->d.boolexpr.anynull)
1082 *
op->resnull =
true;
1104 *
op->d.boolexpr.anynull =
false;
1118 *
op->d.boolexpr.anynull =
true;
1146 else if (*
op->d.boolexpr.anynull)
1149 *
op->resnull =
true;
1181 *
op->resnull =
false;
1230 *
op->resnull =
false;
1238 *
op->resnull =
false;
1266 *
op->resnull =
false;
1278 *
op->resnull =
false;
1291 *
op->resnull =
false;
1304 *
op->resnull =
false;
1329 op->d.cparam.paramfunc(
state,
op, econtext);
1342 *
op->resvalue = *
op->d.casetest.value;
1343 *
op->resnull = *
op->d.casetest.isnull;
1361 if (!*
op->d.make_readonly.isnull)
1364 *
op->resnull = *
op->d.make_readonly.isnull;
1403 if (!
op->d.iocoerce.finfo_in->fn_strict ||
str !=
NULL)
1457 *
op->resnull =
false;
1463 *
op->resnull =
false;
1488 *
op->resnull =
false;
1493 *
op->resnull =
false;
1528 if (
op->d.func.make_ro)
1533 result =
op->d.func.fn_addr(fcinfo);
1539 *
op->resnull =
true;
1588 if (
state->flags &
op->d.returningexpr.nullflag)
1591 *
op->resnull =
true;
1629 if (
op->d.rowcompare_step.finfo->fn_strict &&
1632 *
op->resnull =
true;
1638 d =
op->d.rowcompare_step.fn_addr(fcinfo);
1644 *
op->resnull =
true;
1647 *
op->resnull =
false;
1663 *
op->resnull =
false;
1722 if (
op->d.sbsref_subscript.subscriptfunc(
state,
op, econtext))
1738 op->d.sbsref.subscriptfunc(
state,
op, econtext);
1769 *
op->resvalue = *
op->d.casetest.value;
1770 *
op->resnull = *
op->d.casetest.isnull;
1801 *
op->resvalue =
op->d.hashdatum_initvalue.init_value;
1802 *
op->resnull =
false;
1816 *
op->resvalue =
op->d.hashdatum.fn_addr(fcinfo);
1820 *
op->resnull =
false;
1836 *
op->resnull =
true;
1842 *
op->resvalue =
op->d.hashdatum.fn_addr(fcinfo);
1843 *
op->resnull =
false;
1868 *
op->resnull =
false;
1884 *
op->resnull =
true;
1900 *
op->resnull =
false;
1957 int aggno =
op->d.aggref.aggno;
2010 if (
op->d.agg_deserialize.fcinfo_data->args[0].isnull)
2045 int nargs =
op->d.agg_strict_input_check.nargs;
2052 EEO_JUMP(
op->d.agg_strict_input_check.jumpnull);
2066 EEO_JUMP(
op->d.agg_strict_input_check.jumpnull);
2072 bool *
nulls =
op->d.agg_strict_input_check.nulls;
2073 int nargs =
op->d.agg_strict_input_check.nargs;
2078 EEO_JUMP(
op->d.agg_strict_input_check.jumpnull);
2091 aggstate->all_pergroups[
op->d.agg_plain_pergroup_nullcheck.setoff];
2094 EEO_JUMP(
op->d.agg_plain_pergroup_nullcheck.jumpnull);
2116 &
aggstate->all_pergroups[
op->d.agg_trans.setoff][
op->d.agg_trans.transno];
2124 op->d.agg_trans.aggcontext);
2131 op->d.agg_trans.aggcontext,
2132 op->d.agg_trans.setno);
2144 &
aggstate->all_pergroups[
op->d.agg_trans.setoff][
op->d.agg_trans.transno];
2150 op->d.agg_trans.aggcontext,
2151 op->d.agg_trans.setno);
2162 &
aggstate->all_pergroups[
op->d.agg_trans.setoff][
op->d.agg_trans.transno];
2167 op->d.agg_trans.aggcontext,
2168 op->d.agg_trans.setno);
2179 &
aggstate->all_pergroups[
op->d.agg_trans.setoff][
op->d.agg_trans.transno];
2185 op->d.agg_trans.aggcontext);
2188 op->d.agg_trans.aggcontext,
2189 op->d.agg_trans.setno);
2200 &
aggstate->all_pergroups[
op->d.agg_trans.setoff][
op->d.agg_trans.transno];
2206 op->d.agg_trans.aggcontext,
2207 op->d.agg_trans.setno);
2217 &
aggstate->all_pergroups[
op->d.agg_trans.setoff][
op->d.agg_trans.transno];
2222 op->d.agg_trans.aggcontext,
2223 op->d.agg_trans.setno);
2236 EEO_JUMP(
op->d.agg_presorted_distinctcheck.jumpdistinct);
2247 EEO_JUMP(
op->d.agg_presorted_distinctcheck.jumpdistinct);
2299 return state->evalfunc(
state, econtext, isNull);
2321 for (
int i = 0;
i <
state->steps_len;
i++)
2403 elog(
ERROR,
"attribute number %d exceeds number of columns %d",
2410 elog(
ERROR,
"unexpected virtual generated column reference");
2412 if (attr->attisdropped)
2415 errmsg(
"attribute %d of type %s has been dropped",
2418 if (
vartype != attr->atttypid)
2421 errmsg(
"attribute %d of type %s has wrong type",
2423 errdetail(
"Table has type %s, but query expects %s.",
2435#ifdef USE_ASSERT_CHECKING
2437 if (!
op->d.fetch.fixed)
2503 errmsg(
"type %s is not composite",
2587 int attnum =
op->d.assign_var.attnum + 1;
2644 *
op->resnull = *
op->d.casetest.isnull;
2649 fcinfo =
op->d.func.fcinfo_data;
2662 d =
op->d.func.fn_addr(fcinfo);
2674 return op->d.constval.value;
2725 int attnum =
op->d.assign_var.attnum;
2818 return hashop->d.hashdatum.fn_addr(fcinfo);
2852 return hashop->d.hashdatum.fn_addr(fcinfo);
2895 return hashop->d.hashdatum.fn_addr(fcinfo);
2905#if defined(EEO_USE_COMPUTED_GOTO)
2916 if (
la->opcode < lb->opcode)
2918 else if (
la->opcode > lb->opcode)
2930#if defined(EEO_USE_COMPUTED_GOTO)
2962#if defined(EEO_USE_COMPUTED_GOTO)
2968 key.opcode = (
void *)
op->opcode;
3000 d =
op->d.func.fn_addr(fcinfo);
3026 *
op->resnull =
true;
3034 d =
op->d.func.fn_addr(fcinfo);
3060 *
op->resvalue =
prm->value;
3061 *
op->resnull =
prm->isnull;
3073 int paramId =
op->d.param.paramid;
3093 errmsg(
"type of parameter %d (%s) does not match that when preparing the plan (%s)",
3097 *
op->resvalue =
prm->value;
3098 *
op->resnull =
prm->isnull;
3105 errmsg(
"no value found for parameter %d", paramId)));
3122 prm->value = *
op->resvalue;
3123 prm->isnull = *
op->resnull;
3161 if (!
op->d.iocoerce.finfo_in->fn_strict ||
str !=
NULL)
3178 *
op->resnull =
true;
3200 *
op->resnull =
false;
3232 *
op->resnull = fcinfo->isnull;
3237 *
op->resnull = fcinfo->isnull;
3242 *
op->resnull = fcinfo->isnull;
3247 *
op->resnull = fcinfo->isnull;
3266 errmsg(
"WHERE CURRENT OF is not supported for this table type")));
3277 switch (
op->d.nextvalueexpr.seqtypid)
3289 elog(
ERROR,
"unsupported sequence type %u",
3290 op->d.nextvalueexpr.seqtypid);
3292 *
op->resnull =
false;
3326 *
op->resnull =
false;
3358 &
op->d.nulltest_row.rowcache,
NULL);
3405 int nelems =
op->d.arrayexpr.nelems;
3411 *
op->resnull =
false;
3413 if (!
op->d.arrayexpr.multidims)
3416 Datum *dvalues =
op->d.arrayexpr.elemvalues;
3417 bool *dnulls =
op->d.arrayexpr.elemnulls;
3426 op->d.arrayexpr.elemlength,
3427 op->d.arrayexpr.elembyval,
3428 op->d.arrayexpr.elemalign);
3479 errmsg(
"cannot merge incompatible arrays"),
3480 errdetail(
"Array with element type %s cannot be "
3481 "included in ARRAY construct with element type %s.",
3501 errmsg(
"number of array dimensions (%d) exceeds the maximum allowed (%d)",
3521 errmsg(
"multidimensional arrays must have array "
3522 "expressions with matching dimensions")));
3533 errmsg(
"array size exceeds the maximum allowed (%d)",
3556 errmsg(
"multidimensional arrays must have array "
3557 "expressions with matching dimensions")));
3563 for (
int i = 1;
i < ndims;
i++)
3576 nbytes += dataoffset;
3586 result->
ndim = ndims;
3629 if (
op->d.arraycoerce.elemexprstate ==
NULL)
3643 op->d.arraycoerce.elemexprstate,
3645 op->d.arraycoerce.resultelemtype,
3646 op->d.arraycoerce.amstate);
3662 op->d.row.elemvalues,
3663 op->d.row.elemnulls);
3666 *
op->resnull =
false;
3679 bool *
nulls =
op->d.minmax.nulls;
3688 *
op->resnull =
true;
3690 for (
int off = 0; off <
op->d.minmax.nelems; off++)
3700 *
op->resnull =
false;
3762 elog(
ERROR,
"unsupported reference to system column %d in FieldSelect",
3765 elog(
ERROR,
"attribute number %d exceeds number of columns %d",
3770 if (attr->attisdropped)
3772 *
op->resnull =
true;
3778 if (
op->d.fieldselect.resulttype != attr->atttypid)
3782 errdetail(
"Table has type %s, but query expects %s.",
3800 &
op->d.fieldselect.rowcache,
NULL);
3808 elog(
ERROR,
"unsupported reference to system column %d in FieldSelect",
3811 elog(
ERROR,
"attribute number %d exceeds number of columns %d",
3816 if (attr->attisdropped)
3818 *
op->resnull =
true;
3824 if (
op->d.fieldselect.resulttype != attr->atttypid)
3828 errdetail(
"Table has type %s, but query expects %s.",
3859 memset(
op->d.fieldstore.nulls,
true,
3860 op->d.fieldstore.ncolumns *
sizeof(
bool));
3886 op->d.fieldstore.rowcache,
NULL);
3890 elog(
ERROR,
"too many columns in composite type %u",
3891 op->d.fieldstore.fstore->resulttype);
3894 op->d.fieldstore.values,
3895 op->d.fieldstore.nulls);
3911 op->d.fieldstore.rowcache,
NULL);
3914 op->d.fieldstore.values,
3915 op->d.fieldstore.nulls);
3918 *
op->resnull =
false;
3951 op->d.convert_rowtype.incache,
3955 op->d.convert_rowtype.outcache,
3986 if (
op->d.convert_rowtype.map !=
NULL)
4026 bool useOr =
op->d.scalararrayop.useOr;
4027 bool strictfunc =
op->d.scalararrayop.finfo->fn_strict;
4059 *
op->resnull =
false;
4069 *
op->resnull =
true;
4080 &
op->d.scalararrayop.typlen,
4081 &
op->d.scalararrayop.typbyval,
4082 &
op->d.scalararrayop.typalign);
4086 typlen =
op->d.scalararrayop.typlen;
4105 if (bitmap && (*bitmap & bitmask) == 0)
4157 if (bitmask == 0x100)
4165 *
op->resvalue = result;
4230 bool inclause =
op->d.hashedscalararrayop.inclause;
4231 bool strictfunc =
op->d.hashedscalararrayop.finfo->fn_strict;
4247 *
op->resnull =
true;
4266 saop =
op->d.hashedscalararrayop.saop;
4311 if (bitmap && (*bitmap & bitmask) == 0)
4330 if (bitmask == 0x100)
4362 if (!
hashfound &&
op->d.hashedscalararrayop.has_nulls)
4388 result =
op->d.hashedscalararrayop.finfo->fn_addr(fcinfo);
4400 *
op->resvalue = result;
4413 errmsg(
"domain %s does not allow null values",
4424 if (!*
op->d.domaincheck.checknull &&
4428 errmsg(
"value for domain %s violates check constraint \"%s\"",
4430 op->d.domaincheck.constraintname),
4432 op->d.domaincheck.constraintname)));
4447 *
op->resnull =
true;
4467 *
op->resnull =
false;
4475 bool *
argnull =
op->d.xmlexpr.named_argnull;
4497 *
op->resnull =
false;
4516 op->d.xmlexpr.named_argvalue,
4517 op->d.xmlexpr.named_argnull,
4518 op->d.xmlexpr.argvalue,
4519 op->d.xmlexpr.argnull));
4520 *
op->resnull =
false;
4546 *
op->resnull =
false;
4605 *
op->resnull =
false;
4625 *
op->resnull =
false;
4643 *
op->resnull =
false;
4648 elog(
ERROR,
"unrecognized XML operation");
4725 elog(
ERROR,
"invalid JsonConstructorExpr type %d",
ctor->type);
4727 *
op->resvalue = res;
4873 *
op->resnull =
false;
4899 *
op->resnull =
true;
4901 else if (!
error && !empty)
4912 *
op->resnull =
false;
4933 elog(
ERROR,
"unrecognized SQL/JSON expression op %d",
4946 Assert(jump_eval_coercion == -1);
4976 *
op->resnull =
true;
5003 errmsg(
"no SQL/JSON item found for specified path of column \"%s\"",
5008 errmsg(
"no SQL/JSON item found for specified path"));
5019 *
op->resnull =
true;
5053 str[item->
val.string.len] =
'\0';
5066 switch (item->
val.datetime.typid)
5070 item->
val.datetime.value));
5073 item->
val.datetime.value));
5076 item->
val.datetime.value));
5079 item->
val.datetime.value));
5082 item->
val.datetime.value));
5084 elog(
ERROR,
"unexpected jsonb datetime type oid %u",
5085 item->
val.datetime.typid);
5127 if (
op->d.jsonexpr_coercion.exists_coerce)
5129 if (
op->d.jsonexpr_coercion.exists_cast_to_int)
5132 if (
op->d.jsonexpr_coercion.exists_check_domain &&
5134 op->d.jsonexpr_coercion.targettype,
5135 &
op->d.jsonexpr_coercion.json_coercion_cache,
5139 *
op->resnull =
true;
5154 op->d.jsonexpr_coercion.targettype,
5155 op->d.jsonexpr_coercion.targettypmod,
5156 &
op->d.jsonexpr_coercion.json_coercion_cache,
5159 op->d.jsonexpr_coercion.omit_quotes,
5208 errmsg(
"could not coerce %s expression (%s) to the RETURNING type",
5216 errmsg(
"could not coerce %s expression (%s) to the RETURNING type",
5222 *
op->resnull =
true;
5252 foreach(
lc,
op->d.grouping_func.clauses)
5263 *
op->resnull =
false;
5279 elog(
ERROR,
"no merge action in progress");
5282 switch (
relaction->mas_action->commandType)
5286 *
op->resnull =
false;
5290 *
op->resnull =
false;
5294 *
op->resnull =
false;
5297 elog(
ERROR,
"unexpected merge action: DO NOTHING");
5300 elog(
ERROR,
"unrecognized commandType: %d",
5301 (
int)
relaction->mas_action->commandType);
5362 switch (
variable->varreturningtype)
5372 *
op->resnull =
true;
5382 *
op->resnull =
true;
5392 if (
op->d.wholerow.junkFilter !=
NULL)
5402 if (
op->d.wholerow.first)
5405 op->d.wholerow.slow =
false;
5439 errmsg(
"table row type and query-specified row type do not match"),
5441 "Table row contains %d attributes, but query expects %d.",
5453 if (!
vattr->attisdropped)
5456 errmsg(
"table row type and query-specified row type do not match"),
5457 errdetail(
"Table has type %s at ordinal position %d, but query expects %s.",
5464 op->d.wholerow.slow =
true;
5525 op->d.wholerow.first =
false;
5534 if (
op->d.wholerow.slow)
5547 if (!
vattr->attisdropped)
5555 errmsg(
"table row type and query-specified row type do not match"),
5556 errdetail(
"Physical storage mismatch on dropped attribute at ordinal position %d.",
5581 *
op->resnull =
false;
5597 *
op->resnull =
true;
5608 elog(
ERROR,
"failed to fetch attribute from slot");
5632 pergroup->transValueIsNull =
false;
5812 int setno =
op->d.agg_trans.setno;
5815 *
op->resvalue, *
op->resnull);
5826 int setno =
op->d.agg_trans.setno;
#define DatumGetArrayTypePCopy(X)
#define ARR_NULLBITMAP(a)
#define ARR_OVERHEAD_WITHNULLS(ndims, nitems)
#define DatumGetArrayTypeP(X)
#define ARR_OVERHEAD_NONULLS(ndims)
#define ARR_DATA_OFFSET(a)
ArrayType * construct_empty_array(Oid elmtype)
Datum array_map(Datum arrayd, ExprState *exprstate, ExprContext *econtext, Oid retType, ArrayMapState *amstate)
ArrayType * construct_md_array(Datum *elems, bool *nulls, int ndims, int *dims, int *lbs, Oid elmtype, int elmlen, bool elmbyval, char elmalign)
void array_bitmap_copy(bits8 *destbitmap, int destoffset, const bits8 *srcbitmap, int srcoffset, int nitems)
int ArrayGetNItems(int ndim, const int *dims)
void ArrayCheckBounds(int ndim, const int *dims, const int *lb)
#define InvalidAttrNumber
Datum current_database(PG_FUNCTION_ARGS)
Datum numeric_out(PG_FUNCTION_ARGS)
Timestamp GetSQLLocalTimestamp(int32 typmod)
Datum timestamptz_out(PG_FUNCTION_ARGS)
Datum timestamp_out(PG_FUNCTION_ARGS)
TimestampTz GetSQLCurrentTimestamp(int32 typmod)
bool bms_is_member(int x, const Bitmapset *a)
Datum boolout(PG_FUNCTION_ARGS)
static Datum values[MAXATTR]
#define PG_USED_FOR_ASSERTS_ONLY
#define Assert(condition)
#define pg_attribute_always_inline
#define StaticAssertDecl(condition, errmessage)
#define OidIsValid(objectId)
int64 nextval_internal(Oid relid, bool check_permissions)
TimeADT GetSQLLocalTime(int32 typmod)
Datum date_out(PG_FUNCTION_ARGS)
Datum time_out(PG_FUNCTION_ARGS)
DateADT GetSQLCurrentDate(void)
TimeTzADT * GetSQLCurrentTime(int32 typmod)
Datum timetz_out(PG_FUNCTION_ARGS)
static Datum DateADTGetDatum(DateADT X)
static Datum TimeTzADTPGetDatum(const TimeTzADT *X)
static Datum TimeADTGetDatum(TimeADT X)
Datum datumCopy(Datum value, bool typByVal, int typLen)
int errdatatype(Oid datatypeOid)
int errdomainconstraint(Oid datatypeOid, const char *conname)
bool domain_check_safe(Datum value, bool isnull, Oid domainType, void **extra, MemoryContext mcxt, Node *escontext)
int errdetail(const char *fmt,...)
int errdetail_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define errsave(context,...)
#define ereport(elevel,...)
void ExecEvalParamExtern(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalFieldStoreForm(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalGroupingFunc(ExprState *state, ExprEvalStep *op)
static void CheckVarSlotCompatibility(TupleTableSlot *slot, int attnum, Oid vartype)
void ExecEvalRow(ExprState *state, ExprEvalStep *op)
static pg_attribute_always_inline Datum ExecJustVarVirtImpl(ExprState *state, TupleTableSlot *slot, bool *isnull)
static pg_attribute_always_inline Datum ExecJustAssignVarImpl(ExprState *state, TupleTableSlot *inslot, bool *isnull)
void ExecEvalFieldStoreDeForm(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalCurrentOfExpr(ExprState *state, ExprEvalStep *op)
void ExecEvalSQLValueFunction(ExprState *state, ExprEvalStep *op)
void ExecEvalRowNull(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalArrayExpr(ExprState *state, ExprEvalStep *op)
void ExecEvalParamSet(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static Datum ExecJustAssignInnerVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
static char * GetJsonBehaviorValueString(JsonBehavior *behavior)
void ExecEvalCoerceViaIOSafe(ExprState *state, ExprEvalStep *op)
static Datum ExecJustScanVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
static Datum ExecJustApplyFuncToCase(ExprState *state, ExprContext *econtext, bool *isnull)
Datum ExecInterpExprStillValid(ExprState *state, ExprContext *econtext, bool *isNull)
static pg_attribute_always_inline void ExecAggPlainTransByVal(AggState *aggstate, AggStatePerTrans pertrans, AggStatePerGroup pergroup, ExprContext *aggcontext, int setno)
static Datum ExecJustAssignScanVar(ExprState *state, ExprContext *econtext, bool *isnull)
static pg_attribute_always_inline Datum ExecJustHashVarImpl(ExprState *state, TupleTableSlot *slot, bool *isnull)
void ExecEvalConvertRowtype(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static Datum ExecJustHashInnerVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
bool ExecEvalPreOrderedDistinctMulti(AggState *aggstate, AggStatePerTrans pertrans)
void ExecEvalFieldSelect(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static Datum ExecJustInnerVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
static Datum ExecJustHashInnerVarWithIV(ExprState *state, ExprContext *econtext, bool *isnull)
int ExecEvalJsonExprPath(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalConstraintNotNull(ExprState *state, ExprEvalStep *op)
static void ExecInitInterpreter(void)
void ExecEvalScalarArrayOp(ExprState *state, ExprEvalStep *op)
void ExecEvalAggOrderedTransDatum(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static Datum ExecJustConst(ExprState *state, ExprContext *econtext, bool *isnull)
static Datum ExecJustOuterVar(ExprState *state, ExprContext *econtext, bool *isnull)
void ExecEvalParamExec(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalJsonCoercion(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecAggInitGroup(AggState *aggstate, AggStatePerTrans pertrans, AggStatePerGroup pergroup, ExprContext *aggcontext)
static pg_attribute_always_inline Datum ExecJustAssignVarVirtImpl(ExprState *state, TupleTableSlot *inslot, bool *isnull)
void ExecEvalNextValueExpr(ExprState *state, ExprEvalStep *op)
void ExecEvalSysVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext, TupleTableSlot *slot)
static bool saop_hash_element_match(struct saophash_hash *tb, Datum key1, Datum key2)
void ExecEvalMinMax(ExprState *state, ExprEvalStep *op)
void ExecEvalSubPlan(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalJsonIsPredicate(ExprState *state, ExprEvalStep *op)
static uint32 saop_element_hash(struct saophash_hash *tb, Datum key)
static Datum ExecJustInnerVar(ExprState *state, ExprContext *econtext, bool *isnull)
Datum ExecAggCopyTransValue(AggState *aggstate, AggStatePerTrans pertrans, Datum newValue, bool newValueIsNull, Datum oldValue, bool oldValueIsNull)
static Datum ExecJustAssignInnerVar(ExprState *state, ExprContext *econtext, bool *isnull)
static Datum ExecJustHashOuterVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
void ExecEvalMergeSupportFunc(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void CheckExprStillValid(ExprState *state, ExprContext *econtext)
void ExecEvalJsonConstructor(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalWholeRowVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalHashedScalarArrayOp(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalJsonCoercionFinish(ExprState *state, ExprEvalStep *op)
static pg_attribute_always_inline Datum ExecJustHashVarVirtImpl(ExprState *state, TupleTableSlot *slot, bool *isnull)
void ExecReadyInterpretedExpr(ExprState *state)
static char * ExecGetJsonValueItemString(JsonbValue *item, bool *resnull)
static Datum ExecJustAssignScanVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
static void ExecEvalRowNullInt(ExprState *state, ExprEvalStep *op, ExprContext *econtext, bool checkisnull)
void ExecEvalRowNotNull(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static Datum ExecJustHashOuterVarStrict(ExprState *state, ExprContext *econtext, bool *isnull)
ExprEvalOp ExecEvalStepOp(ExprState *state, ExprEvalStep *op)
static Datum ExecJustAssignOuterVar(ExprState *state, ExprContext *econtext, bool *isnull)
static Datum ExecJustHashOuterVar(ExprState *state, ExprContext *econtext, bool *isnull)
static Datum ExecJustAssignOuterVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
void ExecEvalConstraintCheck(ExprState *state, ExprEvalStep *op)
void ExecEvalArrayCoerce(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static void CheckOpSlotCompatibility(ExprEvalStep *op, TupleTableSlot *slot)
void ExecEvalFuncExprStrictFusage(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static Datum ExecJustOuterVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
static Datum ExecJustScanVar(ExprState *state, ExprContext *econtext, bool *isnull)
static Datum ExecInterpExpr(ExprState *state, ExprContext *econtext, bool *isnull)
static pg_attribute_always_inline Datum ExecJustVarImpl(ExprState *state, TupleTableSlot *slot, bool *isnull)
void ExecEvalFuncExprFusage(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op)
bool ExecEvalPreOrderedDistinctSingle(AggState *aggstate, AggStatePerTrans pertrans)
#define EEO_OPCODE(opcode)
static pg_attribute_always_inline void ExecAggPlainTransByRef(AggState *aggstate, AggStatePerTrans pertrans, AggStatePerGroup pergroup, ExprContext *aggcontext, int setno)
void ExecEvalAggOrderedTransTuple(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static TupleDesc get_cached_rowtype(Oid type_id, int32 typmod, ExprEvalRowtypeCache *rowcache, bool *changed)
static Datum ExecJustHashInnerVar(ExprState *state, ExprContext *econtext, bool *isnull)
#define EEO_FLAG_INTERPRETER_INITIALIZED
#define EEO_FLAG_DIRECT_THREADED
@ EEOP_FUNCEXPR_STRICT_FUSAGE
@ EEOP_HASHDATUM_NEXT32_STRICT
@ EEOP_JSONEXPR_COERCION_FINISH
@ EEOP_HASHDATUM_FIRST_STRICT
@ EEOP_AGG_PLAIN_PERGROUP_NULLCHECK
@ EEOP_AGG_STRICT_DESERIALIZE
@ EEOP_BOOLTEST_IS_NOT_FALSE
@ EEOP_AGG_PLAIN_TRANS_BYREF
@ EEOP_AGG_PRESORTED_DISTINCT_MULTI
@ EEOP_AGG_PLAIN_TRANS_BYVAL
@ EEOP_NULLTEST_ROWISNOTNULL
@ EEOP_ASSIGN_TMP_MAKE_RO
@ EEOP_BOOL_OR_STEP_FIRST
@ EEOP_AGG_STRICT_INPUT_CHECK_NULLS
@ EEOP_AGG_STRICT_INPUT_CHECK_ARGS_1
@ EEOP_AGG_STRICT_INPUT_CHECK_ARGS
@ EEOP_NULLTEST_ROWISNULL
@ EEOP_NULLTEST_ISNOTNULL
@ EEOP_MERGE_SUPPORT_FUNC
@ EEOP_AGG_PRESORTED_DISTINCT_SINGLE
@ EEOP_BOOL_AND_STEP_FIRST
@ EEOP_DOMAIN_TESTVAL_EXT
@ EEOP_BOOL_AND_STEP_LAST
@ EEOP_AGG_ORDERED_TRANS_DATUM
@ EEOP_HASHDATUM_SET_INITVAL
@ EEOP_AGG_PLAIN_TRANS_STRICT_BYREF
@ EEOP_BOOLTEST_IS_NOT_TRUE
@ EEOP_AGG_PLAIN_TRANS_INIT_STRICT_BYVAL
@ EEOP_AGG_PLAIN_TRANS_STRICT_BYVAL
@ EEOP_AGG_PLAIN_TRANS_INIT_STRICT_BYREF
@ EEOP_HASHED_SCALARARRAYOP
@ EEOP_AGG_ORDERED_TRANS_TUPLE
TupleTableSlot * ExecFilterJunk(JunkFilter *junkfilter, TupleTableSlot *slot)
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
const TupleTableSlotOps TTSOpsVirtual
TupleTableSlot * ExecStoreVirtualTuple(TupleTableSlot *slot)
void ExecTypeSetColNames(TupleDesc typeInfo, List *namesList)
const TupleTableSlotOps TTSOpsBufferHeapTuple
const TupleTableSlotOps TTSOpsHeapTuple
Datum(* ExprStateEvalFunc)(ExprState *expression, ExprContext *econtext, bool *isNull)
#define EEO_FLAG_NEW_IS_NULL
#define EEO_FLAG_OLD_IS_NULL
static RangeTblEntry * exec_rt_fetch(Index rti, EState *estate)
static bool ExecQual(ExprState *state, ExprContext *econtext)
ExpandedObjectHeader * DatumGetEOHP(Datum d)
void DeleteExpandedObject(Datum d)
Datum MakeExpandedObjectReadOnlyInternal(Datum d)
#define DatumIsReadWriteExpandedObject(d, isnull, typlen)
static Datum expanded_record_get_field(ExpandedRecordHeader *erh, int fnumber, bool *isnull)
static TupleDesc expanded_record_get_tupdesc(ExpandedRecordHeader *erh)
Datum FunctionCall2Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2)
void fmgr_info(Oid functionId, FmgrInfo *finfo)
#define DatumGetHeapTupleHeader(X)
#define DatumGetTextPP(X)
#define SizeForFunctionCallInfo(nargs)
#define InitFunctionCallInfoData(Fcinfo, Flinfo, Nargs, Collation, Context, Resultinfo)
#define DirectFunctionCall1(func, arg1)
#define LOCAL_FCINFO(name, nargs)
#define FunctionCallInvoke(fcinfo)
#define fmgr_info_set_expr(expr, finfo)
static Datum HeapTupleGetDatum(const HeapTupleData *tuple)
HeapTuple toast_build_flattened_tuple(TupleDesc tupleDesc, const Datum *values, const bool *isnull)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
bool heap_attisnull(HeapTuple tup, int attnum, TupleDesc tupleDesc)
void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc, Datum *values, bool *isnull)
Datum heap_copy_tuple_as_datum(HeapTuple tuple, TupleDesc tupleDesc)
static Datum heap_getattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
static void HeapTupleHeaderSetTypMod(HeapTupleHeaderData *tup, int32 typmod)
static int32 HeapTupleHeaderGetTypMod(const HeapTupleHeaderData *tup)
static void HeapTupleHeaderSetTypeId(HeapTupleHeaderData *tup, Oid datum_typeid)
static uint32 HeapTupleHeaderGetDatumLength(const HeapTupleHeaderData *tup)
static Oid HeapTupleHeaderGetTypeId(const HeapTupleHeaderData *tup)
Datum bool_int4(PG_FUNCTION_ARGS)
static void ItemPointerSetInvalid(ItemPointerData *pointer)
Datum json_build_array_worker(int nargs, const Datum *args, const bool *nulls, const Oid *types, bool absent_on_null)
Datum json_build_object_worker(int nargs, const Datum *args, const bool *nulls, const Oid *types, bool absent_on_null, bool unique_keys)
Datum datum_to_json(Datum val, JsonTypeCategory tcategory, Oid outfuncoid)
bool json_validate(text *json, bool check_unique_keys, bool throw_error)
@ JSON_TOKEN_OBJECT_START
Datum jsonb_from_text(text *js, bool unique_keys)
Datum jsonb_build_array_worker(int nargs, const Datum *args, const bool *nulls, const Oid *types, bool absent_on_null)
Datum jsonb_in(PG_FUNCTION_ARGS)
Datum jsonb_out(PG_FUNCTION_ARGS)
Datum jsonb_build_object_worker(int nargs, const Datum *args, const bool *nulls, const Oid *types, bool absent_on_null, bool unique_keys)
Datum datum_to_jsonb(Datum val, JsonTypeCategory tcategory, Oid outfuncoid)
#define JB_ROOT_IS_OBJECT(jbp_)
static Datum JsonbPGetDatum(const Jsonb *p)
#define JB_ROOT_IS_ARRAY(jbp_)
static Jsonb * DatumGetJsonbP(Datum d)
#define JB_ROOT_IS_SCALAR(jbp_)
Jsonb * JsonbValueToJsonb(JsonbValue *val)
Datum json_populate_type(Datum json_val, Oid json_type, Oid typid, int32 typmod, void **cache, MemoryContext mcxt, bool *isnull, bool omit_quotes, Node *escontext)
JsonTokenType json_get_first_token(text *json, bool throw_error)
static JsonPath * DatumGetJsonPathP(Datum d)
bool JsonPathExists(Datum jb, JsonPath *jp, bool *error, List *vars)
Datum JsonPathQuery(Datum jb, JsonPath *jp, JsonWrapper wrapper, bool *empty, bool *error, List *vars, const char *column_name)
JsonbValue * JsonPathValue(Datum jb, JsonPath *jp, bool *empty, bool *error, List *vars, const char *column_name)
List * lappend(List *list, void *datum)
void get_typlenbyvalalign(Oid typid, int16 *typlen, bool *typbyval, char *typalign)
char * pstrdup(const char *in)
void pfree(void *pointer)
void * palloc0(Size size)
MemoryContext CurrentMemoryContext
MemoryContext MemoryContextGetParent(MemoryContext context)
#define AllocSizeIsValid(size)
#define SOFT_ERROR_OCCURRED(escontext)
Datum current_user(PG_FUNCTION_ARGS)
Datum session_user(PG_FUNCTION_ARGS)
Datum current_schema(PG_FUNCTION_ARGS)
Oid exprType(const Node *expr)
void ExecSetParamPlan(SubPlanState *node, ExprContext *econtext)
Datum ExecSubPlan(SubPlanState *node, ExprContext *econtext, bool *isNull)
#define IsA(nodeptr, _type_)
#define castNode(_type_, nodeptr)
static Datum NumericGetDatum(Numeric X)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
FormData_pg_attribute * Form_pg_attribute
static uint32 pg_rotate_left32(uint32 word, int n)
static int list_length(const List *l)
#define forboth(cell1, list1, cell2, list2)
static char buf[DEFAULT_XLOG_SEG_SIZE]
void pgstat_init_function_usage(FunctionCallInfo fcinfo, PgStat_FunctionCallUsage *fcu)
void pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu, bool finalize)
#define qsort(a, b, c, d)
static uint32 DatumGetUInt32(Datum X)
static Datum Int64GetDatum(int64 X)
static bool DatumGetBool(Datum X)
static Datum PointerGetDatum(const void *X)
static Datum Int16GetDatum(int16 X)
static Datum BoolGetDatum(bool X)
static char * DatumGetCString(Datum X)
static Pointer DatumGetPointer(Datum X)
static Datum CStringGetDatum(const char *X)
static Datum Int32GetDatum(int32 X)
static Datum UInt32GetDatum(uint32 X)
static int32 DatumGetInt32(Datum X)
@ SVFOP_CURRENT_TIMESTAMP
@ SVFOP_CURRENT_TIMESTAMP_N
static chr element(struct vars *v, const chr *startp, const chr *endp)
static unsigned hash(unsigned *uv, int n)
void check_stack_depth(void)
void appendStringInfo(StringInfo str, const char *fmt,...)
void initStringInfo(StringInfo str)
TupleTableSlot * sortslot
Tuplesortstate ** sortstates
TupleTableSlot * uniqslot
FunctionCallInfo transfn_fcinfo
Index es_range_table_size
ParamListInfo ecxt_param_list_info
MemoryContext ecxt_per_tuple_memory
TupleTableSlot * ecxt_innertuple
ParamExecData * ecxt_param_exec_vals
TupleTableSlot * ecxt_newtuple
TupleTableSlot * ecxt_scantuple
TupleTableSlot * ecxt_oldtuple
MemoryContext ecxt_per_query_memory
struct EState * ecxt_estate
TupleTableSlot * ecxt_outertuple
struct ScalarArrayOpExprHashTable * elements_tab
AggStatePerTrans pertrans
struct JsonExprState * jsestate
FunctionCallInfo fcinfo_data
ErrorSaveContext * escontext
union ExprEvalStep::@58 d
ExprEvalRowtypeCache rowcache
struct ExprEvalStep::@58::@93 hashedscalararrayop
struct JsonConstructorExprState * jcstate
struct ExprEvalStep::@58::@60 var
NullableDatum args[FLEXIBLE_ARRAY_MEMBER]
JsonConstructorExpr * constructor
struct JsonConstructorExprState::@108 * arg_type_cache
JsonReturning * returning
FunctionCallInfo input_fcinfo
ErrorSaveContext escontext
NullableDatum formatted_expr
JsonReturning * returning
MergeActionState * mt_merge_action
FunctionCallInfoBaseData hash_fcinfo_data
TupleDesc tts_tupleDescriptor
const TupleTableSlotOps *const tts_ops
uint64 tupDesc_identifier
TupleConversionMap * convert_tuples_by_name(TupleDesc indesc, TupleDesc outdesc)
HeapTuple execute_attr_map_tuple(HeapTuple tuple, TupleConversionMap *map)
void DecrTupleDescRefCount(TupleDesc tupdesc)
void IncrTupleDescRefCount(TupleDesc tupdesc)
TupleDesc CreateTupleDescCopy(TupleDesc tupdesc)
#define ReleaseTupleDesc(tupdesc)
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
static CompactAttribute * TupleDescCompactAttr(TupleDesc tupdesc, int i)
struct TupleDescData * TupleDesc
void tuplesort_putdatum(Tuplesortstate *state, Datum val, bool isNull)
void tuplesort_puttupleslot(Tuplesortstate *state, TupleTableSlot *slot)
#define att_align_nominal(cur_offset, attalign)
#define att_addlength_pointer(cur_offset, attlen, attptr)
static Datum fetch_att(const void *T, bool attbyval, int attlen)
#define TTS_IS_VIRTUAL(slot)
static void slot_getsomeattrs(TupleTableSlot *slot, int attnum)
static Datum slot_getsysattr(TupleTableSlot *slot, int attnum, bool *isnull)
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
static void slot_getallattrs(TupleTableSlot *slot)
static TupleTableSlot * ExecCopySlot(TupleTableSlot *dstslot, TupleTableSlot *srcslot)
TupleDesc lookup_rowtype_tupdesc(Oid type_id, int32 typmod)
TupleDesc lookup_rowtype_tupdesc_domain(Oid type_id, int32 typmod, bool noError)
TypeCacheEntry * lookup_type_cache(Oid type_id, int flags)
#define TYPECACHE_TUPDESC
static Datum TimestampTzGetDatum(TimestampTz X)
static Datum TimestampGetDatum(Timestamp X)
static bool VARATT_IS_EXTERNAL_EXPANDED(const void *PTR)
static void SET_VARSIZE(void *PTR, Size len)
text * cstring_to_text_with_len(const char *s, int len)
Datum textin(PG_FUNCTION_ARGS)
xmltype * xmlroot(xmltype *data, text *version, int standalone)
text * xmltotext_with_options(xmltype *data, XmlOptionType xmloption_arg, bool indent)
char * map_sql_value_to_xml_value(Datum value, Oid type, bool xml_escape_strings)
xmltype * xmlconcat(List *args)
bool xml_is_document(xmltype *arg)
xmltype * xmlparse(text *data, XmlOptionType xmloption_arg, bool preserve_whitespace)
xmltype * xmlelement(XmlExpr *xexpr, const Datum *named_argvalue, const bool *named_argnull, const Datum *argvalue, const bool *argnull)
xmltype * xmlpi(const char *target, text *arg, bool arg_is_null, bool *result_is_null)
static xmltype * DatumGetXmlP(Datum X)