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-2021, 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 */
179 
180  /*
181  * Compare two individual elements of each of two compared ROW()
182  * expressions. Skip to ROWCOMPARE_FINAL if elements are not equal.
183  */
185 
186  /* evaluate boolean value based on previous ROWCOMPARE_STEP operations */
188 
189  /* evaluate GREATEST() or LEAST() */
191 
192  /* evaluate FieldSelect expression */
194 
195  /*
196  * Deform tuple before evaluating new values for individual fields in a
197  * FieldStore expression.
198  */
200 
201  /*
202  * Form the new tuple for a FieldStore expression. Individual fields will
203  * have been evaluated into columns of the tuple deformed by the preceding
204  * DEFORM step.
205  */
207 
208  /* Process container subscripts; possibly short-circuit result to NULL */
210 
211  /*
212  * Compute old container element/slice when a SubscriptingRef assignment
213  * expression contains SubscriptingRef/FieldStore subexpressions. Value is
214  * accessed using the CaseTest mechanism.
215  */
217 
218  /* compute new value for SubscriptingRef assignment expression */
220 
221  /* compute element/slice for SubscriptingRef fetch expression */
223 
224  /* evaluate value for CoerceToDomainValue */
226 
227  /* evaluate a domain's NOT NULL constraint */
229 
230  /* evaluate a single domain CHECK constraint */
232 
233  /* evaluate assorted special-purpose expression types */
242 
243  /* aggregation related nodes */
257 
258  /* non-existent operation, used e.g. to check array lengths */
259  EEOP_LAST
261 
262 
263 typedef struct ExprEvalStep
264 {
265  /*
266  * Instruction to be executed. During instruction preparation this is an
267  * enum ExprEvalOp, but later it can be changed to some other type, e.g. a
268  * pointer for computed goto (that's why it's an intptr_t).
269  */
270  intptr_t opcode;
271 
272  /* where to store the result of this step */
274  bool *resnull;
275 
276  /*
277  * Inline data for the operation. Inline data is faster to access, but
278  * also bloats the size of all instructions. The union should be kept to
279  * no more than 40 bytes on 64-bit systems (so that the entire struct is
280  * no more than 64 bytes, a single cacheline on common systems).
281  */
282  union
283  {
284  /* for EEOP_INNER/OUTER/SCAN_FETCHSOME */
285  struct
286  {
287  /* attribute number up to which to fetch (inclusive) */
288  int last_var;
289  /* will the type of slot be the same for every invocation */
290  bool fixed;
291  /* tuple descriptor, if known */
293  /* type of slot, can only be relied upon if fixed is set */
295  } fetch;
296 
297  /* for EEOP_INNER/OUTER/SCAN_[SYS]VAR[_FIRST] */
298  struct
299  {
300  /* attnum is attr number - 1 for regular VAR ... */
301  /* but it's just the normal (negative) attr number for SYSVAR */
302  int attnum;
303  Oid vartype; /* type OID of variable */
304  } var;
305 
306  /* for EEOP_WHOLEROW */
307  struct
308  {
309  Var *var; /* original Var node in plan tree */
310  bool first; /* first time through, need to initialize? */
311  bool slow; /* need runtime check for nulls? */
312  TupleDesc tupdesc; /* descriptor for resulting tuples */
313  JunkFilter *junkFilter; /* JunkFilter to remove resjunk cols */
315 
316  /* for EEOP_ASSIGN_*_VAR */
317  struct
318  {
319  /* target index in ExprState->resultslot->tts_values/nulls */
321  /* source attribute number - 1 */
322  int attnum;
324 
325  /* for EEOP_ASSIGN_TMP[_MAKE_RO] */
326  struct
327  {
328  /* target index in ExprState->resultslot->tts_values/nulls */
329  int resultnum;
331 
332  /* for EEOP_CONST */
333  struct
334  {
335  /* constant's value */
337  bool isnull;
339 
340  /* for EEOP_FUNCEXPR_* / NULLIF / DISTINCT */
341  struct
342  {
343  FmgrInfo *finfo; /* function's lookup data */
344  FunctionCallInfo fcinfo_data; /* arguments etc */
345  /* faster to access without additional indirection: */
346  PGFunction fn_addr; /* actual call address */
347  int nargs; /* number of arguments */
348  } func;
349 
350  /* for EEOP_BOOL_*_STEP */
351  struct
352  {
353  bool *anynull; /* track if any input was NULL */
354  int jumpdone; /* jump here if result determined */
356 
357  /* for EEOP_QUAL */
358  struct
359  {
360  int jumpdone; /* jump here on false or null */
362 
363  /* for EEOP_JUMP[_CONDITION] */
364  struct
365  {
366  int jumpdone; /* target instruction's index */
367  } jump;
368 
369  /* for EEOP_NULLTEST_ROWIS[NOT]NULL */
370  struct
371  {
372  /* cached descriptor for composite type - filled at runtime */
375 
376  /* for EEOP_PARAM_EXEC/EXTERN */
377  struct
378  {
379  int paramid; /* numeric ID for parameter */
380  Oid paramtype; /* OID of parameter's datatype */
381  } param;
382 
383  /* for EEOP_PARAM_CALLBACK */
384  struct
385  {
386  ExecEvalSubroutine paramfunc; /* add-on evaluation subroutine */
387  void *paramarg; /* private data for same */
388  int paramid; /* numeric ID for parameter */
389  Oid paramtype; /* OID of parameter's datatype */
391 
392  /* for EEOP_CASE_TESTVAL/DOMAIN_TESTVAL */
393  struct
394  {
395  Datum *value; /* value to return */
396  bool *isnull;
398 
399  /* for EEOP_MAKE_READONLY */
400  struct
401  {
402  Datum *value; /* value to coerce to read-only */
403  bool *isnull;
405 
406  /* for EEOP_IOCOERCE */
407  struct
408  {
409  /* lookup and call info for source type's output function */
412  /* lookup and call info for result type's input function */
416 
417  /* for EEOP_SQLVALUEFUNCTION */
418  struct
419  {
422 
423  /* for EEOP_NEXTVALUEEXPR */
424  struct
425  {
429 
430  /* for EEOP_ARRAYEXPR */
431  struct
432  {
433  Datum *elemvalues; /* element values get stored here */
434  bool *elemnulls;
435  int nelems; /* length of the above arrays */
436  Oid elemtype; /* array element type */
437  int16 elemlength; /* typlen of the array element type */
438  bool elembyval; /* is the element type pass-by-value? */
439  char elemalign; /* typalign of the element type */
440  bool multidims; /* is array expression multi-D? */
442 
443  /* for EEOP_ARRAYCOERCE */
444  struct
445  {
446  ExprState *elemexprstate; /* null if no per-element work */
447  Oid resultelemtype; /* element type of result array */
448  struct ArrayMapState *amstate; /* workspace for array_map */
450 
451  /* for EEOP_ROW */
452  struct
453  {
454  TupleDesc tupdesc; /* descriptor for result tuples */
455  /* workspace for the values constituting the row: */
456  Datum *elemvalues;
457  bool *elemnulls;
458  } row;
459 
460  /* for EEOP_ROWCOMPARE_STEP */
461  struct
462  {
463  /* lookup and call data for column comparison function */
464  FmgrInfo *finfo;
467  /* target for comparison resulting in NULL */
468  int jumpnull;
469  /* target for comparison yielding inequality */
470  int jumpdone;
472 
473  /* for EEOP_ROWCOMPARE_FINAL */
474  struct
475  {
478 
479  /* for EEOP_MINMAX */
480  struct
481  {
482  /* workspace for argument values */
484  bool *nulls;
485  int nelems;
486  /* is it GREATEST or LEAST? */
488  /* lookup and call data for comparison function */
489  FmgrInfo *finfo;
492 
493  /* for EEOP_FIELDSELECT */
494  struct
495  {
496  AttrNumber fieldnum; /* field number to extract */
497  Oid resulttype; /* field's type */
498  /* cached descriptor for composite type - filled at runtime */
501 
502  /* for EEOP_FIELDSTORE_DEFORM / FIELDSTORE_FORM */
503  struct
504  {
505  /* original expression node */
507 
508  /* cached descriptor for composite type - filled at runtime */
509  /* note that a DEFORM and FORM pair share the same cache */
511 
512  /* workspace for column values */
513  Datum *values;
514  bool *nulls;
515  int ncolumns;
517 
518  /* for EEOP_SBSREF_SUBSCRIPTS */
519  struct
520  {
521  ExecEvalBoolSubroutine subscriptfunc; /* evaluation subroutine */
522  /* too big to have inline */
524  int jumpdone; /* jump here on null */
526 
527  /* for EEOP_SBSREF_OLD / ASSIGN / FETCH */
528  struct
529  {
530  ExecEvalSubroutine subscriptfunc; /* evaluation subroutine */
531  /* too big to have inline */
532  struct SubscriptingRefState *state;
534 
535  /* for EEOP_DOMAIN_NOTNULL / DOMAIN_CHECK */
536  struct
537  {
538  /* name of constraint */
540  /* where the result of a CHECK constraint will be stored */
542  bool *checknull;
543  /* OID of domain type */
544  Oid resulttype;
546 
547  /* for EEOP_CONVERT_ROWTYPE */
548  struct
549  {
550  Oid inputtype; /* input composite type */
551  Oid outputtype; /* output composite type */
552  /* these three fields are filled at runtime: */
553  ExprEvalRowtypeCache *incache; /* cache for input type */
554  ExprEvalRowtypeCache *outcache; /* cache for output type */
555  TupleConversionMap *map; /* column mapping */
557 
558  /* for EEOP_SCALARARRAYOP */
559  struct
560  {
561  /* element_type/typlen/typbyval/typalign are filled at runtime */
562  Oid element_type; /* InvalidOid if not yet filled */
563  bool useOr; /* use OR or AND semantics? */
564  int16 typlen; /* array element type storage info */
565  bool typbyval;
566  char typalign;
567  FmgrInfo *finfo; /* function's lookup data */
568  FunctionCallInfo fcinfo_data; /* arguments etc */
569  /* faster to access without additional indirection: */
570  PGFunction fn_addr; /* actual call address */
572 
573  /* for EEOP_HASHED_SCALARARRAYOP */
574  struct
575  {
576  bool has_nulls;
577  bool inclause; /* true for IN and false for NOT IN */
579  FmgrInfo *finfo; /* function's lookup data */
580  FunctionCallInfo fcinfo_data; /* arguments etc */
581  /* faster to access without additional indirection: */
582  PGFunction fn_addr; /* actual call address */
583  FmgrInfo *hash_finfo; /* function's lookup data */
584  FunctionCallInfo hash_fcinfo_data; /* arguments etc */
585  /* faster to access without additional indirection: */
586  PGFunction hash_fn_addr; /* actual call address */
588 
589  /* for EEOP_XMLEXPR */
590  struct
591  {
592  XmlExpr *xexpr; /* original expression node */
593  /* workspace for evaluating named args, if any */
596  /* workspace for evaluating unnamed args, if any */
598  bool *argnull;
600 
601  /* for EEOP_AGGREF */
602  struct
603  {
604  int aggno;
606 
607  /* for EEOP_GROUPING_FUNC */
608  struct
609  {
610  List *clauses; /* integer list of column numbers */
612 
613  /* for EEOP_WINDOW_FUNC */
614  struct
615  {
616  /* out-of-line state, modified by nodeWindowAgg.c */
619 
620  /* for EEOP_SUBPLAN */
621  struct
622  {
623  /* out-of-line state, created by nodeSubplan.c */
626 
627  /* for EEOP_AGG_*DESERIALIZE */
628  struct
629  {
631  int jumpnull;
633 
634  /* for EEOP_AGG_STRICT_INPUT_CHECK_NULLS / STRICT_INPUT_CHECK_ARGS */
635  struct
636  {
637  /*
638  * For EEOP_AGG_STRICT_INPUT_CHECK_ARGS args contains pointers to
639  * the NullableDatums that need to be checked for NULLs.
640  *
641  * For EEOP_AGG_STRICT_INPUT_CHECK_NULLS nulls contains pointers
642  * to booleans that need to be checked for NULLs.
643  *
644  * Both cases currently need to exist because sometimes the
645  * to-be-checked nulls are in TupleTableSlot.isnull array, and
646  * sometimes in FunctionCallInfoBaseData.args[i].isnull.
647  */
649  bool *nulls;
650  int nargs;
651  int jumpnull;
653 
654  /* for EEOP_AGG_PLAIN_PERGROUP_NULLCHECK */
655  struct
656  {
657  int setoff;
658  int jumpnull;
660 
661  /* for EEOP_AGG_PLAIN_TRANS_[INIT_][STRICT_]{BYVAL,BYREF} */
662  /* for EEOP_AGG_ORDERED_TRANS_{DATUM,TUPLE} */
663  struct
664  {
667  int setno;
668  int transno;
669  int setoff;
671  } d;
673 
674 
675 /* Non-inline data for container operations */
676 typedef struct SubscriptingRefState
677 {
678  bool isassignment; /* is it assignment, or just fetch? */
679 
680  /* workspace for type-specific subscripting code */
681  void *workspace;
682 
683  /* numupper and upperprovided[] are filled at expression compile time */
684  /* at runtime, subscripts are computed in upperindex[]/upperindexnull[] */
685  int numupper;
686  bool *upperprovided; /* indicates if this position is supplied */
689 
690  /* similarly for lower indexes, if any */
691  int numlower;
695 
696  /* for assignment, new value to assign is evaluated into here */
699 
700  /* if we have a nested assignment, sbs_fetch_old puts old value here */
702  bool prevnull;
704 
705 /* Execution step methods used for SubscriptingRef */
706 typedef struct SubscriptExecSteps
707 {
708  /* See nodes/subscripting.h for more detail about these */
710  ExecEvalSubroutine sbs_fetch; /* fetch an element */
711  ExecEvalSubroutine sbs_assign; /* assign to an element */
712  ExecEvalSubroutine sbs_fetch_old; /* fetch old value for assignment */
714 
715 
716 /* functions in execExpr.c */
717 extern void ExprEvalPushStep(ExprState *es, const ExprEvalStep *s);
718 
719 /* functions in execExprInterp.c */
722 
723 extern Datum ExecInterpExprStillValid(ExprState *state, ExprContext *econtext, bool *isNull);
724 extern void CheckExprStillValid(ExprState *state, ExprContext *econtext);
725 
726 /*
727  * Non fast-path execution functions. These are externs instead of statics in
728  * execExprInterp.c, because that allows them to be used by other methods of
729  * expression evaluation, reducing code duplication.
730  */
732  ExprContext *econtext);
734  ExprContext *econtext);
736  ExprContext *econtext);
738  ExprContext *econtext);
742 extern void ExecEvalRowNull(ExprState *state, ExprEvalStep *op,
743  ExprContext *econtext);
745  ExprContext *econtext);
746 extern void ExecEvalArrayExpr(ExprState *state, ExprEvalStep *op);
748  ExprContext *econtext);
749 extern void ExecEvalRow(ExprState *state, ExprEvalStep *op);
750 extern void ExecEvalMinMax(ExprState *state, ExprEvalStep *op);
752  ExprContext *econtext);
754  ExprContext *econtext);
756  ExprContext *econtext);
758  ExprContext *econtext);
761  ExprContext *econtext);
764 extern void ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op);
766 extern void ExecEvalSubPlan(ExprState *state, ExprEvalStep *op,
767  ExprContext *econtext);
769  ExprContext *econtext);
770 extern void ExecEvalSysVar(ExprState *state, ExprEvalStep *op,
771  ExprContext *econtext, TupleTableSlot *slot);
772 
773 extern void ExecAggInitGroup(AggState *aggstate, AggStatePerTrans pertrans, AggStatePerGroup pergroup,
774  ExprContext *aggcontext);
775 extern Datum ExecAggTransReparent(AggState *aggstate, AggStatePerTrans pertrans,
776  Datum newValue, bool newValueIsNull,
777  Datum oldValue, bool oldValueIsNull);
779  ExprContext *econtext);
781  ExprContext *econtext);
782 
783 #endif /* EXEC_EXPR_H */
int16 AttrNumber
Definition: attnum.h:21
signed short int16
Definition: c.h:428
unsigned char bool
Definition: c.h:391
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 ExecEvalSQLValueFunction(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)
void ExecEvalFieldSelect(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalConstraintNotNull(ExprState *state, ExprEvalStep *op)
void ExprEvalPushStep(ExprState *es, const ExprEvalStep *s)
Definition: execExpr.c:2445
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:241
@ EEOP_CONVERT_ROWTYPE
Definition: execExpr.h:234
@ EEOP_FUNCEXPR_STRICT_FUSAGE
Definition: execExpr.h:112
@ EEOP_ARRAYEXPR
Definition: execExpr.h:176
@ EEOP_NOT_DISTINCT
Definition: execExpr.h:171
@ EEOP_DOMAIN_TESTVAL
Definition: execExpr.h:225
@ 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:238
@ EEOP_INNER_VAR
Definition: execExpr.h:75
@ EEOP_AGG_PLAIN_PERGROUP_NULLCHECK
Definition: execExpr.h:248
@ EEOP_ROWCOMPARE_FINAL
Definition: execExpr.h:187
@ EEOP_AGG_STRICT_DESERIALIZE
Definition: execExpr.h:244
@ EEOP_IOCOERCE
Definition: execExpr.h:169
@ EEOP_GROUPING_FUNC
Definition: execExpr.h:239
@ EEOP_DOMAIN_CHECK
Definition: execExpr.h:231
@ EEOP_BOOLTEST_IS_NOT_FALSE
Definition: execExpr.h:155
@ EEOP_NEXTVALUEEXPR
Definition: execExpr.h:175
@ EEOP_DONE
Definition: execExpr.h:67
@ EEOP_AGG_PLAIN_TRANS_BYREF
Definition: execExpr.h:254
@ EEOP_QUAL
Definition: execExpr.h:133
@ EEOP_AGG_PLAIN_TRANS_BYVAL
Definition: execExpr.h:251
@ 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:235
@ EEOP_DOMAIN_NOTNULL
Definition: execExpr.h:228
@ EEOP_WINDOW_FUNC
Definition: execExpr.h:240
@ 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:178
@ EEOP_MAKE_READONLY
Definition: execExpr.h:166
@ EEOP_FIELDSTORE_FORM
Definition: execExpr.h:206
@ EEOP_SBSREF_SUBSCRIPTS
Definition: execExpr.h:209
@ EEOP_SBSREF_FETCH
Definition: execExpr.h:222
@ EEOP_FUNCEXPR_STRICT
Definition: execExpr.h:110
@ EEOP_NULLIF
Definition: execExpr.h:172
@ EEOP_CURRENTOFEXPR
Definition: execExpr.h:174
@ 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:237
@ EEOP_AGG_STRICT_INPUT_CHECK_NULLS
Definition: execExpr.h:247
@ EEOP_SBSREF_ASSIGN
Definition: execExpr.h:219
@ 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:246
@ 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:184
@ EEOP_AGG_DESERIALIZE
Definition: execExpr.h:245
@ EEOP_LAST
Definition: execExpr.h:259
@ EEOP_DISTINCT
Definition: execExpr.h:170
@ EEOP_JUMP_IF_NOT_TRUE
Definition: execExpr.h:141
@ EEOP_FUNCEXPR_FUSAGE
Definition: execExpr.h:111
@ 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:255
@ EEOP_SBSREF_OLD
Definition: execExpr.h:216
@ EEOP_SQLVALUEFUNCTION
Definition: execExpr.h:173
@ EEOP_JUMP_IF_NOT_NULL
Definition: execExpr.h:140
@ EEOP_AGG_PLAIN_TRANS_STRICT_BYREF
Definition: execExpr.h:253
@ EEOP_FIELDSTORE_DEFORM
Definition: execExpr.h:199
@ 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:249
@ EEOP_PARAM_EXEC
Definition: execExpr.h:158
@ EEOP_AGG_PLAIN_TRANS_STRICT_BYVAL
Definition: execExpr.h:250
@ EEOP_NULLTEST_ISNULL
Definition: execExpr.h:144
@ EEOP_MINMAX
Definition: execExpr.h:190
@ EEOP_JUMP_IF_NULL
Definition: execExpr.h:139
@ EEOP_ARRAYCOERCE
Definition: execExpr.h:177
@ EEOP_FIELDSELECT
Definition: execExpr.h:193
@ EEOP_CASE_TESTVAL
Definition: execExpr.h:163
@ EEOP_AGG_PLAIN_TRANS_INIT_STRICT_BYREF
Definition: execExpr.h:252
@ EEOP_HASHED_SCALARARRAYOP
Definition: execExpr.h:236
@ EEOP_OUTER_VAR
Definition: execExpr.h:76
@ EEOP_AGG_ORDERED_TRANS_TUPLE
Definition: execExpr.h:256
@ 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)
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:411
unsigned int Oid
Definition: postgres_ext.h:31
MinMaxOp
Definition: primnodes.h:1140
RowCompareType
Definition: primnodes.h:1103
XmlExpr * xexpr
Definition: execExpr.h:592
Datum * value
Definition: execExpr.h:395
Var * var
Definition: execExpr.h:309
void * paramarg
Definition: execExpr.h:387
bool * anynull
Definition: execExpr.h:353
ExprState * elemexprstate
Definition: execExpr.h:446
MinMaxOp op
Definition: execExpr.h:487
bool typbyval
Definition: execExpr.h:565
char elemalign
Definition: execExpr.h:439
struct ExprEvalStep::@48::@75 sbsref_subscript
struct ExprEvalStep::@48::@85 subplan
struct ExprEvalStep::@48::@70 rowcompare_step
List * clauses
Definition: execExpr.h:610
WindowFuncExprState * wfstate
Definition: execExpr.h:617
ExecEvalBoolSubroutine subscriptfunc
Definition: execExpr.h:521
TupleDesc tupdesc
Definition: execExpr.h:312
Oid seqtypid
Definition: execExpr.h:427
ExprEvalRowtypeCache * rowcache
Definition: execExpr.h:510
struct ExprEvalStep::@48::@64 iocoerce
int last_var
Definition: execExpr.h:288
JunkFilter * junkFilter
Definition: execExpr.h:313
FmgrInfo * finfo_out
Definition: execExpr.h:410
AttrNumber fieldnum
Definition: execExpr.h:496
struct ExprEvalStep::@48::@87 agg_strict_input_check
bool has_nulls
Definition: execExpr.h:576
Datum * values
Definition: execExpr.h:483
bool * elemnulls
Definition: execExpr.h:434
bool * checknull
Definition: execExpr.h:542
int ncolumns
Definition: execExpr.h:515
bool * named_argnull
Definition: execExpr.h:595
Oid outputtype
Definition: execExpr.h:551
struct ExprEvalStep::@48::@68 arraycoerce
struct ScalarArrayOpExprHashTable * elements_tab
Definition: execExpr.h:578
bool inclause
Definition: execExpr.h:577
struct SubscriptingRefState * state
Definition: execExpr.h:523
struct ExprEvalStep::@48::@76 sbsref
RowCompareType rctype
Definition: execExpr.h:476
SubPlanState * sstate
Definition: execExpr.h:624
bool multidims
Definition: execExpr.h:440
PGFunction hash_fn_addr
Definition: execExpr.h:586
struct ExprEvalStep::@48::@86 agg_deserialize
struct ExprEvalStep::@48::@51 wholerow
struct ExprEvalStep::@48::@83 grouping_func
int16 elemlength
Definition: execExpr.h:437
AggStatePerTrans pertrans
Definition: execExpr.h:665
struct ExprEvalStep::@48::@89 agg_trans
bool * isnull
Definition: execExpr.h:396
TupleConversionMap * map
Definition: execExpr.h:555
bool * argnull
Definition: execExpr.h:598
struct ExprEvalStep::@48::@73 fieldselect
intptr_t opcode
Definition: execExpr.h:270
Oid inputtype
Definition: execExpr.h:550
char typalign
Definition: execExpr.h:566
ExecEvalSubroutine paramfunc
Definition: execExpr.h:386
FunctionCallInfo fcinfo_data_in
Definition: execExpr.h:414
struct ExprEvalStep::@48::@71 rowcompare_final
bool elembyval
Definition: execExpr.h:438
PGFunction fn_addr
Definition: execExpr.h:346
TupleDesc known_desc
Definition: execExpr.h:292
NullableDatum * args
Definition: execExpr.h:648
int resultnum
Definition: execExpr.h:320
struct ExprEvalStep::@48::@79 scalararrayop
bool * nulls
Definition: execExpr.h:484
Datum * resvalue
Definition: execExpr.h:273
Datum * elemvalues
Definition: execExpr.h:433
struct ExprEvalStep::@48::@58 jump
int jumpnull
Definition: execExpr.h:468
Oid resulttype
Definition: execExpr.h:497
ExprEvalRowtypeCache * incache
Definition: execExpr.h:553
struct ExprEvalStep::@48::@57 qualexpr
const TupleTableSlotOps * kind
Definition: execExpr.h:294
Oid resultelemtype
Definition: execExpr.h:447
struct ExprEvalStep::@48::@59 nulltest_row
FunctionCallInfo fcinfo_data
Definition: execExpr.h:344
struct ExprEvalStep::@48::@56 boolexpr
Datum * checkvalue
Definition: execExpr.h:541
FmgrInfo * finfo_in
Definition: execExpr.h:413
int jumpdone
Definition: execExpr.h:354
Datum * named_argvalue
Definition: execExpr.h:594
struct ExprEvalStep::@48::@74 fieldstore
Oid paramtype
Definition: execExpr.h:380
struct ExprEvalStep::@48::@54 constval
struct ExprEvalStep::@48::@62 casetest
struct ExprEvalStep::@48::@65 sqlvaluefunction
union ExprEvalStep::@48 d
bool fixed
Definition: execExpr.h:290
struct ExprEvalStep::@48::@52 assign_var
Datum value
Definition: execExpr.h:336
struct ExprEvalStep::@48::@60 param
struct ExprEvalStep::@48::@84 window_func
bool useOr
Definition: execExpr.h:563
struct ExprEvalStep::@48::@80 hashedscalararrayop
FunctionCallInfo hash_fcinfo_data
Definition: execExpr.h:584
FieldStore * fstore
Definition: execExpr.h:506
bool * resnull
Definition: execExpr.h:274
struct ExprEvalStep::@48::@88 agg_plain_pergroup_nullcheck
struct ExprEvalStep::@48::@50 var
FunctionCallInfo fcinfo_data_out
Definition: execExpr.h:411
ExecEvalSubroutine subscriptfunc
Definition: execExpr.h:530
ExprEvalRowtypeCache * outcache
Definition: execExpr.h:554
int16 typlen
Definition: execExpr.h:564
Datum * argvalue
Definition: execExpr.h:597
struct ExprEvalStep::@48::@67 arrayexpr
FmgrInfo * hash_finfo
Definition: execExpr.h:583
struct ExprEvalStep::@48::@66 nextvalueexpr
struct ExprEvalStep::@48::@72 minmax
struct ExprEvalStep::@48::@53 assign_tmp
struct ExprEvalStep::@48::@55 func
ExprEvalRowtypeCache rowcache
Definition: execExpr.h:373
struct ExprEvalStep::@48::@61 cparam
struct ExprEvalStep::@48::@63 make_readonly
struct ExprEvalStep::@48::@78 convert_rowtype
FmgrInfo * finfo
Definition: execExpr.h:343
bool isnull
Definition: execExpr.h:337
ExprContext * aggcontext
Definition: execExpr.h:666
Oid elemtype
Definition: execExpr.h:436
struct ExprEvalStep::@48::@49 fetch
char * constraintname
Definition: execExpr.h:539
struct ExprEvalStep::@48::@77 domaincheck
Oid element_type
Definition: execExpr.h:562
struct ExprEvalStep::@48::@69 row
struct ExprEvalStep::@48::@82 aggref
bool first
Definition: execExpr.h:310
struct ExprEvalStep::@48::@81 xmlexpr
struct ArrayMapState * amstate
Definition: execExpr.h:448
SQLValueFunction * svf
Definition: execExpr.h:420
Definition: fmgr.h:57
Definition: pg_list.h:51
ExecEvalSubroutine sbs_fetch_old
Definition: execExpr.h:712
ExecEvalBoolSubroutine sbs_check_subscripts
Definition: execExpr.h:709
ExecEvalSubroutine sbs_assign
Definition: execExpr.h:711
ExecEvalSubroutine sbs_fetch
Definition: execExpr.h:710
Definition: primnodes.h:187
Definition: regguts.h:318