Skip to content

Commit ab33a7e

Browse files
committed
fix missing and misleading include guards
1 parent 9d3fcff commit ab33a7e

15 files changed

+48
-17
lines changed

Diff for: src/hooks.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
* ------------------------------------------------------------------------
99
*/
1010

11-
#ifndef JOIN_HOOK_H
12-
#define JOIN_HOOK_H
11+
#ifndef PATHMAN_HOOKS_H
12+
#define PATHMAN_HOOKS_H
13+
1314

1415
#include "postgres.h"
1516
#include "optimizer/planner.h"
@@ -59,4 +60,5 @@ void pathman_process_utility_hook(Node *parsetree,
5960
DestReceiver *dest,
6061
char *completionTag);
6162

62-
#endif
63+
64+
#endif /* PATHMAN_HOOKS_H */

Diff for: src/init.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#ifndef PATHMAN_INIT_H
1212
#define PATHMAN_INIT_H
1313

14+
1415
#include "relation_info.h"
1516

1617
#include "postgres.h"
@@ -147,4 +148,5 @@ bool read_pathman_params(Oid relid,
147148
Datum *values,
148149
bool *isnull);
149150

150-
#endif
151+
152+
#endif /* PATHMAN_INIT_H */

Diff for: src/nodes_common.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#ifndef NODES_COMMON_H
1212
#define NODES_COMMON_H
1313

14+
1415
#include "relation_info.h"
1516

1617
#include "postgres.h"
@@ -100,4 +101,5 @@ void explain_append_common(CustomScanState *node,
100101
HTAB *children_table,
101102
ExplainState *es);
102103

103-
#endif
104+
105+
#endif /* NODES_COMMON_H */

Diff for: src/partition_creation.h

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
*-------------------------------------------------------------------------
99
*/
1010

11+
#ifndef PARTITION_CREATION_H
12+
#define PARTITION_CREATION_H
13+
14+
1115
#include "relation_info.h"
1216

1317
#include "postgres.h"
@@ -137,3 +141,6 @@ typedef struct
137141

138142
void invoke_part_callback(init_callback_params *cb_params);
139143
bool validate_part_callback(Oid procid, bool emit_error);
144+
145+
146+
#endif /* PARTITION_CREATION_H */

Diff for: src/partition_filter.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
* ------------------------------------------------------------------------
99
*/
1010

11-
#ifndef RUNTIME_INSERT_H
12-
#define RUNTIME_INSERT_H
11+
#ifndef PARTITION_FILTER_H
12+
#define PARTITION_FILTER_H
13+
1314

1415
#include "relation_info.h"
1516
#include "utils.h"
@@ -135,4 +136,5 @@ ResultRelInfoHolder * select_partition_for_insert(const PartRelationInfo *prel,
135136
Datum value, Oid value_type,
136137
EState *estate);
137138

138-
#endif
139+
140+
#endif /* PARTITION_FILTER_H */

Diff for: src/pathman.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#ifndef PATHMAN_H
1212
#define PATHMAN_H
1313

14+
1415
#include "relation_info.h"
1516
#include "rangeset.h"
1617

@@ -193,4 +194,4 @@ WrapperNode *walk_expr_tree(Expr *expr, WalkerContext *context);
193194
( DatumGetInt32(FunctionCall2((finfo), (arg1), (arg2))) > 0 )
194195

195196

196-
#endif /* PATHMAN_H */
197+
#endif /* PATHMAN_H */

Diff for: src/pathman_workers.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#ifndef PATHMAN_WORKERS_H
1818
#define PATHMAN_WORKERS_H
1919

20+
2021
#include "postgres.h"
2122
#include "storage/spin.h"
2223

@@ -193,4 +194,5 @@ UnpackDatumFromByteArray(Datum *datum, Size datum_size, bool typbyval,
193194
*/
194195
Oid create_partitions_for_value_bg_worker(Oid relid, Datum value, Oid value_type);
195196

196-
#endif
197+
198+
#endif /* PATHMAN_WORKERS_H */

Diff for: src/pg_compat.h

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#ifndef PG_COMPAT_H
1212
#define PG_COMPAT_H
1313

14+
1415
#include "postgres.h"
1516

1617
#include "nodes/relation.h"

Diff for: src/rangeset.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,5 @@ List *irange_list_intersection(List *a, List *b);
143143
int irange_list_length(List *rangeset);
144144
bool irange_list_find(List *rangeset, int index, bool *lossy);
145145

146-
#endif
146+
147+
#endif /* PATHMAN_RANGESET_H */

Diff for: src/relation_info.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#ifndef RELATION_INFO_H
1212
#define RELATION_INFO_H
1313

14+
1415
#include "postgres.h"
1516
#include "access/attnum.h"
1617
#include "port/atomics.h"
@@ -198,4 +199,5 @@ FreeRangesArray(PartRelationInfo *prel)
198199
}
199200
}
200201

201-
#endif
202+
203+
#endif /* RELATION_INFO_H */

Diff for: src/runtime_merge_append.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef RUNTIME_MERGE_APPEND_H
1414
#define RUNTIME_MERGE_APPEND_H
1515

16+
1617
#include "runtimeappend.h"
1718
#include "pathman.h"
1819

@@ -78,4 +79,5 @@ void runtimemergeappend_explain(CustomScanState *node,
7879
List *ancestors,
7980
ExplainState *es);
8081

81-
#endif
82+
83+
#endif /* RUNTIME_MERGE_APPEND_H */

Diff for: src/runtimeappend.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#ifndef RUNTIME_APPEND_H
1212
#define RUNTIME_APPEND_H
1313

14+
1415
#include "pathman.h"
1516
#include "nodes_common.h"
1617

@@ -91,4 +92,5 @@ void runtimeappend_explain(CustomScanState *node,
9192
List *ancestors,
9293
ExplainState *es);
9394

94-
#endif
95+
96+
#endif /* RUNTIME_APPEND_H */

Diff for: src/utility_stmt_hooking.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ void PathmanRenameConstraint(Oid partition_relid,
3030
AttrNumber partitioned_col,
3131
const RenameStmt *partition_rename_stmt);
3232

33-
#endif
33+
34+
#endif /* COPY_STMT_HOOKING_H */

Diff for: src/utils.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#ifndef PATHMAN_UTILS_H
1212
#define PATHMAN_UTILS_H
1313

14+
1415
#include "pathman.h"
1516

1617
#include "postgres.h"
@@ -56,4 +57,5 @@ void fill_type_cmp_fmgr_info(FmgrInfo *finfo, Oid type1, Oid type2);
5657
char * datum_to_cstring(Datum datum, Oid typid);
5758
Datum perform_type_cast(Datum value, Oid in_type, Oid out_type, bool *success);
5859

59-
#endif
60+
61+
#endif /* PATHMAN_UTILS_H */

Diff for: src/xact_handling.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#ifndef XACT_HANDLING_H
1212
#define XACT_HANDLING_H
1313

14+
1415
#include "pathman.h"
1516

1617
#include "postgres.h"
@@ -33,4 +34,5 @@ bool xact_is_level_read_committed(void);
3334
bool xact_is_transaction_stmt(Node *stmt);
3435
bool xact_is_set_transaction_stmt(Node *stmt);
3536

36-
#endif
37+
38+
#endif /* XACT_HANDLING_H */

0 commit comments

Comments
 (0)