This is an automated email from the ASF dual-hosted git repository.
mtaha pushed a commit to branch PG13
in repository https://gitbox.apache.org/repos/asf/age.git
The following commit(s) were added to refs/heads/PG13 by this push:
new b38df54b Clean up #included files in parser directory (#1465) (#1470)
b38df54b is described below
commit b38df54b37a79b4c1d3c09cbeef2d2e12e3cd391
Author: John Gemignani <[email protected]>
AuthorDate: Sun Dec 31 00:54:39 2023 -0800
Clean up #included files in parser directory (#1465) (#1470)
Cleaned up #included files in the .c files in the parser directory.
Additionally, fixed one that was at the backend root.
modified: src/backend/age.c
modified: src/backend/parser/cypher_analyze.c
modified: src/backend/parser/cypher_clause.c
modified: src/backend/parser/cypher_expr.c
modified: src/backend/parser/cypher_gram.y
modified: src/backend/parser/cypher_item.c
modified: src/backend/parser/cypher_keywords.c
modified: src/backend/parser/cypher_parse_node.c
modified: src/backend/parser/cypher_parser.c
Added in #include "parser/parse_relation.h" into cypher_clause due
to differences between PostgreSQL 16 and 15.
Resolved -
Conflicts:
src/backend/parser/cypher_expr.c
---
src/backend/age.c | 4 ----
src/backend/parser/cypher_analyze.c | 10 ----------
src/backend/parser/cypher_clause.c | 16 ----------------
src/backend/parser/cypher_expr.c | 13 -------------
src/backend/parser/cypher_gram.y | 8 --------
src/backend/parser/cypher_item.c | 7 -------
src/backend/parser/cypher_keywords.c | 5 -----
src/backend/parser/cypher_parse_node.c | 2 --
src/backend/parser/cypher_parser.c | 2 --
9 files changed, 67 deletions(-)
diff --git a/src/backend/age.c b/src/backend/age.c
index a512f188..2c016b02 100644
--- a/src/backend/age.c
+++ b/src/backend/age.c
@@ -17,10 +17,6 @@
* under the License.
*/
-#include "postgres.h"
-
-#include "fmgr.h"
-
#include "catalog/ag_catalog.h"
#include "nodes/ag_nodes.h"
#include "optimizer/cypher_paths.h"
diff --git a/src/backend/parser/cypher_analyze.c
b/src/backend/parser/cypher_analyze.c
index 54e9859d..5f7faba3 100644
--- a/src/backend/parser/cypher_analyze.c
+++ b/src/backend/parser/cypher_analyze.c
@@ -19,31 +19,21 @@
#include "postgres.h"
-#include "catalog/pg_type_d.h"
#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
-#include "nodes/nodes.h"
-#include "nodes/parsenodes.h"
-#include "nodes/pg_list.h"
-#include "nodes/primnodes.h"
#include "parser/analyze.h"
#include "parser/parse_coerce.h"
#include "parser/parse_collate.h"
-#include "parser/parse_node.h"
#include "parser/parse_relation.h"
#include "parser/parse_target.h"
#include "utils/builtins.h"
#include "catalog/ag_graph.h"
-#include "nodes/ag_nodes.h"
#include "parser/cypher_analyze.h"
#include "parser/cypher_clause.h"
-#include "parser/cypher_item.h"
-#include "parser/cypher_parse_node.h"
#include "parser/cypher_parser.h"
#include "utils/ag_func.h"
#include "utils/age_session_info.h"
-#include "utils/agtype.h"
/*
* extra_node is a global variable to this source to store, at the moment, the
diff --git a/src/backend/parser/cypher_clause.c
b/src/backend/parser/cypher_clause.c
index e261a635..00dbc2d4 100644
--- a/src/backend/parser/cypher_clause.c
+++ b/src/backend/parser/cypher_clause.c
@@ -24,47 +24,31 @@
#include "postgres.h"
-#include "access/sysattr.h"
#include "access/heapam.h"
-#include "catalog/pg_type_d.h"
#include "miscadmin.h"
-#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
-#include "nodes/nodes.h"
-#include "nodes/parsenodes.h"
-#include "nodes/pg_list.h"
-#include "nodes/primnodes.h"
#include "optimizer/optimizer.h"
#include "parser/parse_clause.h"
#include "parser/parse_coerce.h"
#include "parser/parse_collate.h"
#include "parser/parse_expr.h"
#include "parser/parse_func.h"
-#include "parser/parse_node.h"
#include "parser/parse_oper.h"
#include "parser/parse_relation.h"
#include "parser/parse_target.h"
#include "parser/parsetree.h"
#include "rewrite/rewriteHandler.h"
-#include "utils/typcache.h"
-#include "utils/lsyscache.h"
-#include "utils/rel.h"
#include "catalog/ag_graph.h"
#include "catalog/ag_label.h"
#include "commands/label_commands.h"
-#include "nodes/ag_nodes.h"
-#include "nodes/cypher_nodes.h"
#include "parser/cypher_clause.h"
#include "parser/cypher_expr.h"
#include "parser/cypher_item.h"
#include "parser/cypher_parse_agg.h"
-#include "parser/cypher_parse_node.h"
#include "parser/cypher_transform_entity.h"
#include "utils/ag_cache.h"
#include "utils/ag_func.h"
-#include "utils/agtype.h"
-#include "utils/graphid.h"
#include "utils/ag_guc.h"
/*
diff --git a/src/backend/parser/cypher_expr.c b/src/backend/parser/cypher_expr.c
index e12c0fe6..6a200ea1 100644
--- a/src/backend/parser/cypher_expr.c
+++ b/src/backend/parser/cypher_expr.c
@@ -24,33 +24,20 @@
#include "postgres.h"
-#include "catalog/pg_type.h"
#include "miscadmin.h"
-#include "nodes/makefuncs.h"
#include "nodes/nodeFuncs.h"
-#include "nodes/nodes.h"
-#include "nodes/parsenodes.h"
-#include "nodes/value.h"
-#include "optimizer/tlist.h"
#include "parser/parse_coerce.h"
#include "parser/parse_collate.h"
-#include "parser/parse_expr.h"
#include "parser/parse_func.h"
#include "parser/cypher_clause.h"
-#include "parser/parse_node.h"
#include "parser/parse_oper.h"
#include "parser/parse_relation.h"
#include "utils/builtins.h"
#include "utils/float.h"
#include "utils/int8.h"
#include "utils/lsyscache.h"
-#include "utils/syscache.h"
-#include "commands/label_commands.h"
-#include "nodes/cypher_nodes.h"
#include "parser/cypher_expr.h"
-#include "parser/cypher_item.h"
-#include "parser/cypher_parse_node.h"
#include "parser/cypher_transform_entity.h"
#include "utils/ag_func.h"
#include "utils/agtype.h"
diff --git a/src/backend/parser/cypher_gram.y b/src/backend/parser/cypher_gram.y
index 6f0c0059..79cf628d 100644
--- a/src/backend/parser/cypher_gram.y
+++ b/src/backend/parser/cypher_gram.y
@@ -21,16 +21,8 @@
#include "postgres.h"
#include "nodes/makefuncs.h"
-#include "nodes/nodes.h"
-#include "nodes/parsenodes.h"
-#include "nodes/pg_list.h"
-#include "nodes/primnodes.h"
-#include "nodes/value.h"
#include "parser/parser.h"
-#include "nodes/ag_nodes.h"
-#include "nodes/cypher_nodes.h"
-#include "parser/ag_scanner.h"
#include "parser/cypher_gram.h"
#include "parser/cypher_parse_node.h"
#include "parser/scansup.h"
diff --git a/src/backend/parser/cypher_item.c b/src/backend/parser/cypher_item.c
index 6bcb4783..36dfb377 100644
--- a/src/backend/parser/cypher_item.c
+++ b/src/backend/parser/cypher_item.c
@@ -24,19 +24,12 @@
#include "postgres.h"
-#include "access/attnum.h"
#include "nodes/makefuncs.h"
-#include "nodes/nodes.h"
-#include "nodes/parsenodes.h"
-#include "nodes/pg_list.h"
-#include "nodes/primnodes.h"
-#include "parser/parse_node.h"
#include "parser/parse_relation.h"
#include "parser/parse_target.h"
#include "parser/cypher_expr.h"
#include "parser/cypher_item.h"
-#include "parser/cypher_parse_node.h"
static List *ExpandAllTables(ParseState *pstate, int location);
static List *expand_rel_attrs(ParseState *pstate, RangeTblEntry *rte,
diff --git a/src/backend/parser/cypher_keywords.c
b/src/backend/parser/cypher_keywords.c
index cd408226..dcc807e6 100644
--- a/src/backend/parser/cypher_keywords.c
+++ b/src/backend/parser/cypher_keywords.c
@@ -24,12 +24,7 @@
#include "postgres.h"
-#include "access/attnum.h"
-#include "access/htup.h"
-#include "access/tupdesc.h"
-#include "catalog/pg_type.h"
#include "common/keywords.h"
-#include "fmgr.h"
#include "funcapi.h"
#include "parser/cypher_gram.h"
diff --git a/src/backend/parser/cypher_parse_node.c
b/src/backend/parser/cypher_parse_node.c
index 6cc274d1..09e6ad4d 100644
--- a/src/backend/parser/cypher_parse_node.c
+++ b/src/backend/parser/cypher_parse_node.c
@@ -25,8 +25,6 @@
#include "postgres.h"
#include "mb/pg_wchar.h"
-#include "nodes/primnodes.h"
-#include "parser/parse_node.h"
#include "parser/cypher_parse_node.h"
diff --git a/src/backend/parser/cypher_parser.c
b/src/backend/parser/cypher_parser.c
index 14122950..4ec56fb9 100644
--- a/src/backend/parser/cypher_parser.c
+++ b/src/backend/parser/cypher_parser.c
@@ -19,10 +19,8 @@
#include "postgres.h"
-#include "nodes/pg_list.h"
#include "parser/scansup.h"
-#include "parser/ag_scanner.h"
#include "parser/cypher_gram.h"
#include "parser/cypher_keywords.h"
#include "parser/cypher_parser.h"