PostgreSQL Source Code  git master
execExpr.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * execExpr.h
4  * Low level infrastructure related to expression evaluation
5  *
6  *
7  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/executor/execExpr.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef EXEC_EXPR_H
15 #define EXEC_EXPR_H
16 
17 #include "executor/nodeAgg.h"
18 #include "nodes/execnodes.h"
19 
20 /* forward references to avoid circularity */
21 struct ExprEvalStep;
24 
25 /* Bits in ExprState->flags (see also execnodes.h for public flag bits): */
26 /* expression's interpreter has been initialized */
27 #define EEO_FLAG_INTERPRETER_INITIALIZED (1 << 1)
28 /* jump-threading is in use */
29 #define EEO_FLAG_DIRECT_THREADED (1 << 2)
30 
31 /* Typical API for out-of-line evaluation subroutines */
33  struct ExprEvalStep *op,
34  ExprContext *econtext);
35 
36 /* API for out-of-line evaluation subroutines returning bool */
38  struct ExprEvalStep *op,
39  ExprContext *econtext);
40 
41 /* ExprEvalSteps that cache a composite type's tupdesc need one of these */
42 /* (it fits in-line in some step types, otherwise allocate out-of-line) */
43 typedef struct ExprEvalRowtypeCache
44 {
45  /*
46  * cacheptr points to composite type's TypeCacheEntry if tupdesc_id is not
47  * 0; or for an anonymous RECORD type, it points directly at the cached
48  * tupdesc for the type, and tupdesc_id is 0. (We'd use separate fields
49  * if space were not at a premium.) Initial state is cacheptr == NULL.
50  */
51  void *cacheptr;
52  uint64 tupdesc_id; /* last-seen tupdesc identifier, or 0 */
54 
55 /*
56  * Discriminator for ExprEvalSteps.
57  *
58  * Identifies the operation to be executed and which member in the
59  * ExprEvalStep->d union is valid.
60  *
61  * The order of entries needs to be kept in sync with the dispatch_table[]
62  * array in execExprInterp.c:ExecInterpExpr().
63  */
64 typedef enum ExprEvalOp
65 {
66  /* entire expression has been evaluated completely, return */
68 
69  /* apply slot_getsomeattrs on corresponding tuple slot */
73 
74  /* compute non-system Var value */
78 
79  /* compute system Var value */
83 
84  /* compute wholerow Var */
86 
87  /*
88  * Compute non-system Var value, assign it into ExprState's resultslot.
89  * These are not used if a CheckVarSlotCompatibility() check would be
90  * needed.
91  */
95 
96  /* assign ExprState's resvalue/resnull to a column of its resultslot */
98  /* ditto, applying MakeExpandedObjectReadOnly() */
100 
101  /* evaluate Const value */
103 
104  /*
105  * Evaluate function call (including OpExprs etc). For speed, we
106  * distinguish in the opcode whether the function is strict and/or
107  * requires usage stats tracking.
108  */
113 
114  /*
115  * Evaluate boolean AND expression, one step per subexpression. FIRST/LAST
116  * subexpressions are special-cased for performance. Since AND always has
117  * at least two subexpressions, FIRST and LAST never apply to the same
118  * subexpression.
119  */
123 
124  /* similarly for boolean OR expression */
128 
129  /* evaluate boolean NOT expression */
131 
132  /* simplified version of BOOL_AND_STEP for use by ExecQual() */
134 
135  /* unconditional jump to another step */
137 
138  /* conditional jumps based on current result value */
142 
143  /* perform NULL tests for scalar values */
146 
147  /* perform NULL tests for row values */
150 
151  /* evaluate a BooleanTest expression */
156 
157  /* evaluate PARAM_EXEC/EXTERN parameters */
161 
162  /* return CaseTestExpr value */
164 
165  /* apply MakeExpandedObjectReadOnly() to target value */
167 
168  /* evaluate assorted special-purpose expression types */
178 
179  /*
180  * Compare two individual elements of each of two compared ROW()
181  * expressions. Skip to ROWCOMPARE_FINAL if elements are not equal.
182  */
184 
185  /* evaluate boolean value based on previous ROWCOMPARE_STEP operations */
187 
188  /* evaluate GREATEST() or LEAST() */
190 
191  /* evaluate FieldSelect expression */
193 
194  /*
195  * Deform tuple before evaluating new values for individual fields in a
196  * FieldStore expression.
197  */
199 
200  /*
201  * Form the new tuple for a FieldStore expression. Individual fields will
202  * have been evaluated into columns of the tuple deformed by the preceding
203  * DEFORM step.
204  */
206 
207  /* Process container subscripts; possibly short-circuit result to NULL */
209 
210  /*
211  * Compute old container element/slice when a SubscriptingRef assignment
212  * expression contains SubscriptingRef/FieldStore subexpressions. Value is
213  * accessed using the CaseTest mechanism.
214  */
216 
217  /* compute new value for SubscriptingRef assignment expression */
219 
220  /* compute element/slice for SubscriptingRef fetch expression */
222 
223  /* evaluate value for CoerceToDomainValue */
225 
226  /* evaluate a domain's NOT NULL constraint */
228 
229  /* evaluate a single domain CHECK constraint */
231 
232  /* evaluate assorted special-purpose expression types */
241 
242  /* aggregation related nodes */
258 
259  /* non-existent operation, used e.g. to check array lengths */
260  EEOP_LAST
262 
263 
264 typedef struct ExprEvalStep
265 {
266  /*
267  * Instruction to be executed. During instruction preparation this is an
268  * enum ExprEvalOp, but later it can be changed to some other type, e.g. a
269  * pointer for computed goto (that's why it's an intptr_t).
270  */
271  intptr_t opcode;
272 
273  /* where to store the result of this step */
275  bool *resnull;
276 
277  /*
278  * Inline data for the operation. Inline data is faster to access, but
279  * also bloats the size of all instructions. The union should be kept to
280  * no more than 40 bytes on 64-bit systems (so that the entire struct is
281  * no more than 64 bytes, a single cacheline on common systems).
282  */
283  union
284  {
285  /* for EEOP_INNER/OUTER/SCAN_FETCHSOME */
286  struct
287  {
288  /* attribute number up to which to fetch (inclusive) */
289  int last_var;
290  /* will the type of slot be the same for every invocation */
291  bool fixed;
292  /* tuple descriptor, if known */
294  /* type of slot, can only be relied upon if fixed is set */
296  } fetch;
297 
298  /* for EEOP_INNER/OUTER/SCAN_[SYS]VAR[_FIRST] */
299  struct
300  {
301  /* attnum is attr number - 1 for regular VAR ... */
302  /* but it's just the normal (negative) attr number for SYSVAR */
303  int attnum;
304  Oid vartype; /* type OID of variable */
305  } var;
306 
307  /* for EEOP_WHOLEROW */
308  struct
309  {
310  Var *var; /* original Var node in plan tree */
311  bool first; /* first time through, need to initialize? */
312  bool slow; /* need runtime check for nulls? */
313  TupleDesc tupdesc; /* descriptor for resulting tuples */
314  JunkFilter *junkFilter; /* JunkFilter to remove resjunk cols */
316 
317  /* for EEOP_ASSIGN_*_VAR */
318  struct
319  {
320  /* target index in ExprState->resultslot->tts_values/nulls */
322  /* source attribute number - 1 */
323  int attnum;
325 
326  /* for EEOP_ASSIGN_TMP[_MAKE_RO] */
327  struct
328  {
329  /* target index in ExprState->resultslot->tts_values/nulls */
330  int resultnum;
332 
333  /* for EEOP_CONST */
334  struct
335  {
336  /* constant's value */
338  bool isnull;
340 
341  /* for EEOP_FUNCEXPR_* / NULLIF / DISTINCT */
342  struct
343  {
344  FmgrInfo *finfo; /* function's lookup data */
345  FunctionCallInfo fcinfo_data; /* arguments etc */
346  /* faster to access without additional indirection: */
347  PGFunction fn_addr; /* actual call address */
348  int nargs; /* number of arguments */
349  } func;
350 
351  /* for EEOP_BOOL_*_STEP */
352  struct
353  {
354  bool *anynull; /* track if any input was NULL */
355  int jumpdone; /* jump here if result determined */
357 
358  /* for EEOP_QUAL */
359  struct
360  {
361  int jumpdone; /* jump here on false or null */
363 
364  /* for EEOP_JUMP[_CONDITION] */
365  struct
366  {
367  int jumpdone; /* target instruction's index */
368  } jump;
369 
370  /* for EEOP_NULLTEST_ROWIS[NOT]NULL */
371  struct
372  {
373  /* cached descriptor for composite type - filled at runtime */
376 
377  /* for EEOP_PARAM_EXEC/EXTERN */
378  struct
379  {
380  int paramid; /* numeric ID for parameter */
381  Oid paramtype; /* OID of parameter's datatype */
382  } param;
383 
384  /* for EEOP_PARAM_CALLBACK */
385  struct
386  {
387  ExecEvalSubroutine paramfunc; /* add-on evaluation subroutine */
388  void *paramarg; /* private data for same */
389  int paramid; /* numeric ID for parameter */
390  Oid paramtype; /* OID of parameter's datatype */
392 
393  /* for EEOP_CASE_TESTVAL/DOMAIN_TESTVAL */
394  struct
395  {
396  Datum *value; /* value to return */
397  bool *isnull;
399 
400  /* for EEOP_MAKE_READONLY */
401  struct
402  {
403  Datum *value; /* value to coerce to read-only */
404  bool *isnull;
406 
407  /* for EEOP_IOCOERCE */
408  struct
409  {
410  /* lookup and call info for source type's output function */
413  /* lookup and call info for result type's input function */
417 
418  /* for EEOP_NEXTVALUEEXPR */
419  struct
420  {
424 
425  /* for EEOP_ARRAYEXPR */
426  struct
427  {
428  Datum *elemvalues; /* element values get stored here */
429  bool *elemnulls;
430  int nelems; /* length of the above arrays */
431  Oid elemtype; /* array element type */
432  int16 elemlength; /* typlen of the array element type */
433  bool elembyval; /* is the element type pass-by-value? */
434  char elemalign; /* typalign of the element type */
435  bool multidims; /* is array expression multi-D? */
437 
438  /* for EEOP_ARRAYCOERCE */
439  struct
440  {
441  ExprState *elemexprstate; /* null if no per-element work */
442  Oid resultelemtype; /* element type of result array */
443  struct ArrayMapState *amstate; /* workspace for array_map */
445 
446  /* for EEOP_ROW */
447  struct
448  {
449  TupleDesc tupdesc; /* descriptor for result tuples */
450  /* workspace for the values constituting the row: */
451  Datum *elemvalues;
452  bool *elemnulls;
453  } row;
454 
455  /* for EEOP_ROWCOMPARE_STEP */
456  struct
457  {
458  /* lookup and call data for column comparison function */
459  FmgrInfo *finfo;
462  /* target for comparison resulting in NULL */
463  int jumpnull;
464  /* target for comparison yielding inequality */
465  int jumpdone;
467 
468  /* for EEOP_ROWCOMPARE_FINAL */
469  struct
470  {
473 
474  /* for EEOP_MINMAX */
475  struct
476  {
477  /* workspace for argument values */
479  bool *nulls;
480  int nelems;
481  /* is it GREATEST or LEAST? */
483  /* lookup and call data for comparison function */
484  FmgrInfo *finfo;
487 
488  /* for EEOP_FIELDSELECT */
489  struct
490  {
491  AttrNumber fieldnum; /* field number to extract */
492  Oid resulttype; /* field's type */
493  /* cached descriptor for composite type - filled at runtime */
496 
497  /* for EEOP_FIELDSTORE_DEFORM / FIELDSTORE_FORM */
498  struct
499  {
500  /* original expression node */
502 
503  /* cached descriptor for composite type - filled at runtime */
504  /* note that a DEFORM and FORM pair share the same cache */
506 
507  /* workspace for column values */
508  Datum *values;
509  bool *nulls;
510  int ncolumns;
512 
513  /* for EEOP_SBSREF_SUBSCRIPTS */
514  struct
515  {
516  ExecEvalBoolSubroutine subscriptfunc; /* evaluation subroutine */
517  /* too big to have inline */
519  int jumpdone; /* jump here on null */
521 
522  /* for EEOP_SBSREF_OLD / ASSIGN / FETCH */
523  struct
524  {
525  ExecEvalSubroutine subscriptfunc; /* evaluation subroutine */
526  /* too big to have inline */
527  struct SubscriptingRefState *state;
529 
530  /* for EEOP_DOMAIN_NOTNULL / DOMAIN_CHECK */
531  struct
532  {
533  /* name of constraint */
535  /* where the result of a CHECK constraint will be stored */
537  bool *checknull;
538  /* OID of domain type */
539  Oid resulttype;
541 
542  /* for EEOP_CONVERT_ROWTYPE */
543  struct
544  {
545  Oid inputtype; /* input composite type */
546  Oid outputtype; /* output composite type */
547  /* these three fields are filled at runtime: */
548  ExprEvalRowtypeCache *incache; /* cache for input type */
549  ExprEvalRowtypeCache *outcache; /* cache for output type */
550  TupleConversionMap *map; /* column mapping */
552 
553  /* for EEOP_SCALARARRAYOP */
554  struct
555  {
556  /* element_type/typlen/typbyval/typalign are filled at runtime */
557  Oid element_type; /* InvalidOid if not yet filled */
558  bool useOr; /* use OR or AND semantics? */
559  int16 typlen; /* array element type storage info */
560  bool typbyval;
561  char typalign;
562  FmgrInfo *finfo; /* function's lookup data */
563  FunctionCallInfo fcinfo_data; /* arguments etc */
564  /* faster to access without additional indirection: */
565  PGFunction fn_addr; /* actual call address */
567 
568  /* for EEOP_HASHED_SCALARARRAYOP */
569  struct
570  {
571  bool has_nulls;
572  bool inclause; /* true for IN and false for NOT IN */
574  FmgrInfo *finfo; /* function's lookup data */
575  FunctionCallInfo fcinfo_data; /* arguments etc */
578 
579  /* for EEOP_XMLEXPR */
580  struct
581  {
582  XmlExpr *xexpr; /* original expression node */
583  /* workspace for evaluating named args, if any */
586  /* workspace for evaluating unnamed args, if any */
588  bool *argnull;
590 
591  /* for EEOP_AGGREF */
592  struct
593  {
594  int aggno;
596 
597  /* for EEOP_GROUPING_FUNC */
598  struct
599  {
600  List *clauses; /* integer list of column numbers */
602 
603  /* for EEOP_WINDOW_FUNC */
604  struct
605  {
606  /* out-of-line state, modified by nodeWindowAgg.c */
609 
610  /* for EEOP_SUBPLAN */
611  struct
612  {
613  /* out-of-line state, created by nodeSubplan.c */
616 
617  /* for EEOP_AGG_*DESERIALIZE */
618  struct
619  {
621  int jumpnull;
623 
624  /* for EEOP_AGG_STRICT_INPUT_CHECK_NULLS / STRICT_INPUT_CHECK_ARGS */
625  struct
626  {
627  /*
628  * For EEOP_AGG_STRICT_INPUT_CHECK_ARGS args contains pointers to
629  * the NullableDatums that need to be checked for NULLs.
630  *
631  * For EEOP_AGG_STRICT_INPUT_CHECK_NULLS nulls contains pointers
632  * to booleans that need to be checked for NULLs.
633  *
634  * Both cases currently need to exist because sometimes the
635  * to-be-checked nulls are in TupleTableSlot.isnull array, and
636  * sometimes in FunctionCallInfoBaseData.args[i].isnull.
637  */
639  bool *nulls;
640  int nargs;
641  int jumpnull;
643 
644  /* for EEOP_AGG_PLAIN_PERGROUP_NULLCHECK */
645  struct
646  {
647  int setoff;
648  int jumpnull;
650 
651  /* for EEOP_AGG_PRESORTED_DISTINCT_{SINGLE,MULTI} */
652  struct
653  {
658 
659  /* for EEOP_AGG_PLAIN_TRANS_[INIT_][STRICT_]{BYVAL,BYREF} */
660  /* for EEOP_AGG_ORDERED_TRANS_{DATUM,TUPLE} */
661  struct
662  {
665  int setno;
666  int transno;
667  int setoff;
669  } d;
671 
672 
673 /* Non-inline data for container operations */
674 typedef struct SubscriptingRefState
675 {
676  bool isassignment; /* is it assignment, or just fetch? */
677 
678  /* workspace for type-specific subscripting code */
679  void *workspace;
680 
681  /* numupper and upperprovided[] are filled at expression compile time */
682  /* at runtime, subscripts are computed in upperindex[]/upperindexnull[] */
683  int numupper;
684  bool *upperprovided; /* indicates if this position is supplied */
687 
688  /* similarly for lower indexes, if any */
689  int numlower;
693 
694  /* for assignment, new value to assign is evaluated into here */
697 
698  /* if we have a nested assignment, sbs_fetch_old puts old value here */
700  bool prevnull;
702 
703 /* Execution step methods used for SubscriptingRef */
704 typedef struct SubscriptExecSteps
705 {
706  /* See nodes/subscripting.h for more detail about these */
708  ExecEvalSubroutine sbs_fetch; /* fetch an element */
709  ExecEvalSubroutine sbs_assign; /* assign to an element */
710  ExecEvalSubroutine sbs_fetch_old; /* fetch old value for assignment */
712 
713 
714 /* functions in execExpr.c */
715 extern void ExprEvalPushStep(ExprState *es, const ExprEvalStep *s);
716 
717 /* functions in execExprInterp.c */
720 
721 extern Datum ExecInterpExprStillValid(ExprState *state, ExprContext *econtext, bool *isNull);
722 extern void CheckExprStillValid(ExprState *state, ExprContext *econtext);
723 
724 /*
725  * Non fast-path execution functions. These are externs instead of statics in
726  * execExprInterp.c, because that allows them to be used by other methods of
727  * expression evaluation, reducing code duplication.
728  */
730  ExprContext *econtext);
732  ExprContext *econtext);
734  ExprContext *econtext);
736  ExprContext *econtext);
739 extern void ExecEvalRowNull(ExprState *state, ExprEvalStep *op,
740  ExprContext *econtext);
742  ExprContext *econtext);
743 extern void ExecEvalArrayExpr(ExprState *state, ExprEvalStep *op);
745  ExprContext *econtext);
746 extern void ExecEvalRow(ExprState *state, ExprEvalStep *op);
747 extern void ExecEvalMinMax(ExprState *state, ExprEvalStep *op);
749  ExprContext *econtext);
751  ExprContext *econtext);
753  ExprContext *econtext);
755  ExprContext *econtext);
758  ExprContext *econtext);
761 extern void ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op);
763 extern void ExecEvalSubPlan(ExprState *state, ExprEvalStep *op,
764  ExprContext *econtext);
766  ExprContext *econtext);
767 extern void ExecEvalSysVar(ExprState *state, ExprEvalStep *op,
768  ExprContext *econtext, TupleTableSlot *slot);
769 
770 extern void ExecAggInitGroup(AggState *aggstate, AggStatePerTrans pertrans, AggStatePerGroup pergroup,
771  ExprContext *aggcontext);
772 extern Datum ExecAggTransReparent(AggState *aggstate, AggStatePerTrans pertrans,
773  Datum newValue, bool newValueIsNull,
774  Datum oldValue, bool oldValueIsNull);
775 extern bool ExecEvalPreOrderedDistinctSingle(AggState *aggstate,
776  AggStatePerTrans pertrans);
777 extern bool ExecEvalPreOrderedDistinctMulti(AggState *aggstate,
778  AggStatePerTrans pertrans);
780  ExprContext *econtext);
782  ExprContext *econtext);
783 
784 #endif /* EXEC_EXPR_H */
int16 AttrNumber
Definition: attnum.h:21
signed short int16
Definition: c.h:429
unsigned char bool
Definition: c.h:392
void ExecEvalParamExtern(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalFieldStoreForm(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalGroupingFunc(ExprState *state, ExprEvalStep *op)
struct SubscriptExecSteps SubscriptExecSteps
void ExecEvalRow(ExprState *state, ExprEvalStep *op)
void ExecEvalFieldStoreDeForm(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalCurrentOfExpr(ExprState *state, ExprEvalStep *op)
void ExecEvalRowNull(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
struct SubscriptingRefState SubscriptingRefState
void ExecEvalArrayExpr(ExprState *state, ExprEvalStep *op)
Datum ExecInterpExprStillValid(ExprState *state, ExprContext *econtext, bool *isNull)
void ExecEvalConvertRowtype(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
bool ExecEvalPreOrderedDistinctMulti(AggState *aggstate, AggStatePerTrans pertrans)
void ExecEvalFieldSelect(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalConstraintNotNull(ExprState *state, ExprEvalStep *op)
void ExprEvalPushStep(ExprState *es, const ExprEvalStep *s)
Definition: execExpr.c:2418
void ExecEvalScalarArrayOp(ExprState *state, ExprEvalStep *op)
void ExecEvalAggOrderedTransDatum(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalParamExec(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
struct ExprEvalRowtypeCache ExprEvalRowtypeCache
void ExecAggInitGroup(AggState *aggstate, AggStatePerTrans pertrans, AggStatePerGroup pergroup, ExprContext *aggcontext)
void ExecEvalNextValueExpr(ExprState *state, ExprEvalStep *op)
void ExecEvalSysVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext, TupleTableSlot *slot)
void ExecEvalMinMax(ExprState *state, ExprEvalStep *op)
void ExecEvalSubPlan(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
bool(* ExecEvalBoolSubroutine)(ExprState *state, struct ExprEvalStep *op, ExprContext *econtext)
Definition: execExpr.h:37
struct ExprEvalStep ExprEvalStep
void CheckExprStillValid(ExprState *state, ExprContext *econtext)
void ExecEvalWholeRowVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalHashedScalarArrayOp(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecReadyInterpretedExpr(ExprState *state)
void ExecEvalRowNotNull(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
ExprEvalOp ExecEvalStepOp(ExprState *state, ExprEvalStep *op)
void(* ExecEvalSubroutine)(ExprState *state, struct ExprEvalStep *op, ExprContext *econtext)
Definition: execExpr.h:32
ExprEvalOp
Definition: execExpr.h:65
@ EEOP_ASSIGN_TMP
Definition: execExpr.h:97
@ EEOP_SUBPLAN
Definition: execExpr.h:240
@ EEOP_CONVERT_ROWTYPE
Definition: execExpr.h:233
@ EEOP_FUNCEXPR_STRICT_FUSAGE
Definition: execExpr.h:112
@ EEOP_ARRAYEXPR
Definition: execExpr.h:175
@ EEOP_NOT_DISTINCT
Definition: execExpr.h:171
@ EEOP_DOMAIN_TESTVAL
Definition: execExpr.h:224
@ EEOP_PARAM_EXTERN
Definition: execExpr.h:159
@ EEOP_BOOL_AND_STEP
Definition: execExpr.h:121
@ EEOP_WHOLEROW
Definition: execExpr.h:85
@ EEOP_AGGREF
Definition: execExpr.h:237
@ EEOP_INNER_VAR
Definition: execExpr.h:75
@ EEOP_AGG_PLAIN_PERGROUP_NULLCHECK
Definition: execExpr.h:247
@ EEOP_ROWCOMPARE_FINAL
Definition: execExpr.h:186
@ EEOP_AGG_STRICT_DESERIALIZE
Definition: execExpr.h:243
@ EEOP_IOCOERCE
Definition: execExpr.h:169
@ EEOP_GROUPING_FUNC
Definition: execExpr.h:238
@ EEOP_DOMAIN_CHECK
Definition: execExpr.h:230
@ EEOP_BOOLTEST_IS_NOT_FALSE
Definition: execExpr.h:155
@ EEOP_NEXTVALUEEXPR
Definition: execExpr.h:174
@ EEOP_DONE
Definition: execExpr.h:67
@ EEOP_AGG_PLAIN_TRANS_BYREF
Definition: execExpr.h:253
@ EEOP_QUAL
Definition: execExpr.h:133
@ EEOP_AGG_PRESORTED_DISTINCT_MULTI
Definition: execExpr.h:255
@ EEOP_AGG_PLAIN_TRANS_BYVAL
Definition: execExpr.h:250
@ EEOP_SCAN_VAR
Definition: execExpr.h:77
@ EEOP_BOOL_NOT_STEP
Definition: execExpr.h:130
@ EEOP_ASSIGN_SCAN_VAR
Definition: execExpr.h:94
@ EEOP_SCAN_SYSVAR
Definition: execExpr.h:82
@ EEOP_SCALARARRAYOP
Definition: execExpr.h:234
@ EEOP_DOMAIN_NOTNULL
Definition: execExpr.h:227
@ EEOP_WINDOW_FUNC
Definition: execExpr.h:239
@ EEOP_INNER_FETCHSOME
Definition: execExpr.h:70
@ EEOP_NULLTEST_ROWISNOTNULL
Definition: execExpr.h:149
@ EEOP_ASSIGN_OUTER_VAR
Definition: execExpr.h:93
@ EEOP_ROW
Definition: execExpr.h:177
@ EEOP_MAKE_READONLY
Definition: execExpr.h:166
@ EEOP_FIELDSTORE_FORM
Definition: execExpr.h:205
@ EEOP_SBSREF_SUBSCRIPTS
Definition: execExpr.h:208
@ EEOP_SBSREF_FETCH
Definition: execExpr.h:221
@ EEOP_FUNCEXPR_STRICT
Definition: execExpr.h:110
@ EEOP_NULLIF
Definition: execExpr.h:172
@ EEOP_CURRENTOFEXPR
Definition: execExpr.h:173
@ EEOP_INNER_SYSVAR
Definition: execExpr.h:80
@ EEOP_ASSIGN_TMP_MAKE_RO
Definition: execExpr.h:99
@ EEOP_CONST
Definition: execExpr.h:102
@ EEOP_BOOL_OR_STEP_LAST
Definition: execExpr.h:127
@ EEOP_BOOL_OR_STEP_FIRST
Definition: execExpr.h:125
@ EEOP_XMLEXPR
Definition: execExpr.h:236
@ EEOP_AGG_STRICT_INPUT_CHECK_NULLS
Definition: execExpr.h:246
@ EEOP_SBSREF_ASSIGN
Definition: execExpr.h:218
@ EEOP_OUTER_SYSVAR
Definition: execExpr.h:81
@ EEOP_ASSIGN_INNER_VAR
Definition: execExpr.h:92
@ EEOP_BOOL_OR_STEP
Definition: execExpr.h:126
@ EEOP_OUTER_FETCHSOME
Definition: execExpr.h:71
@ EEOP_AGG_STRICT_INPUT_CHECK_ARGS
Definition: execExpr.h:245
@ EEOP_NULLTEST_ROWISNULL
Definition: execExpr.h:148
@ EEOP_BOOLTEST_IS_TRUE
Definition: execExpr.h:152
@ EEOP_FUNCEXPR
Definition: execExpr.h:109
@ EEOP_NULLTEST_ISNOTNULL
Definition: execExpr.h:145
@ EEOP_ROWCOMPARE_STEP
Definition: execExpr.h:183
@ EEOP_AGG_DESERIALIZE
Definition: execExpr.h:244
@ EEOP_LAST
Definition: execExpr.h:260
@ EEOP_DISTINCT
Definition: execExpr.h:170
@ EEOP_JUMP_IF_NOT_TRUE
Definition: execExpr.h:141
@ EEOP_FUNCEXPR_FUSAGE
Definition: execExpr.h:111
@ EEOP_AGG_PRESORTED_DISTINCT_SINGLE
Definition: execExpr.h:254
@ EEOP_BOOL_AND_STEP_FIRST
Definition: execExpr.h:120
@ EEOP_JUMP
Definition: execExpr.h:136
@ EEOP_PARAM_CALLBACK
Definition: execExpr.h:160
@ EEOP_BOOL_AND_STEP_LAST
Definition: execExpr.h:122
@ EEOP_AGG_ORDERED_TRANS_DATUM
Definition: execExpr.h:256
@ EEOP_SBSREF_OLD
Definition: execExpr.h:215
@ EEOP_JUMP_IF_NOT_NULL
Definition: execExpr.h:140
@ EEOP_AGG_PLAIN_TRANS_STRICT_BYREF
Definition: execExpr.h:252
@ EEOP_FIELDSTORE_DEFORM
Definition: execExpr.h:198
@ EEOP_BOOLTEST_IS_FALSE
Definition: execExpr.h:154
@ EEOP_BOOLTEST_IS_NOT_TRUE
Definition: execExpr.h:153
@ EEOP_AGG_PLAIN_TRANS_INIT_STRICT_BYVAL
Definition: execExpr.h:248
@ EEOP_PARAM_EXEC
Definition: execExpr.h:158
@ EEOP_AGG_PLAIN_TRANS_STRICT_BYVAL
Definition: execExpr.h:249
@ EEOP_NULLTEST_ISNULL
Definition: execExpr.h:144
@ EEOP_MINMAX
Definition: execExpr.h:189
@ EEOP_JUMP_IF_NULL
Definition: execExpr.h:139
@ EEOP_ARRAYCOERCE
Definition: execExpr.h:176
@ EEOP_FIELDSELECT
Definition: execExpr.h:192
@ EEOP_CASE_TESTVAL
Definition: execExpr.h:163
@ EEOP_AGG_PLAIN_TRANS_INIT_STRICT_BYREF
Definition: execExpr.h:251
@ EEOP_HASHED_SCALARARRAYOP
Definition: execExpr.h:235
@ EEOP_OUTER_VAR
Definition: execExpr.h:76
@ EEOP_AGG_ORDERED_TRANS_TUPLE
Definition: execExpr.h:257
@ EEOP_SCAN_FETCHSOME
Definition: execExpr.h:72
void ExecEvalConstraintCheck(ExprState *state, ExprEvalStep *op)
void ExecEvalArrayCoerce(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalFuncExprStrictFusage(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalFuncExprFusage(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op)
bool ExecEvalPreOrderedDistinctSingle(AggState *aggstate, AggStatePerTrans pertrans)
void ExecEvalAggOrderedTransTuple(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
Datum ExecAggTransReparent(AggState *aggstate, AggStatePerTrans pertrans, Datum newValue, bool newValueIsNull, Datum oldValue, bool oldValueIsNull)
Datum(* PGFunction)(FunctionCallInfo fcinfo)
Definition: fmgr.h:40
uintptr_t Datum
Definition: postgres.h:412
unsigned int Oid
Definition: postgres_ext.h:31
MinMaxOp
Definition: primnodes.h:1279
RowCompareType
Definition: primnodes.h:1242
XmlExpr * xexpr
Definition: execExpr.h:582
Datum * value
Definition: execExpr.h:396
struct ExprEvalStep::@50::@84 grouping_func
Var * var
Definition: execExpr.h:310
void * paramarg
Definition: execExpr.h:388
struct ExprEvalStep::@50::@70 row
bool * anynull
Definition: execExpr.h:354
ExprState * elemexprstate
Definition: execExpr.h:441
MinMaxOp op
Definition: execExpr.h:482
bool typbyval
Definition: execExpr.h:560
char elemalign
Definition: execExpr.h:434
List * clauses
Definition: execExpr.h:600
WindowFuncExprState * wfstate
Definition: execExpr.h:607
ExecEvalBoolSubroutine subscriptfunc
Definition: execExpr.h:516
TupleDesc tupdesc
Definition: execExpr.h:313
Oid seqtypid
Definition: execExpr.h:422
ExprEvalRowtypeCache * rowcache
Definition: execExpr.h:505
int last_var
Definition: execExpr.h:289
JunkFilter * junkFilter
Definition: execExpr.h:314
struct ExprEvalStep::@50::@73 minmax
FmgrInfo * finfo_out
Definition: execExpr.h:411
AttrNumber fieldnum
Definition: execExpr.h:491
struct ExprEvalStep::@50::@58 boolexpr
bool has_nulls
Definition: execExpr.h:571
struct ExprEvalStep::@50::@71 rowcompare_step
struct ExprEvalStep::@50::@87 agg_deserialize
Datum * values
Definition: execExpr.h:478
bool * elemnulls
Definition: execExpr.h:429
struct ExprEvalStep::@50::@51 fetch
bool * checknull
Definition: execExpr.h:537
int ncolumns
Definition: execExpr.h:510
bool * named_argnull
Definition: execExpr.h:585
Oid outputtype
Definition: execExpr.h:546
struct ScalarArrayOpExprHashTable * elements_tab
Definition: execExpr.h:573
bool inclause
Definition: execExpr.h:572
struct SubscriptingRefState * state
Definition: execExpr.h:518
RowCompareType rctype
Definition: execExpr.h:471
SubPlanState * sstate
Definition: execExpr.h:614
bool multidims
Definition: execExpr.h:435
int16 elemlength
Definition: execExpr.h:432
struct ExprEvalStep::@50::@53 wholerow
AggStatePerTrans pertrans
Definition: execExpr.h:654
struct ExprEvalStep::@50::@52 var
bool * isnull
Definition: execExpr.h:397
TupleConversionMap * map
Definition: execExpr.h:550
bool * argnull
Definition: execExpr.h:588
intptr_t opcode
Definition: execExpr.h:271
Oid inputtype
Definition: execExpr.h:545
char typalign
Definition: execExpr.h:561
ExecEvalSubroutine paramfunc
Definition: execExpr.h:387
FunctionCallInfo fcinfo_data_in
Definition: execExpr.h:415
bool elembyval
Definition: execExpr.h:433
struct ExprEvalStep::@50::@88 agg_strict_input_check
PGFunction fn_addr
Definition: execExpr.h:347
TupleDesc known_desc
Definition: execExpr.h:293
NullableDatum * args
Definition: execExpr.h:638
struct ExprEvalStep::@50::@72 rowcompare_final
int resultnum
Definition: execExpr.h:321
bool * nulls
Definition: execExpr.h:479
Datum * resvalue
Definition: execExpr.h:274
struct ExprEvalStep::@50::@61 nulltest_row
Datum * elemvalues
Definition: execExpr.h:428
int jumpnull
Definition: execExpr.h:463
Oid resulttype
Definition: execExpr.h:492
struct ExprEvalStep::@50::@59 qualexpr
ExprEvalRowtypeCache * incache
Definition: execExpr.h:548
ScalarArrayOpExpr * saop
Definition: execExpr.h:576
const TupleTableSlotOps * kind
Definition: execExpr.h:295
Oid resultelemtype
Definition: execExpr.h:442
struct ExprEvalStep::@50::@80 scalararrayop
struct ExprEvalStep::@50::@83 aggref
FunctionCallInfo fcinfo_data
Definition: execExpr.h:345
struct ExprEvalStep::@50::@69 arraycoerce
int jumpdistinct
Definition: execExpr.h:656
struct ExprEvalStep::@50::@60 jump
Datum * checkvalue
Definition: execExpr.h:536
FmgrInfo * finfo_in
Definition: execExpr.h:414
int jumpdone
Definition: execExpr.h:355
struct ExprEvalStep::@50::@67 nextvalueexpr
Datum * named_argvalue
Definition: execExpr.h:584
struct ExprEvalStep::@50::@56 constval
struct ExprEvalStep::@50::@65 make_readonly
struct ExprEvalStep::@50::@57 func
struct ExprEvalStep::@50::@75 fieldstore
union ExprEvalStep::@50 d
Oid paramtype
Definition: execExpr.h:381
struct ExprEvalStep::@50::@78 domaincheck
struct ExprEvalStep::@50::@76 sbsref_subscript
bool fixed
Definition: execExpr.h:291
struct ExprEvalStep::@50::@63 cparam
Datum value
Definition: execExpr.h:337
struct ExprEvalStep::@50::@91 agg_trans
struct ExprEvalStep::@50::@54 assign_var
bool useOr
Definition: execExpr.h:558
struct ExprEvalStep::@50::@74 fieldselect
struct ExprEvalStep::@50::@82 xmlexpr
struct ExprEvalStep::@50::@68 arrayexpr
FieldStore * fstore
Definition: execExpr.h:501
struct ExprEvalStep::@50::@62 param
bool * resnull
Definition: execExpr.h:275
FunctionCallInfo fcinfo_data_out
Definition: execExpr.h:412
ExecEvalSubroutine subscriptfunc
Definition: execExpr.h:525
ExprEvalRowtypeCache * outcache
Definition: execExpr.h:549
int16 typlen
Definition: execExpr.h:559
Datum * argvalue
Definition: execExpr.h:587
struct ExprEvalStep::@50::@89 agg_plain_pergroup_nullcheck
struct ExprEvalStep::@50::@66 iocoerce
struct ExprEvalStep::@50::@55 assign_tmp
struct ExprEvalStep::@50::@81 hashedscalararrayop
struct ExprEvalStep::@50::@85 window_func
ExprEvalRowtypeCache rowcache
Definition: execExpr.h:374
FmgrInfo * finfo
Definition: execExpr.h:344
bool isnull
Definition: execExpr.h:338
ExprContext * aggcontext
Definition: execExpr.h:655
Oid elemtype
Definition: execExpr.h:431
struct ExprEvalStep::@50::@86 subplan
char * constraintname
Definition: execExpr.h:534
struct ExprEvalStep::@50::@79 convert_rowtype
Oid element_type
Definition: execExpr.h:557
struct ExprEvalStep::@50::@64 casetest
bool first
Definition: execExpr.h:311
struct ArrayMapState * amstate
Definition: execExpr.h:443
struct ExprEvalStep::@50::@90 agg_presorted_distinctcheck
struct ExprEvalStep::@50::@77 sbsref
Definition: fmgr.h:57
Definition: pg_list.h:52
ExecEvalSubroutine sbs_fetch_old
Definition: execExpr.h:710
ExecEvalBoolSubroutine sbs_check_subscripts
Definition: execExpr.h:707
ExecEvalSubroutine sbs_assign
Definition: execExpr.h:709
ExecEvalSubroutine sbs_fetch
Definition: execExpr.h:708
Definition: primnodes.h:205
Definition: regguts.h:318