aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/execnodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r--src/include/nodes/execnodes.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index b3f7aa299f5..d0f2dca5928 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -74,11 +74,20 @@ typedef Datum (*ExprStateEvalFunc) (struct ExprState *expression,
/* Bits in ExprState->flags (see also execExpr.h for private flag bits): */
/* expression is for use with ExecQual() */
#define EEO_FLAG_IS_QUAL (1 << 0)
+/* expression refers to OLD table columns */
+#define EEO_FLAG_HAS_OLD (1 << 1)
+/* expression refers to NEW table columns */
+#define EEO_FLAG_HAS_NEW (1 << 2)
+/* OLD table row is NULL in RETURNING list */
+#define EEO_FLAG_OLD_IS_NULL (1 << 3)
+/* NEW table row is NULL in RETURNING list */
+#define EEO_FLAG_NEW_IS_NULL (1 << 4)
typedef struct ExprState
{
NodeTag type;
+#define FIELDNO_EXPRSTATE_FLAGS 1
uint8 flags; /* bitmask of EEO_FLAG_* bits, see above */
/*
@@ -290,6 +299,12 @@ typedef struct ExprContext
#define FIELDNO_EXPRCONTEXT_DOMAINNULL 13
bool domainValue_isNull;
+ /* Tuples that OLD/NEW Var nodes in RETURNING may refer to */
+#define FIELDNO_EXPRCONTEXT_OLDTUPLE 14
+ TupleTableSlot *ecxt_oldtuple;
+#define FIELDNO_EXPRCONTEXT_NEWTUPLE 15
+ TupleTableSlot *ecxt_newtuple;
+
/* Link to containing EState (NULL if a standalone ExprContext) */
struct EState *ecxt_estate;
@@ -504,6 +519,7 @@ typedef struct ResultRelInfo
TupleTableSlot *ri_ReturningSlot; /* for trigger output tuples */
TupleTableSlot *ri_TrigOldSlot; /* for a trigger's old tuple */
TupleTableSlot *ri_TrigNewSlot; /* for a trigger's new tuple */
+ TupleTableSlot *ri_AllNullSlot; /* for RETURNING OLD/NEW */
/* FDW callback functions, if foreign table */
struct FdwRoutine *ri_FdwRoutine;