Skip to content

Commit

Permalink
Remove unnecessary #include in src/backend/utils
Browse files Browse the repository at this point in the history
Removed unnecessary #includes in src/backend/utils files.
  • Loading branch information
jrgemignani authored and dehowef committed Nov 13, 2023
1 parent 16374c3 commit 444fcf5
Show file tree
Hide file tree
Showing 17 changed files with 5 additions and 151 deletions.
3 changes: 0 additions & 3 deletions src/backend/utils/adt/ag_float8_supp.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@

#include "postgres.h"

#include <math.h>

#include "utils/float.h"
#include "utils/builtins.h"
#include "utils/ag_float8_supp.h"

/*
Expand Down
11 changes: 0 additions & 11 deletions src/backend/utils/adt/age_global_graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,17 @@
#include "postgres.h"

#include "access/heapam.h"
#include "access/relscan.h"
#include "access/skey.h"
#include "access/table.h"
#include "access/tableam.h"
#include "catalog/namespace.h"
#include "common/hashfn.h"
#include "commands/label_commands.h"
#include "utils/datum.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"

#include "catalog/ag_graph.h"
#include "catalog/ag_label.h"
#include "utils/age_global_graph.h"
#include "utils/age_graphid_ds.h"
#include "utils/agtype.h"
#include "catalog/ag_graph.h"
#include "catalog/ag_label.h"
#include "utils/graphid.h"
#include "utils/age_graphid_ds.h"

/* defines */
#define VERTEX_HTAB_NAME "Vertex to edge lists " /* added a space at end for */
Expand Down
1 change: 0 additions & 1 deletion src/backend/utils/adt/age_graphid_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include "postgres.h"

#include "utils/graphid.h"
#include "utils/age_graphid_ds.h"

/* defines */
Expand Down
5 changes: 0 additions & 5 deletions src/backend/utils/adt/age_vle.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@

#include "postgres.h"

#include "access/heapam.h"
#include "catalog/namespace.h"
#include "catalog/pg_type.h"
#include "common/hashfn.h"
#include "funcapi.h"
#include "utils/lsyscache.h"

#include "utils/age_vle.h"
#include "catalog/ag_graph.h"
#include "utils/graphid.h"
#include "utils/age_graphid_ds.h"
#include "nodes/cypher_nodes.h"

/* defines */
Expand Down
17 changes: 0 additions & 17 deletions src/backend/utils/adt/agtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,45 +30,28 @@

#include "postgres.h"

#include <math.h>
#include <float.h>

#include "access/genam.h"
#include "access/heapam.h"
#include "access/skey.h"
#include "access/table.h"
#include "access/tableam.h"
#include "access/htup_details.h"
#include "catalog/namespace.h"
#include "catalog/pg_collation.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_type.h"
#include "catalog/pg_aggregate_d.h"
#include "catalog/pg_collation_d.h"
#include "catalog/pg_operator_d.h"
#include "executor/nodeAgg.h"
#include "funcapi.h"
#include "libpq/pqformat.h"
#include "miscadmin.h"
#include "parser/parse_coerce.h"
#include "nodes/pg_list.h"
#include "utils/builtins.h"
#include "utils/float.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"
#include "utils/typcache.h"

#include "utils/age_vle.h"
#include "utils/agtype.h"
#include "utils/agtype_parser.h"
#include "utils/ag_float8_supp.h"
#include "utils/agtype_raw.h"
#include "catalog/ag_graph.h"
#include "catalog/ag_label.h"
#include "utils/graphid.h"
#include "utils/numeric.h"

/* State structure for Percentile aggregate functions */
typedef struct PercentileGroupAggState
Expand Down
2 changes: 0 additions & 2 deletions src/backend/utils/adt/agtype_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
*/

#include "utils/agtype_ext.h"
#include "utils/agtype.h"
#include "utils/graphid.h"

/* define the type and size of the agt_header */
#define AGT_HEADER_TYPE uint32
Expand Down
5 changes: 1 addition & 4 deletions src/backend/utils/adt/agtype_gin.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,12 @@

#include "access/gin.h"
#include "access/hash.h"
#include "access/stratnum.h"
#include "catalog/pg_collation.h"
#include "catalog/pg_type.h"
#include "utils/agtype.h"
#include "utils/float.h"
#include "utils/builtins.h"
#include "utils/varlena.h"

#include "utils/agtype.h"

