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 */
260 } ExprEvalOp;
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 */
314  } wholerow;
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;
323  } assign_var;
324 
325  /* for EEOP_ASSIGN_TMP[_MAKE_RO] */
326  struct
327  {
328  /* target index in ExprState->resultslot->tts_values/nulls */
329  int resultnum;
330  } assign_tmp;
331 
332  /* for EEOP_CONST */
333  struct
334  {
335  /* constant's value */
337  bool isnull;
338  } constval;
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 */
355  } boolexpr;
356 
357  /* for EEOP_QUAL */
358  struct
359  {
360  int jumpdone; /* jump here on false or null */
361  } qualexpr;
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 */
374  } nulltest_row;
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 */
390  } cparam;
391 
392  /* for EEOP_CASE_TESTVAL/DOMAIN_TESTVAL */
393  struct
394  {
395  Datum *value; /* value to return */
396  bool *isnull;
397  } casetest;
398 
399  /* for EEOP_MAKE_READONLY */
400  struct
401  {
402  Datum *value; /* value to coerce to read-only */
403  bool *isnull;
404  } make_readonly;
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 */
415  } iocoerce;
416 
417  /* for EEOP_SQLVALUEFUNCTION */
418  struct
419  {
421  } sqlvaluefunction;
422 
423  /* for EEOP_NEXTVALUEEXPR */
424  struct
425  {
428  } nextvalueexpr;
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? */
441  } arrayexpr;
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 */
449  } arraycoerce;
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;
465  FunctionCallInfo fcinfo_data;
467  /* target for comparison resulting in NULL */
468  int jumpnull;
469  /* target for comparison yielding inequality */
470  int jumpdone;
471  } rowcompare_step;
472 
473  /* for EEOP_ROWCOMPARE_FINAL */
474  struct
475  {
477  } rowcompare_final;
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;
490  FunctionCallInfo fcinfo_data;
491  } minmax;
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 */
499  ExprEvalRowtypeCache rowcache;
500  } fieldselect;
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;
516  } fieldstore;
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 */
525  } sbsref_subscript;
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;
533  } sbsref;
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;
545  } domaincheck;
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 */
556  } convert_rowtype;
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 */
571  } scalararrayop;
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 */
587  } hashedscalararrayop;
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;
599  } xmlexpr;
600 
601  /* for EEOP_AGGREF */
602  struct
603  {
604  int aggno;
605  } aggref;
606 
607  /* for EEOP_GROUPING_FUNC */
608  struct
609  {
610  List *clauses; /* integer list of column numbers */
611  } grouping_func;
612 
613  /* for EEOP_WINDOW_FUNC */
614  struct
615  {
616  /* out-of-line state, modified by nodeWindowAgg.c */
618  } window_func;
619 
620  /* for EEOP_SUBPLAN */
621  struct
622  {
623  /* out-of-line state, created by nodeSubplan.c */
625  } subplan;
626 
627  /* for EEOP_AGG_*DESERIALIZE */
628  struct
629  {
630  FunctionCallInfo fcinfo_data;
631  int jumpnull;
632  } agg_deserialize;
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;
652  } agg_strict_input_check;
653 
654  /* for EEOP_AGG_PLAIN_PERGROUP_NULLCHECK */
655  struct
656  {
657  int setoff;
658  int jumpnull;
659  } agg_plain_pergroup_nullcheck;
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;
670  } agg_trans;
671  } d;
672 } ExprEvalStep;
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 */
SubPlanState * sstate
Definition: execExpr.h:624
NullableDatum * args
Definition: execExpr.h:648
AggStatePerTrans pertrans
Definition: execExpr.h:665
signed short int16
Definition: c.h:428
TupleDesc known_desc
Definition: execExpr.h:292
Datum ExecInterpExprStillValid(ExprState *state, ExprContext *econtext, bool *isNull)
bool * anynull
Definition: execExpr.h:353
Datum(* PGFunction)(FunctionCallInfo fcinfo)
Definition: fmgr.h:40
TupleConversionMap * map
Definition: execExpr.h:555
Definition: fmgr.h:56
void ExecEvalSubPlan(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalParamExec(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
ExprEvalOp ExecEvalStepOp(ExprState *state, ExprEvalStep *op)
void ExprEvalPushStep(ExprState *es, const ExprEvalStep *s)
Definition: execExpr.c:2445
bool multidims
Definition: execExpr.h:440
void ExecEvalFieldStoreForm(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
bool * checknull
Definition: execExpr.h:542
FunctionCallInfo fcinfo_data
Definition: execExpr.h:344
RowCompareType rctype
Definition: execExpr.h:476
Datum * elemvalues
Definition: execExpr.h:433
void ExecEvalCurrentOfExpr(ExprState *state, ExprEvalStep *op)
char elemalign
Definition: execExpr.h:439
JunkFilter * junkFilter
Definition: execExpr.h:313
Datum * resvalue
Definition: execExpr.h:273
void ExecEvalSysVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext, TupleTableSlot *slot)
PGFunction fn_addr
Definition: execExpr.h:346
FunctionCallInfo hash_fcinfo_data
Definition: execExpr.h:584
bool has_nulls
Definition: execExpr.h:576
void ExecEvalArrayCoerce(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
ExprEvalRowtypeCache * outcache
Definition: execExpr.h:554
bool elembyval
Definition: execExpr.h:438
ExprEvalRowtypeCache rowcache
Definition: execExpr.h:373
ExecEvalSubroutine sbs_fetch
Definition: execExpr.h:710
int jumpdone
Definition: execExpr.h:354
Oid elemtype
Definition: execExpr.h:436
const TupleTableSlotOps * kind
Definition: execExpr.h:294
Datum * value
Definition: execExpr.h:395
bool * resnull
Definition: execExpr.h:274
FmgrInfo * finfo_in
Definition: execExpr.h:413
ExprEvalOp
Definition: execExpr.h:64
void ExecEvalXmlExpr(ExprState *state, ExprEvalStep *op)
bool * isnull
Definition: execExpr.h:396
bool * nulls
Definition: execExpr.h:484
FunctionCallInfo fcinfo_data_out
Definition: execExpr.h:411
void ExecEvalAggOrderedTransDatum(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
bool useOr
Definition: execExpr.h:563
ExecEvalSubroutine sbs_fetch_old
Definition: execExpr.h:712
struct SubscriptExecSteps SubscriptExecSteps
XmlExpr * xexpr
Definition: execExpr.h:592
FmgrInfo * hash_finfo
Definition: execExpr.h:583
Datum * named_argvalue
Definition: execExpr.h:594
MinMaxOp op
Definition: execExpr.h:487
void ExecEvalFuncExprFusage(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void(* ExecEvalSubroutine)(ExprState *state, struct ExprEvalStep *op, ExprContext *econtext)
Definition: execExpr.h:32
struct SubscriptingRefState * state
Definition: execExpr.h:523
ExecEvalSubroutine sbs_assign
Definition: execExpr.h:711
parallel_worker_main_type fn_addr
Definition: parallel.c:136
ExprContext * aggcontext
Definition: execExpr.h:666
unsigned int Oid
Definition: postgres_ext.h:31
Definition: primnodes.h:186
Var * var
Definition: execExpr.h:309
void ExecEvalArrayExpr(ExprState *state, ExprEvalStep *op)
FieldStore * fstore
Definition: execExpr.h:506
ExprEvalRowtypeCache * incache
Definition: execExpr.h:553
void * paramarg
Definition: execExpr.h:387
void ExecEvalGroupingFunc(ExprState *state, ExprEvalStep *op)
Datum ExecAggTransReparent(AggState *aggstate, AggStatePerTrans pertrans, Datum newValue, bool newValueIsNull, Datum oldValue, bool oldValueIsNull)
Oid element_type
Definition: execExpr.h:562
ExecEvalSubroutine paramfunc
Definition: execExpr.h:386
int jumpnull
Definition: execExpr.h:468
Oid inputtype
Definition: execExpr.h:550
ExecEvalSubroutine subscriptfunc
Definition: execExpr.h:530
void ExecEvalScalarArrayOp(ExprState *state, ExprEvalStep *op)
MinMaxOp
Definition: primnodes.h:1139
void ExecEvalRow(ExprState *state, ExprEvalStep *op)
bool inclause
Definition: execExpr.h:577
TupleDesc tupdesc
Definition: execExpr.h:312
void ExecEvalMinMax(ExprState *state, ExprEvalStep *op)
Datum * values
Definition: execExpr.h:483
void ExecEvalNextValueExpr(ExprState *state, ExprEvalStep *op)
int resultnum
Definition: execExpr.h:320
bool * elemnulls
Definition: execExpr.h:434
void ExecAggInitGroup(AggState *aggstate, AggStatePerTrans pertrans, AggStatePerGroup pergroup, ExprContext *aggcontext)
WindowFuncExprState * wfstate
Definition: execExpr.h:617
bool * named_argnull
Definition: execExpr.h:595
struct ExprEvalStep ExprEvalStep
void CheckExprStillValid(ExprState *state, ExprContext *econtext)
bool(* ExecEvalBoolSubroutine)(ExprState *state, struct ExprEvalStep *op, ExprContext *econtext)
Definition: execExpr.h:37
void ExecEvalFuncExprStrictFusage(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
bool first
Definition: execExpr.h:310
void ExecEvalFieldSelect(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
int16 elemlength
Definition: execExpr.h:437
ExprState * elemexprstate
Definition: execExpr.h:446
ExecEvalBoolSubroutine subscriptfunc
Definition: execExpr.h:521
uintptr_t Datum
Definition: postgres.h:411
Oid resulttype
Definition: execExpr.h:497
int16 attnum
Definition: pg_attribute.h:83
static struct @143 value
RowCompareType
Definition: primnodes.h:1102
PGFunction hash_fn_addr
Definition: execExpr.h:586
void ExecEvalParamExtern(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void ExecEvalRowNotNull(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
FmgrInfo * finfo
Definition: execExpr.h:343
Definition: regguts.h:317
intptr_t opcode
Definition: execExpr.h:270
void ExecEvalConstraintNotNull(ExprState *state, ExprEvalStep *op)
char * constraintname
Definition: execExpr.h:539
void ExecEvalConstraintCheck(ExprState *state, ExprEvalStep *op)
void ExecEvalAggOrderedTransTuple(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
struct SubscriptingRefState SubscriptingRefState
Datum * argvalue
Definition: execExpr.h:597
Datum * checkvalue
Definition: execExpr.h:541
Oid outputtype
Definition: execExpr.h:551
static Datum values[MAXATTR]
Definition: bootstrap.c:156
char typalign
Definition: execExpr.h:566
void ExecEvalWholeRowVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
Oid paramtype
Definition: execExpr.h:380
int last_var
Definition: execExpr.h:288
bool * argnull
Definition: execExpr.h:598
Oid resultelemtype
Definition: execExpr.h:447
void ExecEvalConvertRowtype(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
bool fixed
Definition: execExpr.h:290
bool isnull
Definition: execExpr.h:337
struct ExprEvalRowtypeCache ExprEvalRowtypeCache
void ExecEvalSQLValueFunction(ExprState *state, ExprEvalStep *op)
int16 typlen
Definition: execExpr.h:564
SQLValueFunction * svf
Definition: execExpr.h:420
Datum value
Definition: execExpr.h:336
struct ScalarArrayOpExprHashTable * elements_tab
Definition: execExpr.h:578
FmgrInfo * finfo_out
Definition: execExpr.h:410
void ExecEvalRowNull(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
ExecEvalBoolSubroutine sbs_check_subscripts
Definition: execExpr.h:709
void ExecEvalHashedScalarArrayOp(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
Definition: pg_list.h:50
int16 AttrNumber
Definition: attnum.h:21
AttrNumber fieldnum
Definition: execExpr.h:496
List * clauses
Definition: execExpr.h:610
FunctionCallInfo fcinfo_data_in
Definition: execExpr.h:414
Oid seqtypid
Definition: execExpr.h:427
bool typbyval
Definition: execExpr.h:565
struct ArrayMapState * amstate
Definition: execExpr.h:448
int ncolumns
Definition: execExpr.h:515
ExprEvalRowtypeCache * rowcache
Definition: execExpr.h:510
void ExecReadyInterpretedExpr(ExprState *state)
unsigned char bool
Definition: c.h:391
void ExecEvalFieldStoreDeForm(ExprState *state, ExprEvalStep *op, ExprContext *econtext)