1 /*-------------------------------------------------------------------------
4 * Low level infrastructure related to expression evaluation
7 * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/executor/execExpr.h
12 *-------------------------------------------------------------------------
17 #include "executor/nodeAgg.h"
18 #include "nodes/execnodes.h"
20 /* forward references to avoid circularity */
22 struct SubscriptingRefState
;
23 struct ScalarArrayOpExprHashTable
;
26 struct JsonConstructorExprState
;
28 /* Bits in ExprState->flags (see also execnodes.h for public flag bits): */
29 /* expression's interpreter has been initialized */
30 #define EEO_FLAG_INTERPRETER_INITIALIZED (1 << 1)
31 /* jump-threading is in use */
32 #define EEO_FLAG_DIRECT_THREADED (1 << 2)
34 /* Typical API for out-of-line evaluation subroutines */
35 typedef void (*ExecEvalSubroutine
) (ExprState
*state
,
36 struct ExprEvalStep
*op
,
37 ExprContext
*econtext
);
39 /* API for out-of-line evaluation subroutines returning bool */
40 typedef bool (*ExecEvalBoolSubroutine
) (ExprState
*state
,
41 struct ExprEvalStep
*op
,
42 ExprContext
*econtext
);
44 /* ExprEvalSteps that cache a composite type's tupdesc need one of these */
45 /* (it fits in-line in some step types, otherwise allocate out-of-line) */
46 typedef struct ExprEvalRowtypeCache
49 * cacheptr points to composite type's TypeCacheEntry if tupdesc_id is not
50 * 0; or for an anonymous RECORD type, it points directly at the cached
51 * tupdesc for the type, and tupdesc_id is 0. (We'd use separate fields
52 * if space were not at a premium.) Initial state is cacheptr == NULL.
55 uint64 tupdesc_id
; /* last-seen tupdesc identifier, or 0 */
56 } ExprEvalRowtypeCache
;
59 * Discriminator for ExprEvalSteps.
61 * Identifies the operation to be executed and which member in the
62 * ExprEvalStep->d union is valid.
64 * The order of entries needs to be kept in sync with the dispatch_table[]
65 * array in execExprInterp.c:ExecInterpExpr().
67 typedef enum ExprEvalOp
69 /* entire expression has been evaluated completely, return */
72 /* apply slot_getsomeattrs on corresponding tuple slot */
77 /* compute non-system Var value */
82 /* compute system Var value */
87 /* compute wholerow Var */
91 * Compute non-system Var value, assign it into ExprState's resultslot.
92 * These are not used if a CheckVarSlotCompatibility() check would be
95 EEOP_ASSIGN_INNER_VAR
,
96 EEOP_ASSIGN_OUTER_VAR
,
99 /* assign ExprState's resvalue/resnull to a column of its resultslot */
101 /* ditto, applying MakeExpandedObjectReadOnly() */
102 EEOP_ASSIGN_TMP_MAKE_RO
,
104 /* evaluate Const value */
108 * Evaluate function call (including OpExprs etc). For speed, we
109 * distinguish in the opcode whether the function is strict and/or
110 * requires usage stats tracking.
113 EEOP_FUNCEXPR_STRICT
,
114 EEOP_FUNCEXPR_FUSAGE
,
115 EEOP_FUNCEXPR_STRICT_FUSAGE
,
118 * Evaluate boolean AND expression, one step per subexpression. FIRST/LAST
119 * subexpressions are special-cased for performance. Since AND always has
120 * at least two subexpressions, FIRST and LAST never apply to the same
123 EEOP_BOOL_AND_STEP_FIRST
,
125 EEOP_BOOL_AND_STEP_LAST
,
127 /* similarly for boolean OR expression */
128 EEOP_BOOL_OR_STEP_FIRST
,
130 EEOP_BOOL_OR_STEP_LAST
,
132 /* evaluate boolean NOT expression */
135 /* simplified version of BOOL_AND_STEP for use by ExecQual() */
138 /* unconditional jump to another step */
141 /* conditional jumps based on current result value */
143 EEOP_JUMP_IF_NOT_NULL
,
144 EEOP_JUMP_IF_NOT_TRUE
,
146 /* perform NULL tests for scalar values */
147 EEOP_NULLTEST_ISNULL
,
148 EEOP_NULLTEST_ISNOTNULL
,
150 /* perform NULL tests for row values */
151 EEOP_NULLTEST_ROWISNULL
,
152 EEOP_NULLTEST_ROWISNOTNULL
,
154 /* evaluate a BooleanTest expression */
155 EEOP_BOOLTEST_IS_TRUE
,
156 EEOP_BOOLTEST_IS_NOT_TRUE
,
157 EEOP_BOOLTEST_IS_FALSE
,
158 EEOP_BOOLTEST_IS_NOT_FALSE
,
160 /* evaluate PARAM_EXEC/EXTERN parameters */
165 /* return CaseTestExpr value */
168 /* apply MakeExpandedObjectReadOnly() to target value */
171 /* evaluate assorted special-purpose expression types */
176 EEOP_SQLVALUEFUNCTION
,
184 * Compare two individual elements of each of two compared ROW()
185 * expressions. Skip to ROWCOMPARE_FINAL if elements are not equal.
187 EEOP_ROWCOMPARE_STEP
,
189 /* evaluate boolean value based on previous ROWCOMPARE_STEP operations */
190 EEOP_ROWCOMPARE_FINAL
,
192 /* evaluate GREATEST() or LEAST() */
195 /* evaluate FieldSelect expression */
199 * Deform tuple before evaluating new values for individual fields in a
200 * FieldStore expression.
202 EEOP_FIELDSTORE_DEFORM
,
205 * Form the new tuple for a FieldStore expression. Individual fields will
206 * have been evaluated into columns of the tuple deformed by the preceding
209 EEOP_FIELDSTORE_FORM
,
211 /* Process container subscripts; possibly short-circuit result to NULL */
212 EEOP_SBSREF_SUBSCRIPTS
,
215 * Compute old container element/slice when a SubscriptingRef assignment
216 * expression contains SubscriptingRef/FieldStore subexpressions. Value is
217 * accessed using the CaseTest mechanism.
221 /* compute new value for SubscriptingRef assignment expression */
224 /* compute element/slice for SubscriptingRef fetch expression */
227 /* evaluate value for CoerceToDomainValue */
230 /* evaluate a domain's NOT NULL constraint */
233 /* evaluate a single domain CHECK constraint */
236 /* evaluate assorted special-purpose expression types */
237 EEOP_CONVERT_ROWTYPE
,
239 EEOP_HASHED_SCALARARRAYOP
,
245 EEOP_JSON_CONSTRUCTOR
,
249 /* aggregation related nodes */
250 EEOP_AGG_STRICT_DESERIALIZE
,
251 EEOP_AGG_DESERIALIZE
,
252 EEOP_AGG_STRICT_INPUT_CHECK_ARGS
,
253 EEOP_AGG_STRICT_INPUT_CHECK_NULLS
,
254 EEOP_AGG_PLAIN_PERGROUP_NULLCHECK
,
255 EEOP_AGG_PLAIN_TRANS_INIT_STRICT_BYVAL
,
256 EEOP_AGG_PLAIN_TRANS_STRICT_BYVAL
,
257 EEOP_AGG_PLAIN_TRANS_BYVAL
,
258 EEOP_AGG_PLAIN_TRANS_INIT_STRICT_BYREF
,
259 EEOP_AGG_PLAIN_TRANS_STRICT_BYREF
,
260 EEOP_AGG_PLAIN_TRANS_BYREF
,
261 EEOP_AGG_ORDERED_TRANS_DATUM
,
262 EEOP_AGG_ORDERED_TRANS_TUPLE
,
264 /* non-existent operation, used e.g. to check array lengths */
269 typedef struct ExprEvalStep
272 * Instruction to be executed. During instruction preparation this is an
273 * enum ExprEvalOp, but later it can be changed to some other type, e.g. a
274 * pointer for computed goto (that's why it's an intptr_t).
278 /* where to store the result of this step */
283 * Inline data for the operation. Inline data is faster to access, but
284 * also bloats the size of all instructions. The union should be kept to
285 * no more than 40 bytes on 64-bit systems (so that the entire struct is
286 * no more than 64 bytes, a single cacheline on common systems).
290 /* for EEOP_INNER/OUTER/SCAN_FETCHSOME */
293 /* attribute number up to which to fetch (inclusive) */
295 /* will the type of slot be the same for every invocation */
297 /* tuple descriptor, if known */
298 TupleDesc known_desc
;
299 /* type of slot, can only be relied upon if fixed is set */
300 const TupleTableSlotOps
*kind
;
303 /* for EEOP_INNER/OUTER/SCAN_[SYS]VAR[_FIRST] */
306 /* attnum is attr number - 1 for regular VAR ... */
307 /* but it's just the normal (negative) attr number for SYSVAR */
309 Oid vartype
; /* type OID of variable */
312 /* for EEOP_WHOLEROW */
315 Var
*var
; /* original Var node in plan tree */
316 bool first
; /* first time through, need to initialize? */
317 bool slow
; /* need runtime check for nulls? */
318 TupleDesc tupdesc
; /* descriptor for resulting tuples */
319 JunkFilter
*junkFilter
; /* JunkFilter to remove resjunk cols */
322 /* for EEOP_ASSIGN_*_VAR */
325 /* target index in ExprState->resultslot->tts_values/nulls */
327 /* source attribute number - 1 */
331 /* for EEOP_ASSIGN_TMP[_MAKE_RO] */
334 /* target index in ExprState->resultslot->tts_values/nulls */
341 /* constant's value */
346 /* for EEOP_FUNCEXPR_* / NULLIF / DISTINCT */
349 FmgrInfo
*finfo
; /* function's lookup data */
350 FunctionCallInfo fcinfo_data
; /* arguments etc */
351 /* faster to access without additional indirection: */
352 PGFunction fn_addr
; /* actual call address */
353 int nargs
; /* number of arguments */
356 /* for EEOP_BOOL_*_STEP */
359 bool *anynull
; /* track if any input was NULL */
360 int jumpdone
; /* jump here if result determined */
366 int jumpdone
; /* jump here on false or null */
369 /* for EEOP_JUMP[_CONDITION] */
372 int jumpdone
; /* target instruction's index */
375 /* for EEOP_NULLTEST_ROWIS[NOT]NULL */
378 /* cached descriptor for composite type - filled at runtime */
379 ExprEvalRowtypeCache rowcache
;
382 /* for EEOP_PARAM_EXEC/EXTERN */
385 int paramid
; /* numeric ID for parameter */
386 Oid paramtype
; /* OID of parameter's datatype */
389 /* for EEOP_PARAM_CALLBACK */
392 ExecEvalSubroutine paramfunc
; /* add-on evaluation subroutine */
393 void *paramarg
; /* private data for same */
394 int paramid
; /* numeric ID for parameter */
395 Oid paramtype
; /* OID of parameter's datatype */
398 /* for EEOP_CASE_TESTVAL/DOMAIN_TESTVAL */
401 Datum
*value
; /* value to return */
405 /* for EEOP_MAKE_READONLY */
408 Datum
*value
; /* value to coerce to read-only */
412 /* for EEOP_IOCOERCE */
415 /* lookup and call info for source type's output function */
417 FunctionCallInfo fcinfo_data_out
;
418 /* lookup and call info for result type's input function */
420 FunctionCallInfo fcinfo_data_in
;
423 /* for EEOP_SQLVALUEFUNCTION */
426 SQLValueFunction
*svf
;
429 /* for EEOP_NEXTVALUEEXPR */
436 /* for EEOP_ARRAYEXPR */
439 Datum
*elemvalues
; /* element values get stored here */
441 int nelems
; /* length of the above arrays */
442 Oid elemtype
; /* array element type */
443 int16 elemlength
; /* typlen of the array element type */
444 bool elembyval
; /* is the element type pass-by-value? */
445 char elemalign
; /* typalign of the element type */
446 bool multidims
; /* is array expression multi-D? */
449 /* for EEOP_ARRAYCOERCE */
452 ExprState
*elemexprstate
; /* null if no per-element work */
453 Oid resultelemtype
; /* element type of result array */
454 struct ArrayMapState
*amstate
; /* workspace for array_map */
460 TupleDesc tupdesc
; /* descriptor for result tuples */
461 /* workspace for the values constituting the row: */
466 /* for EEOP_ROWCOMPARE_STEP */
469 /* lookup and call data for column comparison function */
471 FunctionCallInfo fcinfo_data
;
473 /* target for comparison resulting in NULL */
475 /* target for comparison yielding inequality */
479 /* for EEOP_ROWCOMPARE_FINAL */
482 RowCompareType rctype
;
485 /* for EEOP_MINMAX */
488 /* workspace for argument values */
492 /* is it GREATEST or LEAST? */
494 /* lookup and call data for comparison function */
496 FunctionCallInfo fcinfo_data
;
499 /* for EEOP_FIELDSELECT */
502 AttrNumber fieldnum
; /* field number to extract */
503 Oid resulttype
; /* field's type */
504 /* cached descriptor for composite type - filled at runtime */
505 ExprEvalRowtypeCache rowcache
;
508 /* for EEOP_FIELDSTORE_DEFORM / FIELDSTORE_FORM */
511 /* original expression node */
514 /* cached descriptor for composite type - filled at runtime */
515 /* note that a DEFORM and FORM pair share the same cache */
516 ExprEvalRowtypeCache
*rowcache
;
518 /* workspace for column values */
524 /* for EEOP_SBSREF_SUBSCRIPTS */
527 ExecEvalBoolSubroutine subscriptfunc
; /* evaluation subroutine */
528 /* too big to have inline */
529 struct SubscriptingRefState
*state
;
530 int jumpdone
; /* jump here on null */
533 /* for EEOP_SBSREF_OLD / ASSIGN / FETCH */
536 ExecEvalSubroutine subscriptfunc
; /* evaluation subroutine */
537 /* too big to have inline */
538 struct SubscriptingRefState
*state
;
541 /* for EEOP_DOMAIN_NOTNULL / DOMAIN_CHECK */
544 /* name of constraint */
545 char *constraintname
;
546 /* where the result of a CHECK constraint will be stored */
549 /* OID of domain type */
553 /* for EEOP_CONVERT_ROWTYPE */
556 Oid inputtype
; /* input composite type */
557 Oid outputtype
; /* output composite type */
558 /* these three fields are filled at runtime: */
559 ExprEvalRowtypeCache
*incache
; /* cache for input type */
560 ExprEvalRowtypeCache
*outcache
; /* cache for output type */
561 TupleConversionMap
*map
; /* column mapping */
564 /* for EEOP_SCALARARRAYOP */
567 /* element_type/typlen/typbyval/typalign are filled at runtime */
568 Oid element_type
; /* InvalidOid if not yet filled */
569 bool useOr
; /* use OR or AND semantics? */
570 int16 typlen
; /* array element type storage info */
573 FmgrInfo
*finfo
; /* function's lookup data */
574 FunctionCallInfo fcinfo_data
; /* arguments etc */
575 /* faster to access without additional indirection: */
576 PGFunction fn_addr
; /* actual call address */
579 /* for EEOP_HASHED_SCALARARRAYOP */
583 bool inclause
; /* true for IN and false for NOT IN */
584 struct ScalarArrayOpExprHashTable
*elements_tab
;
585 FmgrInfo
*finfo
; /* function's lookup data */
586 FunctionCallInfo fcinfo_data
; /* arguments etc */
587 ScalarArrayOpExpr
*saop
;
588 } hashedscalararrayop
;
590 /* for EEOP_XMLEXPR */
593 XmlExpr
*xexpr
; /* original expression node */
594 /* workspace for evaluating named args, if any */
595 Datum
*named_argvalue
;
597 /* workspace for evaluating unnamed args, if any */
602 /* for EEOP_AGGREF */
608 /* for EEOP_GROUPING_FUNC */
611 List
*clauses
; /* integer list of column numbers */
614 /* for EEOP_WINDOW_FUNC */
617 /* out-of-line state, modified by nodeWindowAgg.c */
618 WindowFuncExprState
*wfstate
;
621 /* for EEOP_SUBPLAN */
624 /* out-of-line state, created by nodeSubplan.c */
625 SubPlanState
*sstate
;
628 /* for EEOP_AGG_*DESERIALIZE */
631 FunctionCallInfo fcinfo_data
;
635 /* for EEOP_AGG_STRICT_INPUT_CHECK_NULLS / STRICT_INPUT_CHECK_ARGS */
639 * For EEOP_AGG_STRICT_INPUT_CHECK_ARGS args contains pointers to
640 * the NullableDatums that need to be checked for NULLs.
642 * For EEOP_AGG_STRICT_INPUT_CHECK_NULLS nulls contains pointers
643 * to booleans that need to be checked for NULLs.
645 * Both cases currently need to exist because sometimes the
646 * to-be-checked nulls are in TupleTableSlot.isnull array, and
647 * sometimes in FunctionCallInfoBaseData.args[i].isnull.
653 } agg_strict_input_check
;
655 /* for EEOP_AGG_PLAIN_PERGROUP_NULLCHECK */
660 } agg_plain_pergroup_nullcheck
;
662 /* for EEOP_AGG_PLAIN_TRANS_[INIT_][STRICT_]{BYVAL,BYREF} */
663 /* for EEOP_AGG_ORDERED_TRANS_{DATUM,TUPLE} */
666 AggStatePerTrans pertrans
;
667 ExprContext
*aggcontext
;
673 /* for EEOP_JSON_CONSTRUCTOR */
676 struct JsonConstructorExprState
*jcstate
;
679 /* for EEOP_IS_JSON */
682 JsonIsPredicate
*pred
; /* original expression node */
685 /* for EEOP_JSONEXPR */
688 struct JsonExprState
*jsestate
;
695 /* Non-inline data for container operations */
696 typedef struct SubscriptingRefState
698 bool isassignment
; /* is it assignment, or just fetch? */
700 /* workspace for type-specific subscripting code */
703 /* numupper and upperprovided[] are filled at expression compile time */
704 /* at runtime, subscripts are computed in upperindex[]/upperindexnull[] */
706 bool *upperprovided
; /* indicates if this position is supplied */
708 bool *upperindexnull
;
710 /* similarly for lower indexes, if any */
714 bool *lowerindexnull
;
716 /* for assignment, new value to assign is evaluated into here */
720 /* if we have a nested assignment, sbs_fetch_old puts old value here */
723 } SubscriptingRefState
;
725 /* Execution step methods used for SubscriptingRef */
726 typedef struct SubscriptExecSteps
728 /* See nodes/subscripting.h for more detail about these */
729 ExecEvalBoolSubroutine sbs_check_subscripts
; /* process subscripts */
730 ExecEvalSubroutine sbs_fetch
; /* fetch an element */
731 ExecEvalSubroutine sbs_assign
; /* assign to an element */
732 ExecEvalSubroutine sbs_fetch_old
; /* fetch old value for assignment */
733 } SubscriptExecSteps
;
735 /* EEOP_JSON_CONSTRUCTOR state, too big to inline */
736 typedef struct JsonConstructorExprState
738 JsonConstructorExpr
*constructor
;
746 } *arg_type_cache
; /* cache for datum_to_json[b]() */
748 } JsonConstructorExprState
;
750 /* EEOP_JSONEXPR state, too big to inline */
751 typedef struct JsonExprState
753 JsonExpr
*jsexpr
; /* original expression node */
757 FmgrInfo func
; /* typinput function for output type */
759 } input
; /* I/O info for output type */
762 *formatted_expr
, /* formatted context item value */
763 *res_expr
, /* result item */
764 *coercion_expr
, /* input for JSON item coercion */
765 *pathspec
; /* path specification value */
767 ExprState
*result_expr
; /* coerced to output type */
768 ExprState
*default_on_empty
; /* ON EMPTY DEFAULT expression */
769 ExprState
*default_on_error
; /* ON ERROR DEFAULT expression */
770 List
*args
; /* passing arguments */
772 void *cache
; /* cache for json_populate_type() */
774 struct JsonCoercionsState
776 struct JsonCoercionState
778 JsonCoercion
*coercion
; /* coercion expression */
779 ExprState
*estate
; /* coercion expression state */
790 } coercions
; /* states for coercion from SQL/JSON item
791 * types directly to the output type */
794 /* functions in execExpr.c */
795 extern void ExprEvalPushStep(ExprState
*es
, const ExprEvalStep
*s
);
797 /* functions in execExprInterp.c */
798 extern void ExecReadyInterpretedExpr(ExprState
*state
);
799 extern ExprEvalOp
ExecEvalStepOp(ExprState
*state
, ExprEvalStep
*op
);
801 extern Datum
ExecInterpExprStillValid(ExprState
*state
, ExprContext
*econtext
, bool *isNull
);
802 extern void CheckExprStillValid(ExprState
*state
, ExprContext
*econtext
);
805 * Non fast-path execution functions. These are externs instead of statics in
806 * execExprInterp.c, because that allows them to be used by other methods of
807 * expression evaluation, reducing code duplication.
809 extern void ExecEvalFuncExprFusage(ExprState
*state
, ExprEvalStep
*op
,
810 ExprContext
*econtext
);
811 extern void ExecEvalFuncExprStrictFusage(ExprState
*state
, ExprEvalStep
*op
,
812 ExprContext
*econtext
);
813 extern void ExecEvalParamExec(ExprState
*state
, ExprEvalStep
*op
,
814 ExprContext
*econtext
);
815 extern void ExecEvalParamExtern(ExprState
*state
, ExprEvalStep
*op
,
816 ExprContext
*econtext
);
817 extern void ExecEvalSQLValueFunction(ExprState
*state
, ExprEvalStep
*op
);
818 extern void ExecEvalCurrentOfExpr(ExprState
*state
, ExprEvalStep
*op
);
819 extern void ExecEvalNextValueExpr(ExprState
*state
, ExprEvalStep
*op
);
820 extern void ExecEvalRowNull(ExprState
*state
, ExprEvalStep
*op
,
821 ExprContext
*econtext
);
822 extern void ExecEvalRowNotNull(ExprState
*state
, ExprEvalStep
*op
,
823 ExprContext
*econtext
);
824 extern void ExecEvalArrayExpr(ExprState
*state
, ExprEvalStep
*op
);
825 extern void ExecEvalArrayCoerce(ExprState
*state
, ExprEvalStep
*op
,
826 ExprContext
*econtext
);
827 extern void ExecEvalRow(ExprState
*state
, ExprEvalStep
*op
);
828 extern void ExecEvalMinMax(ExprState
*state
, ExprEvalStep
*op
);
829 extern void ExecEvalFieldSelect(ExprState
*state
, ExprEvalStep
*op
,
830 ExprContext
*econtext
);
831 extern void ExecEvalFieldStoreDeForm(ExprState
*state
, ExprEvalStep
*op
,
832 ExprContext
*econtext
);
833 extern void ExecEvalFieldStoreForm(ExprState
*state
, ExprEvalStep
*op
,
834 ExprContext
*econtext
);
835 extern void ExecEvalConvertRowtype(ExprState
*state
, ExprEvalStep
*op
,
836 ExprContext
*econtext
);
837 extern void ExecEvalScalarArrayOp(ExprState
*state
, ExprEvalStep
*op
);
838 extern void ExecEvalHashedScalarArrayOp(ExprState
*state
, ExprEvalStep
*op
,
839 ExprContext
*econtext
);
840 extern void ExecEvalConstraintNotNull(ExprState
*state
, ExprEvalStep
*op
);
841 extern void ExecEvalConstraintCheck(ExprState
*state
, ExprEvalStep
*op
);
842 extern void ExecEvalXmlExpr(ExprState
*state
, ExprEvalStep
*op
);
843 extern void ExecEvalJsonIsPredicate(ExprState
*state
, ExprEvalStep
*op
);
844 extern void ExecEvalGroupingFunc(ExprState
*state
, ExprEvalStep
*op
);
845 extern void ExecEvalSubPlan(ExprState
*state
, ExprEvalStep
*op
,
846 ExprContext
*econtext
);
847 extern void ExecEvalWholeRowVar(ExprState
*state
, ExprEvalStep
*op
,
848 ExprContext
*econtext
);
849 extern void ExecEvalSysVar(ExprState
*state
, ExprEvalStep
*op
,
850 ExprContext
*econtext
, TupleTableSlot
*slot
);
851 extern void ExecEvalJsonConstructor(ExprState
*state
, ExprEvalStep
*op
,
852 ExprContext
*econtext
);
853 extern void ExecEvalJson(ExprState
*state
, ExprEvalStep
*op
,
854 ExprContext
*econtext
);
855 extern Datum
ExecPrepareJsonItemCoercion(struct JsonbValue
*item
,
856 JsonReturning
*returning
,
857 struct JsonCoercionsState
*coercions
,
858 struct JsonCoercionState
**pjcstate
);
859 extern bool ExecEvalJsonNeedsSubTransaction(JsonExpr
*jsexpr
,
860 struct JsonCoercionsState
*);
861 extern Datum
ExecEvalExprPassingCaseValue(ExprState
*estate
,
862 ExprContext
*econtext
, bool *isnull
,
864 bool caseval_isnull
);
866 extern void ExecAggInitGroup(AggState
*aggstate
, AggStatePerTrans pertrans
, AggStatePerGroup pergroup
,
867 ExprContext
*aggcontext
);
868 extern Datum
ExecAggTransReparent(AggState
*aggstate
, AggStatePerTrans pertrans
,
869 Datum newValue
, bool newValueIsNull
,
870 Datum oldValue
, bool oldValueIsNull
);
871 extern void ExecEvalAggOrderedTransDatum(ExprState
*state
, ExprEvalStep
*op
,
872 ExprContext
*econtext
);
873 extern void ExecEvalAggOrderedTransTuple(ExprState
*state
, ExprEvalStep
*op
,
874 ExprContext
*econtext
);
876 #endif /* EXEC_EXPR_H */