I added it by mistake in commit
7103ebb7aae8. To clean up, struct
MergeAction needs to be moved to primnodes.h from parsenodes.h. (This
forces us to also move OverridingKind to primnodes.h).
Having to add parsenodes.h to bootstrap.h as fallout is a bit
surprising, since nothing nominally needs it there. However, per
comments in bootscanner.l, it is needed so that YYSTYPE can be declared.
I think this only started with commit
dac048f71ebb, but I didn't
actually verify that.
In passing, stop including parsenodes.h in tcopprot.h. Nothing needs it
there.
Per discussion on a patch by Ashutosh Bapat.
Reviewed-by: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/
202311071106[email protected]
*/
#include "postgres.h"
+#include "nodes/parsenodes.h"
#include "nodes/supportnodes.h"
#include "utils/builtins.h"
#include "windowapi.h"
#define BOOTSTRAP_H
#include "nodes/execnodes.h"
+#include "nodes/parsenodes.h"
/*
#include "partitioning/partdefs.h"
-typedef enum OverridingKind
-{
- OVERRIDING_NOT_SET = 0,
- OVERRIDING_USER_VALUE,
- OVERRIDING_SYSTEM_VALUE,
-} OverridingKind;
-
/* Possible sources of a Query */
typedef enum QuerySource
{
List *values; /* VALUES to INSERT, or NULL */
} MergeWhenClause;
-/*
- * 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;
-
/*
* TriggerTransition -
* representation of transition row or table naming clause
#include "lib/stringinfo.h"
#include "nodes/bitmapset.h"
#include "nodes/lockoptions.h"
-#include "nodes/parsenodes.h"
#include "nodes/primnodes.h"
#include "nodes/pg_list.h"
+typedef enum OverridingKind
+{
+ OVERRIDING_NOT_SET = 0,
+ OVERRIDING_USER_VALUE,
+ OVERRIDING_SYSTEM_VALUE,
+} OverridingKind;
+
+
/* ----------------------------------------------------------------
* node definitions
* ----------------------------------------------------------------
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
*
#define TCOPPROT_H
#include "nodes/params.h"
-#include "nodes/parsenodes.h"
#include "nodes/plannodes.h"
#include "storage/procsignal.h"
#include "utils/guc.h"