85 #ifdef HAVE_COMPUTED_GOTO 86 #define EEO_USE_COMPUTED_GOTO 99 #if defined(EEO_USE_COMPUTED_GOTO) 102 typedef struct ExprEvalOpLookup
109 static const void **dispatch_table = NULL;
112 static ExprEvalOpLookup reverse_dispatch_table[
EEOP_LAST];
115 #define EEO_CASE(name) CASE_##name: 116 #define EEO_DISPATCH() goto *((void *) op->opcode) 117 #define EEO_OPCODE(opcode) ((intptr_t) dispatch_table[opcode]) 121 #define EEO_SWITCH() starteval: switch ((ExprEvalOp) op->opcode) 122 #define EEO_CASE(name) case name: 123 #define EEO_DISPATCH() goto starteval 124 #define EEO_OPCODE(opcode) (opcode) 134 #define EEO_JUMP(stepno) \ 136 op = &state->steps[stepno]; \ 304 #if defined(EEO_USE_COMPUTED_GOTO) 313 for (off = 0; off < state->
steps_len; off++)
349 #if defined(EEO_USE_COMPUTED_GOTO) 350 static const void *
const dispatch_table[] = {
352 &&CASE_EEOP_INNER_FETCHSOME,
353 &&CASE_EEOP_OUTER_FETCHSOME,
354 &&CASE_EEOP_SCAN_FETCHSOME,
355 &&CASE_EEOP_INNER_VAR,
356 &&CASE_EEOP_OUTER_VAR,
357 &&CASE_EEOP_SCAN_VAR,
358 &&CASE_EEOP_INNER_SYSVAR,
359 &&CASE_EEOP_OUTER_SYSVAR,
360 &&CASE_EEOP_SCAN_SYSVAR,
361 &&CASE_EEOP_WHOLEROW,
362 &&CASE_EEOP_ASSIGN_INNER_VAR,
363 &&CASE_EEOP_ASSIGN_OUTER_VAR,
364 &&CASE_EEOP_ASSIGN_SCAN_VAR,
365 &&CASE_EEOP_ASSIGN_TMP,
366 &&CASE_EEOP_ASSIGN_TMP_MAKE_RO,
368 &&CASE_EEOP_FUNCEXPR,
369 &&CASE_EEOP_FUNCEXPR_STRICT,
370 &&CASE_EEOP_FUNCEXPR_FUSAGE,
371 &&CASE_EEOP_FUNCEXPR_STRICT_FUSAGE,
372 &&CASE_EEOP_BOOL_AND_STEP_FIRST,
373 &&CASE_EEOP_BOOL_AND_STEP,
374 &&CASE_EEOP_BOOL_AND_STEP_LAST,
375 &&CASE_EEOP_BOOL_OR_STEP_FIRST,
376 &&CASE_EEOP_BOOL_OR_STEP,
377 &&CASE_EEOP_BOOL_OR_STEP_LAST,
378 &&CASE_EEOP_BOOL_NOT_STEP,
381 &&CASE_EEOP_JUMP_IF_NULL,
382 &&CASE_EEOP_JUMP_IF_NOT_NULL,
383 &&CASE_EEOP_JUMP_IF_NOT_TRUE,
384 &&CASE_EEOP_NULLTEST_ISNULL,
385 &&CASE_EEOP_NULLTEST_ISNOTNULL,
386 &&CASE_EEOP_NULLTEST_ROWISNULL,
387 &&CASE_EEOP_NULLTEST_ROWISNOTNULL,
388 &&CASE_EEOP_BOOLTEST_IS_TRUE,
389 &&CASE_EEOP_BOOLTEST_IS_NOT_TRUE,
390 &&CASE_EEOP_BOOLTEST_IS_FALSE,
391 &&CASE_EEOP_BOOLTEST_IS_NOT_FALSE,
392 &&CASE_EEOP_PARAM_EXEC,
393 &&CASE_EEOP_PARAM_EXTERN,
394 &&CASE_EEOP_PARAM_CALLBACK,
395 &&CASE_EEOP_CASE_TESTVAL,
396 &&CASE_EEOP_MAKE_READONLY,
397 &&CASE_EEOP_IOCOERCE,
398 &&CASE_EEOP_DISTINCT,
399 &&CASE_EEOP_NOT_DISTINCT,
401 &&CASE_EEOP_SQLVALUEFUNCTION,
402 &&CASE_EEOP_CURRENTOFEXPR,
403 &&CASE_EEOP_NEXTVALUEEXPR,
404 &&CASE_EEOP_ARRAYEXPR,
405 &&CASE_EEOP_ARRAYCOERCE,
407 &&CASE_EEOP_ROWCOMPARE_STEP,
408 &&CASE_EEOP_ROWCOMPARE_FINAL,
410 &&CASE_EEOP_FIELDSELECT,
411 &&CASE_EEOP_FIELDSTORE_DEFORM,
412 &&CASE_EEOP_FIELDSTORE_FORM,
413 &&CASE_EEOP_SBSREF_SUBSCRIPT,
414 &&CASE_EEOP_SBSREF_OLD,
415 &&CASE_EEOP_SBSREF_ASSIGN,
416 &&CASE_EEOP_SBSREF_FETCH,
417 &&CASE_EEOP_DOMAIN_TESTVAL,
418 &&CASE_EEOP_DOMAIN_NOTNULL,
419 &&CASE_EEOP_DOMAIN_CHECK,
420 &&CASE_EEOP_CONVERT_ROWTYPE,
421 &&CASE_EEOP_SCALARARRAYOP,
424 &&CASE_EEOP_GROUPING_FUNC,
425 &&CASE_EEOP_WINDOW_FUNC,
427 &&CASE_EEOP_ALTERNATIVE_SUBPLAN,
428 &&CASE_EEOP_AGG_STRICT_DESERIALIZE,
429 &&CASE_EEOP_AGG_DESERIALIZE,
430 &&CASE_EEOP_AGG_STRICT_INPUT_CHECK_ARGS,
431 &&CASE_EEOP_AGG_STRICT_INPUT_CHECK_NULLS,
432 &&CASE_EEOP_AGG_INIT_TRANS,
433 &&CASE_EEOP_AGG_STRICT_TRANS_CHECK,
434 &&CASE_EEOP_AGG_PLAIN_TRANS_BYVAL,
435 &&CASE_EEOP_AGG_PLAIN_TRANS,
436 &&CASE_EEOP_AGG_ORDERED_TRANS_DATUM,
437 &&CASE_EEOP_AGG_ORDERED_TRANS_TUPLE,
442 "dispatch_table out of whack with ExprEvalOp");
457 #if defined(EEO_USE_COMPUTED_GOTO) 505 Assert(attnum >= 0 && attnum < innerslot->tts_nvalid);
518 Assert(attnum >= 0 && attnum < outerslot->tts_nvalid);
531 Assert(attnum >= 0 && attnum < scanslot->tts_nvalid);
573 Assert(attnum >= 0 && attnum < innerslot->tts_nvalid);
589 Assert(attnum >= 0 && attnum < outerslot->tts_nvalid);
605 Assert(attnum >= 0 && attnum < scanslot->tts_nvalid);
665 d = op->
d.
func.fn_addr(fcinfo);
680 for (argno = 0; argno < op->
d.
func.nargs; argno++)
682 if (args[argno].isnull)
689 d = op->
d.
func.fn_addr(fcinfo);
1017 op->
d.
cparam.paramfunc(state, op, econtext);
1097 fcinfo_out = op->
d.
iocoerce.fcinfo_data_out;
1101 fcinfo_out->
isnull =
false;
1109 if (!op->
d.
iocoerce.finfo_in->fn_strict || str != NULL)
1114 fcinfo_in = op->
d.
iocoerce.fcinfo_data_in;
1119 fcinfo_in->
isnull =
false;
1171 eqresult = op->
d.
func.fn_addr(fcinfo);
1200 eqresult = op->
d.
func.fn_addr(fcinfo);
1221 result = op->
d.
func.fn_addr(fcinfo);
1577 for (argno = 0; argno < nargs; argno++)
1591 for (argno = 0; argno < nargs; argno++)
1593 if (args[argno].isnull)
1809 return state->
evalfunc(state, econtext, isNull);
1893 if (attnum > slot_tupdesc->
natts)
1894 elog(
ERROR,
"attribute number %d exceeds number of columns %d",
1895 attnum, slot_tupdesc->
natts);
1899 if (attr->attisdropped)
1901 (
errcode(ERRCODE_UNDEFINED_COLUMN),
1902 errmsg(
"attribute %d of type %s has been dropped",
1905 if (vartype != attr->atttypid)
1907 (
errcode(ERRCODE_DATATYPE_MISMATCH),
1908 errmsg(
"attribute %d of type %s has wrong type",
1910 errdetail(
"Table has type %s, but query expects %s.",
1922 #ifdef USE_ASSERT_CHECKING 1968 if (tupDesc == NULL ||
1986 *cache_field = tupDesc;
2001 *cache_field = NULL;
2110 fcinfo = op->
d.
func.fcinfo_data;
2111 args = fcinfo->
args;
2114 for (argno = 0; argno < op->
d.
func.nargs; argno++)
2116 if (args[argno].isnull)
2123 d = op->
d.
func.fn_addr(fcinfo);
2124 *isnull = fcinfo->
isnull;
2153 Assert(attnum >= 0 && attnum < slot->tts_nvalid);
2194 Assert(attnum >= 0 && attnum < inslot->tts_nvalid);
2223 #if defined(EEO_USE_COMPUTED_GOTO) 2229 dispatch_compare_ptr(
const void *a,
const void *b)
2231 const ExprEvalOpLookup *la = (
const ExprEvalOpLookup *) a;
2232 const ExprEvalOpLookup *lb = (
const ExprEvalOpLookup *) b;
2234 if (la->opcode < lb->opcode)
2236 else if (la->opcode > lb->opcode)
2248 #if defined(EEO_USE_COMPUTED_GOTO) 2250 if (dispatch_table == NULL)
2254 dispatch_table = (
const void **)
2260 reverse_dispatch_table[
i].opcode = dispatch_table[
i];
2265 qsort(reverse_dispatch_table,
2267 sizeof(ExprEvalOpLookup),
2268 dispatch_compare_ptr);
2282 #if defined(EEO_USE_COMPUTED_GOTO) 2285 ExprEvalOpLookup
key;
2286 ExprEvalOpLookup *res;
2288 key.opcode = (
void *) op->
opcode;
2290 reverse_dispatch_table,
2292 sizeof(ExprEvalOpLookup),
2293 dispatch_compare_ptr);
2320 d = op->
d.
func.fn_addr(fcinfo);
2342 for (argno = 0; argno < op->
d.
func.nargs; argno++)
2344 if (args[argno].isnull)
2354 d = op->
d.
func.fn_addr(fcinfo);
2393 int paramId = op->
d.
param.paramid;
2396 paramId > 0 && paramId <= paramInfo->numParams))
2403 prm = paramInfo->
paramFetch(paramInfo, paramId,
false, &prmdata);
2405 prm = ¶mInfo->
params[paramId - 1];
2412 (
errcode(ERRCODE_DATATYPE_MISMATCH),
2413 errmsg(
"type of parameter %d (%s) does not match that when preparing the plan (%s)",
2424 (
errcode(ERRCODE_UNDEFINED_OBJECT),
2425 errmsg(
"no value found for parameter %d", paramId)));
2469 *op->
resnull = fcinfo->isnull;
2474 *op->
resnull = fcinfo->isnull;
2479 *op->
resnull = fcinfo->isnull;
2484 *op->
resnull = fcinfo->isnull;
2502 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2503 errmsg(
"WHERE CURRENT OF is not supported for this table type")));
2526 elog(
ERROR,
"unsupported sequence type %u",
2605 for (att = 1; att <= tupDesc->
natts; att++)
2674 int outer_nelems = 0;
2676 int *elem_dims = NULL;
2677 int *elem_lbs = NULL;
2678 bool firstone =
true;
2679 bool havenulls =
false;
2680 bool haveempty =
false;
2691 subdata = (
char **)
palloc(nelems *
sizeof(
char *));
2693 subbytes = (
int *)
palloc(nelems *
sizeof(
int));
2694 subnitems = (
int *)
palloc(nelems *
sizeof(
int));
2697 for (elemoff = 0; elemoff < nelems; elemoff++)
2704 arraydatum = op->
d.
arrayexpr.elemvalues[elemoff];
2705 eisnull = op->
d.
arrayexpr.elemnulls[elemoff];
2719 (
errcode(ERRCODE_DATATYPE_MISMATCH),
2720 errmsg(
"cannot merge incompatible arrays"),
2721 errdetail(
"Array with element type %s cannot be " 2722 "included in ARRAY construct with element type %s.",
2728 if (this_ndims <= 0)
2737 elem_ndims = this_ndims;
2738 ndims = elem_ndims + 1;
2739 if (ndims <= 0 || ndims >
MAXDIM)
2741 (
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
2742 errmsg(
"number of array dimensions (%d) exceeds " \
2743 "the maximum allowed (%d)", ndims, MAXDIM)));
2745 elem_dims = (
int *)
palloc(elem_ndims *
sizeof(
int));
2746 memcpy(elem_dims,
ARR_DIMS(array), elem_ndims *
sizeof(
int));
2747 elem_lbs = (
int *)
palloc(elem_ndims *
sizeof(
int));
2748 memcpy(elem_lbs,
ARR_LBOUND(array), elem_ndims *
sizeof(
int));
2755 if (elem_ndims != this_ndims ||
2757 elem_ndims *
sizeof(
int)) != 0 ||
2759 elem_ndims *
sizeof(
int)) != 0)
2761 (
errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
2762 errmsg(
"multidimensional arrays must have array " 2763 "expressions with matching dimensions")));
2769 nbytes += subbytes[outer_nelems];
2772 nitems += subnitems[outer_nelems];
2791 (
errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
2792 errmsg(
"multidimensional arrays must have array " 2793 "expressions with matching dimensions")));
2797 dims[0] = outer_nelems;
2799 for (i = 1; i < ndims; i++)
2801 dims[
i] = elem_dims[i - 1];
2802 lbs[
i] = elem_lbs[i - 1];
2808 nbytes += dataoffset;
2818 result->
ndim = ndims;
2821 memcpy(
ARR_DIMS(result), dims, ndims *
sizeof(
int));
2822 memcpy(
ARR_LBOUND(result), lbs, ndims *
sizeof(
int));
2826 for (i = 0; i < outer_nelems; i++)
2828 memcpy(dat, subdata[i], subbytes[i]);
2834 iitem += subnitems[
i];
2894 op->
d.
row.elemvalues,
2895 op->
d.
row.elemnulls);
2911 bool *nulls = op->
d.
minmax.nulls;
2923 for (off = 0; off < op->
d.
minmax.nelems; off++)
2948 if (cmpresult > 0 &&
operator ==
IS_LEAST)
2950 else if (cmpresult < 0 &&
operator ==
IS_GREATEST)
2995 elog(
ERROR,
"unsupported reference to system column %d in FieldSelect",
2997 if (fieldnum > tupDesc->
natts)
2998 elog(
ERROR,
"attribute number %d exceeds number of columns %d",
2999 fieldnum, tupDesc->
natts);
3003 if (attr->attisdropped)
3013 (
errcode(ERRCODE_DATATYPE_MISMATCH),
3014 errmsg(
"attribute %d has wrong type", fieldnum),
3015 errdetail(
"Table has type %s, but query expects %s.",
3042 elog(
ERROR,
"unsupported reference to system column %d in FieldSelect",
3044 if (fieldnum > tupDesc->
natts)
3045 elog(
ERROR,
"attribute number %d exceeds number of columns %d",
3046 fieldnum, tupDesc->
natts);
3050 if (attr->attisdropped)
3060 (
errcode(ERRCODE_DATATYPE_MISMATCH),
3061 errmsg(
"attribute %d has wrong type", fieldnum),
3062 errdetail(
"Table has type %s, but query expects %s.",
3098 elog(
ERROR,
"too many columns in composite type %u",
3170 (
errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
3171 errmsg(
"array subscript in assignment must not be null")));
3246 else if (sbsrefstate->
numlower == 0)
3523 for (i = 0; i < nitems; i++)
3529 if (bitmap && (*bitmap & bitmask) == 0)
3547 thisresult = (
Datum) 0;
3581 if (bitmask == 0x100)
3601 (
errcode(ERRCODE_NOT_NULL_VIOLATION),
3602 errmsg(
"domain %s does not allow null values",
3616 (
errcode(ERRCODE_CHECK_VIOLATION),
3617 errmsg(
"value for domain %s violates check constraint \"%s\"",
3645 bool *argnull = op->
d.
xmlexpr.argnull;
3665 bool *argnull = op->
d.
xmlexpr.named_argnull;
3680 value = argvalue[
i];
3715 bool *argnull = op->
d.
xmlexpr.argnull;
3717 bool preserve_whitespace;
3724 value = argvalue[0];
3729 value = argvalue[1];
3734 preserve_whitespace));
3771 bool *argnull = op->
d.
xmlexpr.argnull;
3801 bool *argnull = op->
d.
xmlexpr.argnull;
3808 value = argvalue[0];
3820 bool *argnull = op->
d.
xmlexpr.argnull;
3827 value = argvalue[0];
3836 elog(
ERROR,
"unrecognized XML operation");
3919 switch (variable->
varno)
3959 if (variable->
vartype != RECORDOID)
3985 if (var_tupdesc->
natts != slot_tupdesc->
natts)
3987 (
errcode(ERRCODE_DATATYPE_MISMATCH),
3988 errmsg(
"table row type and query-specified row type do not match"),
3990 "Table row contains %d attributes, but query expects %d.",
3991 slot_tupdesc->
natts,
3992 slot_tupdesc->
natts,
3993 var_tupdesc->
natts)));
3995 for (i = 0; i < var_tupdesc->
natts; i++)
4000 if (vattr->atttypid == sattr->atttypid)
4002 if (!vattr->attisdropped)
4004 (
errcode(ERRCODE_DATATYPE_MISMATCH),
4005 errmsg(
"table row type and query-specified row type do not match"),
4006 errdetail(
"Table has type %s at ordinal position %d, but query expects %s.",
4011 if (vattr->attlen != sattr->attlen ||
4012 vattr->attalign != sattr->attalign)
4094 for (i = 0; i < var_tupdesc->
natts; i++)
4099 if (!vattr->attisdropped)
4103 if (vattr->attlen != sattr->attlen ||
4104 vattr->attalign != sattr->attalign)
4106 (
errcode(ERRCODE_DATATYPE_MISMATCH),
4107 errmsg(
"table row type and query-specified row type do not match"),
4108 errdetail(
"Physical storage mismatch on dropped attribute at ordinal position %d.",
4149 elog(
ERROR,
"failed to fetch attribute from slot");
4186 Datum newValue,
bool newValueIsNull,
4187 Datum oldValue,
bool oldValueIsNull)
4189 if (!newValueIsNull)
4202 if (!oldValueIsNull)
ParamExternData params[FLEXIBLE_ARRAY_MEMBER]
void ExecEvalScalarArrayOp(ExprState *state, ExprEvalStep *op)
Datum ExecInterpExprStillValid(ExprState *state, ExprContext *econtext, bool *isNull)
Datum array_get_slice(Datum arraydatum, int nSubscripts, int *upperIndx, int *lowerIndx, bool *upperProvided, bool *lowerProvided, int arraytyplen, int elmlen, bool elmbyval, char elmalign)
struct ExprEvalStep::@52::@94 agg_trans
struct ExprEvalStep::@52::@80 sbsref
TupleDesc CreateTupleDescCopy(TupleDesc tupdesc)
struct ExprEvalStep::@52::@84 xmlexpr
void ExecAggInitGroup(AggState *aggstate, AggStatePerTrans pertrans, AggStatePerGroup pergroup)
Datum MakeExpandedObjectReadOnlyInternal(Datum d)
#define HeapTupleHeaderSetTypeId(tup, typeid)
#define forboth(cell1, list1, cell2, list2)
#define ARR_OVERHEAD_NONULLS(ndims)
void tuplesort_putdatum(Tuplesortstate *state, Datum val, bool isNull)
Datum current_schema(PG_FUNCTION_ARGS)
struct ExprEvalStep::@52::@88 subplan
#define att_align_nominal(cur_offset, attalign)
static Datum ExecJustOuterVar(ExprState *state, ExprContext *econtext, bool *isnull)
struct ExprEvalStep::@52::@54 var
#define VARATT_IS_EXTERNAL_EXPANDED(PTR)
static void ShutdownTupleDescRef(Datum arg)
TupleDesc lookup_rowtype_tupdesc(Oid type_id, int32 typmod)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
static Datum ExecJustScanVar(ExprState *state, ExprContext *econtext, bool *isnull)
MemoryContext MemoryContextGetParent(MemoryContext context)
static Datum ExecJustInnerVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
struct ExprEvalStep::@52::@92 agg_init_trans
static Datum expanded_record_get_field(ExpandedRecordHeader *erh, int fnumber, bool *isnull)
void get_typlenbyvalalign(Oid typid, int16 *typlen, bool *typbyval, char *typalign)
#define PointerGetDatum(X)
struct ExprEvalStep * steps
#define TupleDescAttr(tupdesc, i)
void ExecReadyInterpretedExpr(ExprState *state)
const TupleTableSlotOps TTSOpsBufferHeapTuple
MemoryContext ecxt_per_tuple_memory
struct ExprEvalStep::@52::@85 aggref
void array_bitmap_copy(bits8 *destbitmap, int destoffset, const bits8 *srcbitmap, int srcoffset, int nitems)
int64 nextval_internal(Oid relid, bool check_permissions)
#define DatumGetTextPP(X)
void ExecEvalParamExec(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
const TupleTableSlotOps TTSOpsVirtual
int ArrayGetNItems(int ndim, const int *dims)
#define TimeTzADTPGetDatum(X)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Datum ExecAlternativeSubPlan(AlternativeSubPlanState *node, ExprContext *econtext, bool *isNull)
xmltype * xmlconcat(List *args)
static void slot_getsomeattrs(TupleTableSlot *slot, int attnum)
const TupleTableSlotOps *const tts_ops
TimestampTz GetSQLCurrentTimestamp(int32 typmod)
int errcode(int sqlerrcode)
void ExecEvalConvertRowtype(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
#define DateADTGetDatum(X)
Datum array_set_element(Datum arraydatum, int nSubscripts, int *indx, Datum dataValue, bool isNull, int arraytyplen, int elmlen, bool elmbyval, char elmalign)
bool heap_attisnull(HeapTuple tup, int attnum, TupleDesc tupleDesc)
void ExecEvalSubscriptingRefAssign(ExprState *state, ExprEvalStep *op)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, Datum *values, bool *isnull)
static pg_attribute_always_inline Datum ExecJustAssignVarImpl(ExprState *state, TupleTableSlot *inslot, bool *isnull)
bool ExecEvalSubscriptingRef(ExprState *state, ExprEvalStep *op)
ArrayType * construct_empty_array(Oid elmtype)
DateADT GetSQLCurrentDate(void)
TupleTableSlot * resultslot
union ExprEvalStep::@52 d
#define OidIsValid(objectId)
void ExecEvalFieldStoreForm(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
#define DatumGetHeapTupleHeader(X)
FunctionCallInfo transfn_fcinfo
Datum(* ExprStateEvalFunc)(struct ExprState *expression, struct ExprContext *econtext, bool *isNull)
#define ARR_OVERHEAD_WITHNULLS(ndims, nitems)
struct ExprEvalStep::@52::@65 cparam
struct ExprEvalStep::@52::@61 qualexpr
Datum ExecAggTransReparent(AggState *aggstate, AggStatePerTrans pertrans, Datum newValue, bool newValueIsNull, Datum oldValue, bool oldValueIsNull)
TupleDesc lookup_rowtype_tupdesc_domain(Oid type_id, int32 typmod, bool noError)
struct ExprEvalStep::@52::@81 domaincheck
struct ExprEvalStep::@52::@90 agg_deserialize
Datum current_database(PG_FUNCTION_ARGS)
xmltype * xmlpi(const char *target, text *arg, bool arg_is_null, bool *result_is_null)
void ExecEvalRow(ExprState *state, ExprEvalStep *op)
#define ARR_DATA_OFFSET(a)
#define HeapTupleHeaderGetTypMod(tup)
static pg_attribute_always_inline Datum ExecJustVarVirtImpl(ExprState *state, TupleTableSlot *slot, bool *isnull)
#define StaticAssertStmt(condition, errmessage)
void ExecEvalMinMax(ExprState *state, ExprEvalStep *op)
Datum array_set_slice(Datum arraydatum, int nSubscripts, int *upperIndx, int *lowerIndx, bool *upperProvided, bool *lowerProvided, Datum srcArrayDatum, bool isNull, int arraytyplen, int elmlen, bool elmbyval, char elmalign)
static void CheckVarSlotCompatibility(TupleTableSlot *slot, int attnum, Oid vartype)
struct ExprEvalStep::@52::@86 grouping_func
ParamFetchHook paramFetch
void pfree(void *pointer)
ExprEvalOp ExecEvalStepOp(ExprState *state, ExprEvalStep *op)
static void convert(const int32 val, char *const buf)
struct ExprEvalStep::@52::@73 row
void appendStringInfo(StringInfo str, const char *fmt,...)
static Datum ExecJustConst(ExprState *state, ExprContext *econtext, bool *isnull)
struct ExprEvalStep::@52::@63 nulltest_row
struct ExprEvalStep::@52::@53 fetch
int errdomainconstraint(Oid datatypeOid, const char *conname)
#define DatumGetCString(X)
void pgstat_init_function_usage(FunctionCallInfo fcinfo, PgStat_FunctionCallUsage *fcu)
void ExecSetParamPlan(SubPlanState *node, ExprContext *econtext)
#define TimestampTzGetDatum(X)
text * xmltotext_with_xmloption(xmltype *data, XmlOptionType xmloption_arg)
NullableDatum args[FLEXIBLE_ARRAY_MEMBER]
struct ExprEvalStep::@52::@67 make_readonly
TimeTzADT * GetSQLCurrentTime(int32 typmod)
struct ExprEvalStep::@52::@78 fieldstore
void ExecEvalSubscriptingRefFetch(ExprState *state, ExprEvalStep *op)
static void slot_getallattrs(TupleTableSlot *slot)
struct ExprEvalStep::@52::@72 arraycoerce
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
struct ExprEvalStep::@52::@89 alternative_subplan
void ExecEvalRowNull(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
TupleConversionMap * convert_tuples_by_name(TupleDesc indesc, TupleDesc outdesc)
Tuplesortstate ** sortstates
ExprStateEvalFunc evalfunc
#define FunctionCallInvoke(fcinfo)
static void ExecEvalRowNullInt(ExprState *state, ExprEvalStep *op, ExprContext *econtext, bool checkisnull)
Datum current_user(PG_FUNCTION_ARGS)
text * cstring_to_text_with_len(const char *s, int len)
HeapTuple toast_build_flattened_tuple(TupleDesc tupleDesc, Datum *values, bool *isnull)
void ExecEvalSysVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext, TupleTableSlot *slot)
static Datum ExecJustInnerVar(ExprState *state, ExprContext *econtext, bool *isnull)
void check_stack_depth(void)
struct ExprEvalStep::@52::@66 casetest
int errdetail(const char *fmt,...)
xmltype * xmlroot(xmltype *data, text *version, int standalone)
bool upperprovided[MAXDIM]
TupleTableSlot * ecxt_innertuple
void ExecEvalGroupingFunc(ExprState *state, ExprEvalStep *op)
ParamExecData * ecxt_param_exec_vals
struct ExprEvalStep::@52::@58 constval
struct EState * ecxt_estate
static Datum ExecJustAssignOuterVar(ExprState *state, ExprContext *econtext, bool *isnull)
static RangeTblEntry * exec_rt_fetch(Index rti, EState *estate)
FormData_pg_attribute * Form_pg_attribute
MemoryContext CurrentMemoryContext
struct ExprEvalStep::@52::@60 boolexpr
Datum Int64GetDatum(int64 X)
HeapTuple execute_attr_map_tuple(HeapTuple tuple, TupleConversionMap *map)
#define att_addlength_pointer(cur_offset, attlen, attptr)
#define ereport(elevel, rest)
struct ExprEvalStep::@52::@71 arrayexpr
Datum datumCopy(Datum value, bool typByVal, int typLen)
#define TimestampGetDatum(X)
static pg_attribute_always_inline Datum ExecJustAssignVarVirtImpl(ExprState *state, TupleTableSlot *inslot, bool *isnull)
Datum heap_copy_tuple_as_datum(HeapTuple tuple, TupleDesc tupleDesc)
struct ExprEvalStep::@52::@64 param
static TupleDesc expanded_record_get_tupdesc(ExpandedRecordHeader *erh)
TimeADT GetSQLLocalTime(int32 typmod)
List * lappend(List *list, void *datum)
static Datum ExecJustApplyFuncToCase(ExprState *state, ExprContext *econtext, bool *isnull)
bool xml_is_document(xmltype *arg)
static Datum ExecJustAssignOuterVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
void initStringInfo(StringInfo str)
ExpandedObjectHeader * DatumGetEOHP(Datum d)
struct ExprEvalStep::@52::@93 agg_strict_trans_check
#define heap_getattr(tup, attnum, tupleDesc, isnull)
Datum session_user(PG_FUNCTION_ARGS)
TupleDesc tts_tupleDescriptor
ExprContext * curaggcontext
struct ExprEvalStep::@52::@87 window_func
static TupleDesc get_cached_rowtype(Oid type_id, int32 typmod, TupleDesc *cache_field, ExprContext *econtext)
#define TTS_IS_VIRTUAL(slot)
TupleTableSlot * ExecFilterJunk(JunkFilter *junkfilter, TupleTableSlot *slot)
void ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op)
#define HeapTupleHeaderSetTypMod(tup, typmod)
bool lowerprovided[MAXDIM]
void ExecEvalWholeRowVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
#define DatumGetArrayTypePCopy(X)
#define TimeADTGetDatum(X)
int errdatatype(Oid datatypeOid)
#define HeapTupleHeaderGetTypeId(tup)
Timestamp GetSQLLocalTimestamp(int32 typmod)
void ExecEvalParamExtern(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void DeleteExpandedObject(Datum d)
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
struct ExprEvalStep::@52::@62 jump
struct ExprEvalStep::@52::@56 assign_var
static Datum ExecJustScanVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
struct ExprEvalStep::@52::@82 convert_rowtype
Datum array_get_element(Datum arraydatum, int nSubscripts, int *indx, int arraytyplen, int elmlen, bool elmbyval, char elmalign, bool *isNull)
struct ExprEvalStep::@52::@59 func
#define LOCAL_FCINFO(name, nargs)
Datum array_map(Datum arrayd, ExprState *exprstate, ExprContext *econtext, Oid retType, ArrayMapState *amstate)
struct ExprEvalStep::@52::@74 rowcompare_step
TupleTableSlot * ecxt_outertuple
static Datum ExecJustAssignScanVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
#define Assert(condition)
void RegisterExprContextCallback(ExprContext *econtext, ExprContextCallbackFunction function, Datum arg)
static Datum ExecJustAssignScanVar(ExprState *state, ExprContext *econtext, bool *isnull)
#define DatumIsReadWriteExpandedObject(d, isnull, typlen)
#define InitFunctionCallInfoData(Fcinfo, Flinfo, Nargs, Collation, Context, Resultinfo)
Oid exprType(const Node *expr)
static void ExecInitInterpreter(void)
struct ExprEvalStep::@52::@70 nextvalueexpr
static int list_length(const List *l)
struct ExprEvalStep::@52::@91 agg_strict_input_check
int errdetail_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...)
void ExecEvalArrayCoerce(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
TupleTableSlot * ecxt_scantuple
Index es_range_table_size
void ExecEvalFuncExprStrictFusage(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalSubscriptingRefOld(ExprState *state, ExprEvalStep *op)
static pg_attribute_always_inline Datum ExecJustVarImpl(ExprState *state, TupleTableSlot *slot, bool *isnull)
#define HeapTupleGetDatum(tuple)
MemoryContext ecxt_per_query_memory
#define InvalidAttrNumber
static Datum ExecInterpExpr(ExprState *state, ExprContext *econtext, bool *isnull)
struct ExprEvalStep::@52::@76 minmax
void ExecEvalAggOrderedTransDatum(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
#define DatumGetPointer(X)
void pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu, bool finalize)
void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc, Datum *values, bool *isnull)
void ExecEvalFieldStoreDeForm(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static Datum values[MAXATTR]
struct ExprEvalStep::@52::@79 sbsref_subscript
struct ExprEvalStep::@52::@69 sqlvaluefunction
void ExecEvalConstraintCheck(ExprState *state, ExprEvalStep *op)
#define ItemPointerSetInvalid(pointer)
static Datum ExecJustOuterVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
int errmsg(const char *fmt,...)
#define fetch_att(T, attbyval, attlen)
void ExecEvalRowNotNull(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
struct ExprEvalStep::@52::@68 iocoerce
void ExecEvalConstraintNotNull(ExprState *state, ExprEvalStep *op)
static Datum ExecJustAssignInnerVarVirt(ExprState *state, ExprContext *econtext, bool *isnull)
Datum ExecSubPlan(SubPlanState *node, ExprContext *econtext, bool *isNull)
xmltype * xmlelement(XmlExpr *xexpr, Datum *named_argvalue, bool *named_argnull, Datum *argvalue, bool *argnull)
const TupleTableSlotOps TTSOpsHeapTuple
static Datum ExecJustAssignInnerVar(ExprState *state, ExprContext *econtext, bool *isnull)
#define pg_attribute_always_inline
AggStatePerTrans curpertrans
struct ExprEvalStep::@52::@77 fieldselect
void ExecEvalSubPlan(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalFuncExprFusage(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
struct ExprEvalStep::@52::@83 scalararrayop
#define SET_VARSIZE(PTR, len)
TupleTableSlot * sortslot
struct ExprEvalStep::@52::@55 wholerow
#define qsort(a, b, c, d)
void CheckExprStillValid(ExprState *state, ExprContext *econtext)
#define EEO_OPCODE(opcode)
static Datum slot_getsysattr(TupleTableSlot *slot, int attnum, bool *isnull)
void ExecEvalCurrentOfExpr(ExprState *state, ExprEvalStep *op)
static void CheckOpSlotCompatibility(ExprEvalStep *op, TupleTableSlot *slot)
ArrayType * construct_md_array(Datum *elems, bool *nulls, int ndims, int *dims, int *lbs, Oid elmtype, int elmlen, bool elmbyval, char elmalign)
#define ReleaseTupleDesc(tupdesc)
char * map_sql_value_to_xml_value(Datum value, Oid type, bool xml_escape_strings)
ParamListInfo ecxt_param_list_info
void ExecEvalAlternativeSubPlan(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalNextValueExpr(ExprState *state, ExprEvalStep *op)
bool bms_is_member(int x, const Bitmapset *a)
#define EEO_FLAG_INTERPRETER_INITIALIZED
#define ARR_NULLBITMAP(a)
void ExecTypeSetColNames(TupleDesc typeInfo, List *namesList)
void ExecEvalAggOrderedTransTuple(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalFieldSelect(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
xmltype * xmlparse(text *data, XmlOptionType xmloption_arg, bool preserve_whitespace)
#define EEO_FLAG_DIRECT_THREADED
TupleTableSlot * ExecStoreVirtualTuple(TupleTableSlot *slot)
void tuplesort_puttupleslot(Tuplesortstate *state, TupleTableSlot *slot)
void ExecEvalSQLValueFunction(ExprState *state, ExprEvalStep *op)
struct ExprEvalStep::@52::@75 rowcompare_final
AggStatePerGroup * all_pergroups
void ExecEvalArrayExpr(ExprState *state, ExprEvalStep *op)
#define HeapTupleHeaderGetDatumLength(tup)
#define DatumGetArrayTypeP(X)
struct ExprEvalStep::@52::@57 assign_tmp