From 7c2a5c7449ac76c82c3ea00e5948463ed041fb65 Mon Sep 17 00:00:00 2001 From: John Gemignani Date: Thu, 28 Dec 2023 21:40:41 -0800 Subject: [PATCH] Clean up #included files in parser directory (#1465) 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 a512f1888..2c016b021 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 54e9859d9..5f7faba32 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 e261a6351..00dbc2d44 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 e12c0fe6b..6a200ea1e 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 6f0c00594..79cf628dc 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 6bcb47832..36dfb377b 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 cd4082260..dcc807e68 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 6cc274d17..09e6ad4dc 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 14122950b..4ec56fb9a 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"