typedef struct PathHashStack
{
uint32 hash;
Expand Down
6 changes: 1 addition & 5 deletions src/backend/utils/adt/agtype_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@
#include <math.h>
#include <limits.h>

#include "catalog/pg_type_d.h"
#include "fmgr.h"
#include "utils/builtins.h"
#include "utils/numeric.h"

#include "utils/agtype.h"
#include "utils/builtins.h"

static agtype *agtype_concat_impl(agtype *agt1, agtype *agt2);
static agtype_value *iterator_concat(agtype_iterator **it1,
Expand Down
3 changes: 1 addition & 2 deletions src/backend/utils/adt/agtype_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
*/

#include "postgres.h"
#include "utils/agtype.h"
#include "utils/agtype_ext.h"

#include "utils/agtype_raw.h"

/*
Expand Down
4 changes: 1 addition & 3 deletions src/backend/utils/adt/agtype_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
#include "utils/memutils.h"
#include "utils/varlena.h"

#include "utils/agtype.h"
#include "utils/agtype_ext.h"
#include "utils/graphid.h"

/*
* Maximum number of elements in an array (or key/value pairs in an object).
Expand Down Expand Up @@ -2486,4 +2484,4 @@ void copy_agtype_value(agtype_parse_state* pstate,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid type provided for copy_agtype_value")));
}
}
}
1 change: 0 additions & 1 deletion src/backend/utils/adt/graphid.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include "postgres.h"

#include "fmgr.h"
#include "utils/builtins.h"
#include "utils/sortsupport.h"

Expand Down
1 change: 0 additions & 1 deletion src/backend/utils/ag_func.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include "postgres.h"

#include "access/htup.h"
#include "access/htup_details.h"
#include "catalog/pg_proc.h"
#include "utils/builtins.h"
Expand Down
1 change: 1 addition & 0 deletions src/backend/utils/ag_guc.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

#include "postgres.h"

#include "utils/guc.h"
#include "utils/ag_guc.h"

Expand Down
15 changes: 0 additions & 15 deletions src/backend/utils/cache/ag_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,16 @@

#include "postgres.h"

#include "access/attnum.h"
#include "access/genam.h"
#include "access/heapam.h"
#include "access/htup.h"
#include "access/htup_details.h"
#include "access/skey.h"
#include "access/stratnum.h"
#include "access/tupdesc.h"
#include "catalog/pg_collation.h"
#include "fmgr.h"
#include "storage/lockdefs.h"
#include "utils/builtins.h"
#include "utils/catcache.h"
#include "utils/fmgroids.h"
#include "utils/hsearch.h"
#include "utils/inval.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/relcache.h"
#include "utils/syscache.h"

#include "catalog/ag_graph.h"
#include "catalog/ag_label.h"
#include "utils/ag_cache.h"
#include "utils/graphid.h"

typedef struct graph_name_cache_entry
{
Expand Down
25 changes: 0 additions & 25 deletions src/backend/utils/graph_generation.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,9 @@

#include "postgres.h"

#include "access/xact.h"
#include "access/genam.h"
#include "access/heapam.h"
#include "catalog/dependency.h"
#include "catalog/objectaddress.h"
#include "commands/defrem.h"
#include "commands/schemacmds.h"
#include "commands/tablecmds.h"
#include "fmgr.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodes.h"
#include "nodes/parsenodes.h"
#include "nodes/pg_list.h"
#include "nodes/value.h"
#include "parser/parser.h"
#include "utils/fmgroids.h"
#include "utils/relcache.h"
#include "utils/rel.h"

#include "catalog/ag_graph.h"
#include "catalog/ag_label.h"
#include "commands/graph_commands.h"
#include "commands/label_commands.h"
#include "utils/graphid.h"
#include "utils/load/age_load.h"
#include "utils/load/ag_load_edges.h"
#include "utils/load/ag_load_labels.h"


int64 get_nextval_internal(graph_cache_data* graph_cache,
Expand Down
42 changes: 0 additions & 42 deletions src/backend/utils/load/ag_load_labels.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>

#include "postgres.h"

#include "access/heapam.h"
#include "access/xact.h"
#include "catalog/dependency.h"
#include "catalog/namespace.h"
#include "catalog/objectaddress.h"
#include "catalog/pg_class_d.h"
#include "commands/defrem.h"
#include "commands/sequence.h"
#include "commands/tablecmds.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/nodes.h"
#include "nodes/parsenodes.h"
#include "nodes/pg_list.h"
#include "nodes/plannodes.h"
#include "nodes/primnodes.h"
#include "nodes/value.h"
#include "parser/parse_node.h"
#include "parser/parser.h"
#include "storage/lockdefs.h"
#include "tcop/dest.h"
#include "tcop/utility.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/inval.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 "utils/ag_cache.h"
#include "utils/agtype.h"
#include "utils/graphid.h"

#include "utils/load/ag_load_labels.h"
#include "utils/load/age_load.h"
#include "utils/load/csv.h"
Expand Down
14 changes: 0 additions & 14 deletions src/backend/utils/load/age_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,6 @@

#include "postgres.h"

#include "access/heapam.h"
#include "access/xact.h"
#include "parser/parse_node.h"
#include "storage/lockdefs.h"
#include "tcop/dest.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"

#include "catalog/ag_graph.h"
#include "catalog/ag_label.h"
#include "utils/agtype.h"
#include "utils/graphid.h"

#include "utils/load/ag_load_edges.h"
#include "utils/load/ag_load_labels.h"
#include "utils/load/age_load.h"
Expand Down

0 comments on commit 444fcf5

Please sign in to comment.