Skip to content

Commit eb6883d

Browse files
committed
Clean up #included files in parser directory (apache#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_analyze.c src/backend/parser/cypher_expr.c
1 parent 29bf692 commit eb6883d

9 files changed

Lines changed: 1 addition & 65 deletions

File tree

src/backend/age.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
* under the License.
1818
*/
1919

20-
#include "postgres.h"
21-
22-
#include "fmgr.h"
23-
2420
#include "catalog/ag_catalog.h"
2521
#include "nodes/ag_nodes.h"
2622
#include "optimizer/cypher_paths.h"

src/backend/parser/cypher_analyze.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,21 @@
1919

2020
#include "postgres.h"
2121

22-
#include "catalog/pg_type_d.h"
2322
#include "nodes/makefuncs.h"
2423
#include "nodes/nodeFuncs.h"
25-
#include "nodes/nodes.h"
26-
#include "nodes/parsenodes.h"
27-
#include "nodes/pg_list.h"
28-
#include "nodes/primnodes.h"
2924
#include "parser/analyze.h"
3025
#include "parser/parse_coerce.h"
3126
#include "parser/parse_collate.h"
32-
#include "parser/parse_node.h"
3327
#include "parser/parse_relation.h"
3428
#include "parser/parse_target.h"
3529
#include "utils/builtins.h"
3630

3731
#include "catalog/ag_graph.h"
38-
#include "nodes/ag_nodes.h"
3932
#include "parser/cypher_analyze.h"
4033
#include "parser/cypher_clause.h"
41-
#include "parser/cypher_parse_node.h"
4234
#include "parser/cypher_parser.h"
4335
#include "utils/ag_func.h"
4436
#include "utils/age_session_info.h"
45-
#include "utils/agtype.h"
4637

