Skip to content

Commit 4efb205

Browse files
committed
remove useless includes, raise warning if PostgreSQL <= 9.5.4
1 parent e23663c commit 4efb205

File tree

6 files changed

+15
-20
lines changed

6 files changed

+15
-20
lines changed

src/hooks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
#include "init.h"
1313
#include "runtimeappend.h"
1414
#include "runtime_merge_append.h"
15+
#include "partition_filter.h"
1516
#include "utils.h"
1617

1718
#include "miscadmin.h"
1819
#include "optimizer/cost.h"
1920
#include "optimizer/restrictinfo.h"
20-
#include "partition_filter.h"
21+
#include "utils/typcache.h"
2122

2223

2324
set_join_pathlist_hook_type set_join_pathlist_next = NULL;

src/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
#include "access/htup_details.h"
2121
#include "access/sysattr.h"
2222
#include "catalog/indexing.h"
23+
#include "catalog/pg_constraint.h"
24+
#include "catalog/pg_inherits.h"
2325
#include "catalog/pg_inherits_fn.h"
2426
#include "catalog/pg_type.h"
25-
#include "catalog/pg_inherits.h"
26-
#include "catalog/pg_constraint.h"
2727
#include "executor/spi.h"
2828
#include "miscadmin.h"
2929
#include "optimizer/clauses.h"

src/pathman.h

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@
1111
#ifndef PATHMAN_H
1212
#define PATHMAN_H
1313

14-
#include "dsm_array.h"
1514
#include "init.h"
1615
#include "relation_info.h"
1716
#include "rangeset.h"
1817

1918
#include "postgres.h"
20-
#include "utils/date.h"
21-
#include "utils/snapshot.h"
22-
#include "utils/typcache.h"
2319
#include "nodes/makefuncs.h"
2420
#include "nodes/primnodes.h"
2521
#include "nodes/execnodes.h"
@@ -28,16 +24,18 @@
2824

2925

3026
/* Check PostgreSQL version (9.5.4 contains an important fix for BGW) */
31-
#if PG_VERSION_NUM < 90504
32-
#error "Cannot build pg_pathman with PostgreSQL version lower than 9.5.4"
27+
#if PG_VERSION_NUM < 90503
28+
#error "Cannot build pg_pathman with PostgreSQL version lower than 9.5.3"
29+
#elif PG_VERSION_NUM < 90504
30+
#warning "It is STRONGLY recommended to use pg_pathman with PostgreSQL 9.5.4 since it contains important fixes"
3331
#endif
3432

3533
/* Get CString representation of Datum (simple wrapper) */
3634
#ifdef USE_ASSERT_CHECKING
37-
#include "utils.h"
38-
#define DebugPrintDatum(datum, typid) ( datum_to_cstring((datum), (typid)) )
35+
#include "utils.h"
36+
#define DebugPrintDatum(datum, typid) ( datum_to_cstring((datum), (typid)) )
3937
#else
40-
#define DebugPrintDatum(datum, typid) ( "[use --enable-cassert]" )
38+
#define DebugPrintDatum(datum, typid) ( "[use --enable-cassert]" )
4139
#endif
4240

4341

src/pg_pathman.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "utils/syscache.h"
4242
#include "utils/selfuncs.h"
4343
#include "utils/snapmgr.h"
44+
#include "utils/typcache.h"
4445

4546

4647
PG_MODULE_MAGIC;

src/relation_info.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "utils/lsyscache.h"
2525
#include "utils/memutils.h"
2626
#include "utils/snapmgr.h"
27+
#include "utils/typcache.h"
2728

2829

2930
/*

src/utils.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,18 @@
1515
#include "access/sysattr.h"
1616
#include "access/xact.h"
1717
#include "catalog/heap.h"
18-
#include "catalog/namespace.h"
1918
#include "catalog/pg_type.h"
2019
#include "catalog/pg_extension.h"
2120
#include "commands/extension.h"
22-
#include "executor/spi.h"
23-
#include "fmgr.h"
2421
#include "miscadmin.h"
25-
#include "nodes/nodeFuncs.h"
26-
#include "nodes/makefuncs.h"
2722
#include "optimizer/var.h"
2823
#include "optimizer/restrictinfo.h"
2924
#include "parser/parse_oper.h"
30-
#include "rewrite/rewriteManip.h"
3125
#include "utils/builtins.h"
32-
#include "utils/memutils.h"
26+
#include "utils/fmgroids.h"
3327
#include "utils/lsyscache.h"
3428
#include "utils/syscache.h"
35-
#include "utils/fmgroids.h"
29+
#include "utils/typcache.h"
3630

3731

3832
#define TABLEOID_STR(subst) ( "pathman_tableoid" subst )

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy