90#ifdef HAVE_COMPUTED_GOTO
91#define EEO_USE_COMPUTED_GOTO
104#if defined(EEO_USE_COMPUTED_GOTO)
120#define EEO_CASE(name) CASE_##name:
121#define EEO_DISPATCH() goto *((void *) op->opcode)
122#define EEO_OPCODE(opcode) ((intptr_t) dispatch_table[opcode])
126#define EEO_SWITCH() starteval: switch ((ExprEvalOp) op->opcode)
127#define EEO_CASE(name) case name:
128#define EEO_DISPATCH() goto starteval
129#define EEO_OPCODE(opcode) (opcode)
139#define EEO_JUMP(stepno) \
141 op = &state->steps[stepno]; \
204#define SH_PREFIX saophash
205#define SH_ELEMENT_TYPE ScalarArrayOpExprHashEntry
206#define SH_KEY_TYPE Datum
207#define SH_SCOPE static inline
228#define SH_PREFIX saophash
229#define SH_ELEMENT_TYPE ScalarArrayOpExprHashEntry
230#define SH_KEY_TYPE Datum
232#define SH_HASH_KEY(tb, key) saop_element_hash(tb, key)
233#define SH_EQUAL(tb, a, b) saop_hash_element_match(tb, a, b)
234#define SH_SCOPE static inline
236#define SH_GET_HASH(tb, a) a->hash
285 if (
state->steps_len == 5)
301 else if (
state->steps_len == 4)
329 else if (
state->steps_len == 3)
391 else if (
state->steps_len == 2)
432#if defined(EEO_USE_COMPUTED_GOTO)
438 for (
int off = 0; off <
state->steps_len; off++)
475#if defined(EEO_USE_COMPUTED_GOTO)
601 "dispatch_table out of whack with ExprEvalOp");
611 resultslot =
state->resultslot;
618#if defined(EEO_USE_COMPUTED_GOTO)
627 return state->resvalue;
791 int attnum =
op->d.assign_var.attnum;
808 int attnum =
op->d.assign_var.attnum;
825 int attnum =
op->d.assign_var.attnum;
842 int attnum =
op->d.assign_var.attnum;
859 int attnum =
op->d.assign_var.attnum;
901 *
op->resnull =
op->d.constval.isnull;
902 *
op->resvalue =
op->d.constval.value;
928 d =
op->d.func.fn_addr(fcinfo);
955 d =
op->d.func.fn_addr(fcinfo);
979 d =
op->d.func.fn_addr(fcinfo);
1003 d =
op->d.func.fn_addr(fcinfo);
1039 *
op->d.boolexpr.anynull =
false;
1053 *
op->d.boolexpr.anynull =
true;
1081 else if (*
op->d.boolexpr.anynull)
1084 *
op->resnull =
true;
1106 *
op->d.boolexpr.anynull =
false;
1120 *
op->d.boolexpr.anynull =
true;
1148 else if (*
op->d.boolexpr.anynull)
1151 *
op->resnull =
true;
1183 *
op->resnull =
false;
1232 *
op->resnull =
false;
1240 *
op->resnull =
false;
1268 *
op->resnull =
false;
1280 *
op->resnull =
false;
1293 *
op->resnull =
false;
1306 *
op->resnull =
false;
1331 op->d.cparam.paramfunc(
state,
op, econtext);
1344 *
op->resvalue = *
op->d.casetest.value;
1345 *
op->resnull = *
op->d.casetest.isnull;
1363 if (!*
op->d.make_readonly.isnull)
1366 *
op->resnull = *
op->d.make_readonly.isnull;
1405 if (!
op->d.iocoerce.finfo_in->fn_strict ||
str !=
NULL)
1459 *
op->resnull =
false;
1465 *
op->resnull =
false;
1490 *
op->resnull =
false;
1495 *
op->resnull =
false;
1530 if (
op->d.func.make_ro)
1535 result =
op->d.func.fn_addr(fcinfo);
1541 *
op->resnull =
true;
1590 if (
state->flags &
op->d.returningexpr.nullflag)
1593 *
op->resnull =
true;
1631 if (
op->d.rowcompare_step.finfo->fn_strict &&
1634 *
op->resnull =
true;
1640 d =
op->d.rowcompare_step.fn_addr(fcinfo);
1646 *
op->resnull =
true;
1649 *
op->resnull =
false;
1665 *
op->resnull =
false;
1724 if (
op->d.sbsref_subscript.subscriptfunc(
state,
op, econtext))
1740 op->d.sbsref.subscriptfunc(
state,
op, econtext);
1771 *
op->resvalue = *
op->d.casetest.value;
1772 *
op->resnull = *
op->d.casetest.isnull;
1803 *
op->resvalue =
op->d.hashdatum_initvalue.init_value;
1804 *
op->resnull =
false;
1818 *
op->resvalue =
op->d.hashdatum.fn_addr(fcinfo);
1822 *
op->resnull =
false;
1838 *
op->resnull =
true;
1844 *
op->resvalue =
op->d.hashdatum.fn_addr(fcinfo);
1845 *
op->resnull =
false;
1870 *
op->resnull =
false;
1886 *
op->resnull =
true;
1902 *
op->resnull =
false;
1959 int aggno =
op->d.aggref.aggno;
2012 if (
op->d.agg_deserialize.fcinfo_data->args[0].isnull)
2047 int nargs =
op->d.agg_strict_input_check.nargs;
2054 EEO_JUMP(
op->d.agg_strict_input_check.jumpnull);
2068 EEO_JUMP(
op->d.agg_strict_input_check.jumpnull);
2074 bool *
nulls =
op->d.agg_strict_input_check.nulls;
2075 int nargs =
op->d.agg_strict_input_check.nargs;
2080 EEO_JUMP(
op->d.agg_strict_input_check.jumpnull);
2093 aggstate->all_pergroups[
op->d.agg_plain_pergroup_nullcheck.setoff];
2096 EEO_JUMP(
op->d.agg_plain_pergroup_nullcheck.jumpnull);
2118 &
aggstate->all_pergroups[
op->d.agg_trans.setoff][
op->d.agg_trans.transno];
2126 op->d.agg_trans.aggcontext);
2133 op->d.agg_trans.aggcontext,
2134 op->d.agg_trans.setno);
2146 &
aggstate->all_pergroups[
op->d.agg_trans.setoff][
op->d.agg_trans.transno];
2152 op->d.agg_trans.aggcontext,
2153 op->d.agg_trans.setno);
2164 &
aggstate->all_pergroups[
op->d.agg_trans.setoff][
op->d.agg_trans.transno];
2169 op->d.agg_trans.aggcontext,
2170 op->d.agg_trans.setno);
2181 &
aggstate->all_pergroups[
op->d.agg_trans.setoff][
op->d.agg_trans.transno];
2187 op->d.agg_trans.aggcontext);
2190 op->d.agg_trans.aggcontext,
2191 op->d.agg_trans.setno);
2202 &
aggstate->all_pergroups[
op->d.agg_trans.setoff][
op->d.agg_trans.transno];
2208 op->d.agg_trans.aggcontext,
2209 op->d.agg_trans.setno);
2219 &
aggstate->all_pergroups[
op->d.agg_trans.setoff][
op->d.agg_trans.transno];
2224 op->d.agg_trans.aggcontext,
2225 op->d.agg_trans.setno);
2238 EEO_JUMP(
op->d.agg_presorted_distinctcheck.jumpdistinct);
2249 EEO_JUMP(
op->d.agg_presorted_distinctcheck.jumpdistinct);
2301 return state->evalfunc(
state, econtext, isNull);
2323 for (
int i = 0;
i <
state->steps_len;
i++)
2405 elog(
ERROR,
"attribute number %d exceeds number of columns %d",
2412 elog(
ERROR,
"unexpected virtual generated column reference");
2414 if (attr->attisdropped)
2417 errmsg(
"attribute %d of type %s has been dropped",
2420 if (
vartype != attr->atttypid)
2423 errmsg(
"attribute %d of type %s has wrong type",
2425 errdetail(
"Table has type %s, but query expects %s.",
2437#ifdef USE_ASSERT_CHECKING
2439 if (!
op->d.fetch.fixed)
2505 errmsg(
"type %s is not composite",
2589 int attnum =
op->d.assign_var.attnum + 1;
2646 *
op->resnull = *
op->d.casetest.isnull;
2651 fcinfo =
op->d.func.fcinfo_data;
2664 d =
op->d.func.fn_addr(fcinfo);
2676 return op->d.constval.value;
2727 int attnum =
op->d.assign_var.attnum;
2820 return hashop->d.hashdatum.fn_addr(fcinfo);
2854 return hashop->d.hashdatum.fn_addr(fcinfo);
2897 return hashop->d.hashdatum.fn_addr(fcinfo);
2907#if defined(EEO_USE_COMPUTED_GOTO)
2918 if (
la->opcode < lb->opcode)
2920 else if (
la->opcode > lb->opcode)
2932#if defined(EEO_USE_COMPUTED_GOTO)
2964#if defined(EEO_USE_COMPUTED_GOTO)
2970 key.opcode = (
void *)
op->opcode;
3002 d =
op->d.func.fn_addr(fcinfo);
3028 *
op->resnull =
true;
3036 d =
op->d.func.fn_addr(fcinfo);
3062 *
op->resvalue =
prm->value;
3063 *
op->resnull =
prm->isnull;
3075 int paramId =
op->d.param.paramid;
3095 errmsg(
"type of parameter %d (%s) does not match that when preparing the plan (%s)",
3099 *
op->resvalue =
prm->value;
3100 *
op->resnull =
prm->isnull;
3107 errmsg(
"no value found for parameter %d", paramId)));
3124 prm->value = *
op->resvalue;
3125 prm->isnull = *
op->resnull;
3163 if (!
op->d.iocoerce.finfo_in->fn_strict ||
str !=
NULL)
3180 *
op->resnull =
true;
3202 *
op->resnull =
false;
3234 *
op->resnull = fcinfo->isnull;
3239 *
op->resnull = fcinfo->isnull;
3244 *
op->resnull = fcinfo->isnull;
3249 *
op->resnull = fcinfo->isnull;
3268 errmsg(
"WHERE CURRENT OF is not supported for this table type")));
3279 switch (
op->d.nextvalueexpr.seqtypid)
3291 elog(
ERROR,
"unsupported sequence type %u",
3292 op->d.nextvalueexpr.seqtypid);
3294 *
op->resnull =
false;
3328 *
op->resnull =
false;
3360 &
op->d.nulltest_row.rowcache,
NULL);
3407 int nelems =
op->d.arrayexpr.nelems;
3413 *
op->resnull =
false;
3415 if (!
op->d.arrayexpr.multidims)
3418 Datum *dvalues =
op->d.arrayexpr.elemvalues;
3419 bool *dnulls =
op->d.arrayexpr.elemnulls;
3428 op->d.arrayexpr.elemlength,
3429 op->d.arrayexpr.elembyval,
3430 op->d.arrayexpr.elemalign);
3481 errmsg(
"cannot merge incompatible arrays"),
3482 errdetail(
"Array with element type %s cannot be "
3483 "included in ARRAY construct with element type %s.",
3503 errmsg(
"number of array dimensions (%d) exceeds the maximum allowed (%d)",
3523 errmsg(
"multidimensional arrays must have array "
3524 "expressions with matching dimensions")));
3535 errmsg(
"array size exceeds the maximum allowed (%d)",
3558 errmsg(
"multidimensional arrays must have array "
3559 "expressions with matching dimensions")));
3565 for (
int i = 1;
i < ndims;
i++)
3578 nbytes += dataoffset;
3588 result->
ndim = ndims;
3631 if (
op->d.arraycoerce.elemexprstate ==
NULL)
3645 op->d.arraycoerce.elemexprstate,
3647 op->d.arraycoerce.resultelemtype,
3648 op->d.arraycoerce.amstate);
3664 op->d.row.elemvalues,
3665 op->d.row.elemnulls);
3668 *
op->resnull =
false;
3681 bool *
nulls =
op->d.minmax.nulls;
3690 *
op->resnull =
true;
3692 for (
int off = 0; off <
op->d.minmax.nelems; off++)
3702 *
op->resnull =
false;
3764 elog(
ERROR,
"unsupported reference to system column %d in FieldSelect",
3767 elog(
ERROR,
"attribute number %d exceeds number of columns %d",
3772 if (attr->attisdropped)
3774 *
op->resnull =
true;
3780 if (
op->d.fieldselect.resulttype != attr->atttypid)
3784 errdetail(
"Table has type %s, but query expects %s.",
3802 &
op->d.fieldselect.rowcache,
NULL);
3810 elog(
ERROR,
"unsupported reference to system column %d in FieldSelect",
3813 elog(
ERROR,
"attribute number %d exceeds number of columns %d",
3818 if (attr->attisdropped)
3820 *
op->resnull =
true;
3826 if (
op->d.fieldselect.resulttype != attr->atttypid)
3830 errdetail(
"Table has type %s, but query expects %s.",
3861 memset(
op->d.fieldstore.nulls,
true,
3862 op->d.fieldstore.ncolumns *
sizeof(
bool));
3888 op->d.fieldstore.rowcache,
NULL);
3892 elog(
ERROR,
"too many columns in composite type %u",
3893 op->d.fieldstore.fstore->resulttype);
3896 op->d.fieldstore.values,
3897 op->d.fieldstore.nulls);
3913 op->d.fieldstore.rowcache,
NULL);
3916 op->d.fieldstore.values,
3917 op->d.fieldstore.nulls);
3920 *
op->resnull =
false;
3953 op->d.convert_rowtype.incache,
3957 op->d.convert_rowtype.outcache,
3988 if (
op->d.convert_rowtype.map !=
NULL)
4028 bool useOr =
op->d.scalararrayop.useOr;
4029 bool strictfunc =
op->d.scalararrayop.finfo->fn_strict;
4062 *
op->resnull =
false;
4072 *
op->resnull =
true;
4083 &
op->d.scalararrayop.typlen,
4084 &
op->d.scalararrayop.typbyval,
4085 &
op->d.scalararrayop.typalign);
4089 typlen =
op->d.scalararrayop.typlen;
4109 if (bitmap && (*bitmap & bitmask) == 0)
4161 if (bitmask == 0x100)
4169 *
op->resvalue = result;
4234 bool inclause =
op->d.hashedscalararrayop.inclause;
4235 bool strictfunc =
op->d.hashedscalararrayop.finfo->fn_strict;
4251 *
op->resnull =
true;
4271 saop =
op->d.hashedscalararrayop.saop;
4317 if (bitmap && (*bitmap & bitmask) == 0)
4336 if (bitmask == 0x100)
4368 if (!
hashfound &&
op->d.hashedscalararrayop.has_nulls)
4394 result =
op->d.hashedscalararrayop.finfo->fn_addr(fcinfo);
4406 *
op->resvalue = result;
4419 errmsg(
"domain %s does not allow null values",
4430 if (!*
op->d.domaincheck.checknull &&
4434 errmsg(
"value for domain %s violates check constraint \"%s\"",
4436 op->d.domaincheck.constraintname),
4438 op->d.domaincheck.constraintname)));
4453 *
op->resnull =
true;
4473 *
op->resnull =
false;
4481 bool *
argnull =
op->d.xmlexpr.named_argnull;
4503 *
op->resnull =
false;
4522 op->d.xmlexpr.named_argvalue,
4523 op->d.xmlexpr.named_argnull,
4524 op->d.xmlexpr.argvalue,
4525 op->d.xmlexpr.argnull));
4526 *
op->resnull =
false;
4552 *
op->resnull =
false;
4611 *
op->resnull =
false;
4631 *
op->resnull =
false;
4649 *
op->resnull =
false;
4654 elog(
ERROR,
"unrecognized XML operation");
4731 elog(
ERROR,
"invalid JsonConstructorExpr type %d",
ctor->type);
4733 *
op->resvalue = res;
4877 *
op->resnull =
false;
4903 *
op->resnull =
true;
4905 else if (!
error && !empty)
4916 *
op->resnull =
false;
4937 elog(
ERROR,
"unrecognized SQL/JSON expression op %d",
4950 Assert(jump_eval_coercion == -1);
4980 *
op->resnull =
true;
5007 errmsg(
"no SQL/JSON item found for specified path of column \"%s\"",
5012 errmsg(
"no SQL/JSON item found for specified path"));
5023 *
op->resnull =
true;
5057 str[item->
val.string.len] =
'\0';
5070 switch (item->
val.datetime.typid)
5074 item->
val.datetime.value));
5077 item->
val.datetime.value));
5080 item->
val.datetime.value));
5083 item->
val.datetime.value));
5086 item->
val.datetime.value));
5088 elog(
ERROR,
"unexpected jsonb datetime type oid %u",
5089 item->
val.datetime.typid);
5131 if (
op->d.jsonexpr_coercion.exists_coerce)
5133 if (
op->d.jsonexpr_coercion.exists_cast_to_int)
5136 if (
op->d.jsonexpr_coercion.exists_check_domain &&
5138 op->d.jsonexpr_coercion.targettype,
5139 &
op->d.jsonexpr_coercion.json_coercion_cache,
5143 *
op->resnull =
true;
5158 op->d.jsonexpr_coercion.targettype,
5159 op->d.jsonexpr_coercion.targettypmod,
5160 &
op->d.jsonexpr_coercion.json_coercion_cache,
5163 op->d.jsonexpr_coercion.omit_quotes,
5212 errmsg(
"could not coerce %s expression (%s) to the RETURNING type",
5220 errmsg(
"could not coerce %s expression (%s) to the RETURNING type",
5226 *
op->resnull =
true;
5256 foreach(
lc,
op->d.grouping_func.clauses)
5267 *
op->resnull =
false;
5283 elog(
ERROR,
"no merge action in progress");
5286 switch (
relaction->mas_action->commandType)
5290 *
op->resnull =
false;
5294 *
op->resnull =
false;
5298 *
op->resnull =
false;
5301 elog(
ERROR,
"unexpected merge action: DO NOTHING");
5304 elog(
ERROR,
"unrecognized commandType: %d",
5305 (
int)
relaction->mas_action->commandType);
5366 switch (
variable->varreturningtype)
5376 *
op->resnull =
true;
5386 *
op->resnull =
true;
5396 if (
op->d.wholerow.junkFilter !=
NULL)
5406 if (
op->d.wholerow.first)
5409 op->d.wholerow.slow =
false;
5443 errmsg(
"table row type and query-specified row type do not match"),
5445 "Table row contains %d attributes, but query expects %d.",
5457 if (!
vattr->attisdropped)
5460 errmsg(
"table row type and query-specified row type do not match"),
5461 errdetail(
"Table has type %s at ordinal position %d, but query expects %s.",
5468 op->d.wholerow.slow =
true;
5529 op->d.wholerow.first =
false;
5538 if (
op->d.wholerow.slow)
5551 if (!
vattr->attisdropped)
5559 errmsg(
"table row type and query-specified row type do not match"),
5560 errdetail(
"Physical storage mismatch on dropped attribute at ordinal position %d.",
5585 *
op->resnull =
false;
5601 *
op->resnull =
true;
5612 elog(
ERROR,
"failed to fetch attribute from slot");
5636 pergroup->transValueIsNull =
false;
5816 int setno =
op->d.agg_trans.setno;
5819 *
op->resvalue, *
op->resnull);
5830 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 errcode(int sqlerrcode)
#define errsave(context,...)
int errdetail(const char *fmt,...) pg_attribute_printf(1
#define ereport(elevel,...)
int errdetail_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...) pg_attribute_printf(1
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 ExprEvalStep::@60::@95 hashedscalararrayop
union ExprEvalStep::@60 d
struct ScalarArrayOpExprHashTable * elements_tab
AggStatePerTrans pertrans
struct JsonExprState * jsestate
struct ExprEvalStep::@60::@62 var
FunctionCallInfo fcinfo_data
ErrorSaveContext * escontext
ExprEvalRowtypeCache rowcache
struct JsonConstructorExprState * jcstate
NullableDatum args[FLEXIBLE_ARRAY_MEMBER]
JsonConstructorExpr * constructor
struct JsonConstructorExprState::@110 * 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_nominal_alignby(cur_offset, attalignby)
#define att_addlength_pointer(cur_offset, attlen, attptr)
static uint8 typalign_to_alignby(char typalign)
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)