4738
/*
4839
* extra_node is a global variable to this source to store, at the moment, the

src/backend/parser/cypher_clause.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,47 +24,31 @@
2424

2525
#include "postgres.h"
2626

27-
#include "access/sysattr.h"
2827
#include "access/heapam.h"
29-
#include "catalog/pg_type_d.h"
3028
#include "miscadmin.h"
31-
#include "nodes/makefuncs.h"
3229
#include "nodes/nodeFuncs.h"
33-
#include "nodes/nodes.h"
34-
#include "nodes/parsenodes.h"
35-
#include "nodes/pg_list.h"
36-
#include "nodes/primnodes.h"
3730
#include "optimizer/optimizer.h"
3831
#include "parser/parse_clause.h"
3932
#include "parser/parse_coerce.h"
4033
#include "parser/parse_collate.h"
4134
#include "parser/parse_expr.h"
4235
#include "parser/parse_func.h"
43-
#include "parser/parse_node.h"
4436
#include "parser/parse_oper.h"
4537
#include "parser/parse_relation.h"
4638
#include "parser/parse_target.h"
4739
#include "parser/parsetree.h"
4840
#include "rewrite/rewriteHandler.h"
49-
#include "utils/typcache.h"
50-
#include "utils/lsyscache.h"
51-
#include "utils/rel.h"
5241

5342
#include "catalog/ag_graph.h"
5443
#include "catalog/ag_label.h"
5544
#include "commands/label_commands.h"
56-
#include "nodes/ag_nodes.h"
57-
#include "nodes/cypher_nodes.h"
5845
#include "parser/cypher_clause.h"
5946
#include "parser/cypher_expr.h"
6047
#include "parser/cypher_item.h"
6148
#include "parser/cypher_parse_agg.h"
62-
#include "parser/cypher_parse_node.h"
6349
#include "parser/cypher_transform_entity.h"
6450
#include "utils/ag_cache.h"
6551
#include "utils/ag_func.h"
66-
#include "utils/agtype.h"
67-
#include "utils/graphid.h"
6852
#include "utils/ag_guc.h"
6953

7054
/*

src/backend/parser/cypher_expr.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,20 @@
2424

2525
#include "postgres.h"
2626

27-
#include "catalog/pg_type.h"
2827
#include "miscadmin.h"
29-
#include "nodes/makefuncs.h"
3028
#include "nodes/nodeFuncs.h"
31-
#include "nodes/nodes.h"
32-
#include "nodes/parsenodes.h"
33-
#include "nodes/value.h"
34-
#include "optimizer/tlist.h"
3529
#include "parser/parse_coerce.h"
3630
#include "parser/parse_collate.h"
37-
#include "parser/parse_expr.h"
3831
#include "parser/parse_func.h"
3932
#include "parser/cypher_clause.h"
40-
#include "parser/parse_node.h"
4133
#include "parser/parse_oper.h"
4234
#include "parser/parse_relation.h"
4335
#include "utils/builtins.h"
4436
#include "utils/float.h"
4537
#include "utils/int8.h"
4638
#include "utils/lsyscache.h"
47-
#include "utils/syscache.h"
4839

49-
#include "commands/label_commands.h"
50-
#include "nodes/cypher_nodes.h"
5140
#include "parser/cypher_expr.h"
52-
#include "parser/cypher_parse_node.h"
5341
#include "parser/cypher_transform_entity.h"
5442
#include "utils/ag_func.h"
5543
#include "utils/agtype.h"

src/backend/parser/cypher_gram.y

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,8 @@
2121
#include "postgres.h"
2222

2323
#include "nodes/makefuncs.h"
24-
#include "nodes/nodes.h"
25-
#include "nodes/parsenodes.h"
26-
#include "nodes/pg_list.h"
27-
#include "nodes/primnodes.h"
28-
#include "nodes/value.h"
2924
#include "parser/parser.h"
3025

31-
#include "nodes/ag_nodes.h"
32-
#include "nodes/cypher_nodes.h"
33-
#include "parser/ag_scanner.h"
3426
#include "parser/cypher_gram.h"
3527
#include "parser/cypher_parse_node.h"
3628
#include "parser/scansup.h"

src/backend/parser/cypher_item.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,12 @@
2424

2525
#include "postgres.h"
2626

27-
#include "access/attnum.h"
2827
#include "nodes/makefuncs.h"
29-
#include "nodes/nodes.h"
30-
#include "nodes/parsenodes.h"
31-
#include "nodes/pg_list.h"
32-
#include "nodes/primnodes.h"
33-
#include "parser/parse_node.h"
3428
#include "parser/parse_relation.h"
3529
#include "parser/parse_target.h"
3630

3731
#include "parser/cypher_expr.h"
3832
#include "parser/cypher_item.h"
39-
#include "parser/cypher_parse_node.h"
4033

4134
static List *ExpandAllTables(ParseState *pstate, int location);
4235
static List *expand_rel_attrs(ParseState *pstate, RangeTblEntry *rte,

src/backend/parser/cypher_keywords.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,8 @@
2424

2525
#include "postgres.h"
2626

27-
#include "access/attnum.h"
28-
#include "access/htup.h"
29-
#include "access/tupdesc.h"
30-
#include "catalog/pg_type.h"
27+
#include "catalog/pg_type_d.h"
3128
#include "common/keywords.h"
32-
#include "fmgr.h"
3329
#include "funcapi.h"
3430

3531
#include "parser/cypher_gram.h"

src/backend/parser/cypher_parse_node.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
#include "postgres.h"
2626

2727
#include "mb/pg_wchar.h"
28-
#include "nodes/primnodes.h"
29-
#include "parser/parse_node.h"
3028

3129
#include "parser/cypher_parse_node.h"
3230

src/backend/parser/cypher_parser.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@
1919

2020
#include "postgres.h"
2121

22-
#include "nodes/pg_list.h"
2322
#include "parser/scansup.h"
2423

25-
#include "parser/ag_scanner.h"
2624
#include "parser/cypher_gram.h"
2725
#include "parser/cypher_keywords.h"
2826
#include "parser/cypher_parser.h"

0 commit comments

Comments
 (0)