aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/primnodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/nodes/primnodes.h')
-rw-r--r--src/include/nodes/primnodes.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h
index ab6d7fdc6df..bb930afb521 100644
--- a/src/include/nodes/primnodes.h
+++ b/src/include/nodes/primnodes.h
@@ -22,6 +22,14 @@
#include "nodes/pg_list.h"
+typedef enum OverridingKind
+{
+ OVERRIDING_NOT_SET = 0,
+ OVERRIDING_USER_VALUE,
+ OVERRIDING_SYSTEM_VALUE,
+} OverridingKind;
+
+
/* ----------------------------------------------------------------
* node definitions
* ----------------------------------------------------------------
@@ -1718,6 +1726,25 @@ typedef struct BooleanTest
int location; /* token location, or -1 if unknown */
} BooleanTest;
+
+/*
+ * MergeAction
+ *
+ * Transformed representation of a WHEN clause in a MERGE statement
+ */
+typedef struct MergeAction
+{
+ NodeTag type;
+ bool matched; /* true=MATCHED, false=NOT MATCHED */
+ CmdType commandType; /* INSERT/UPDATE/DELETE/DO NOTHING */
+ /* OVERRIDING clause */
+ OverridingKind override pg_node_attr(query_jumble_ignore);
+ Node *qual; /* transformed WHEN conditions */
+ List *targetList; /* the target list (of TargetEntry) */
+ /* target attribute numbers of an UPDATE */
+ List *updateColnos pg_node_attr(query_jumble_ignore);
+} MergeAction;
+
/*
* CoerceToDomain
*