Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit fb3b098

Browse files
committed
Remove fmgr.h includes from headers that don't really need it.
Most of the fmgr.h includes were obsoleted by 352a24a. A few others can be obsoleted using the underlying struct type in an implementation detail. Author: Andres Freund Discussion: https://postgr.es/m/20190803193733.g3l3x3o42uv4qj7l@alap3.anarazel.de
1 parent 6a04d34 commit fb3b098

File tree

23 files changed

+9
-25
lines changed

23 files changed

+9
-25
lines changed

src/backend/access/common/printsimple.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
#include "access/printsimple.h"
2222
#include "catalog/pg_type.h"
23-
#include "fmgr.h"
2423
#include "libpq/pqformat.h"
2524
#include "utils/builtins.h"
2625

src/backend/nodes/makefuncs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#include "catalog/pg_class.h"
1919
#include "catalog/pg_type.h"
20-
#include "fmgr.h"
2120
#include "nodes/makefuncs.h"
2221
#include "nodes/nodeFuncs.h"
2322
#include "utils/lsyscache.h"

src/backend/replication/logical/logical.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
#include "postgres.h"
3030

31+
#include "fmgr.h"
3132
#include "miscadmin.h"
3233

3334
#include "access/xact.h"

src/backend/replication/pgoutput/pgoutput.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#include "catalog/pg_publication.h"
1616

17+
#include "fmgr.h"
18+
1719
#include "replication/logical.h"
1820
#include "replication/logicalproto.h"
1921
#include "replication/origin.h"

src/include/access/brin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#ifndef BRIN_H
1111
#define BRIN_H
1212

13-
#include "fmgr.h"
1413
#include "nodes/execnodes.h"
1514
#include "utils/relcache.h"
1615

src/include/access/gist_private.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "access/amapi.h"
1818
#include "access/gist.h"
1919
#include "access/itup.h"
20-
#include "fmgr.h"
2120
#include "lib/pairingheap.h"
2221
#include "storage/bufmgr.h"
2322
#include "storage/buffile.h"

src/include/access/hash.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "access/amapi.h"
2121
#include "access/itup.h"
2222
#include "access/sdir.h"
23-
#include "fmgr.h"
2423
#include "lib/stringinfo.h"
2524
#include "storage/bufmgr.h"
2625
#include "storage/lockdefs.h"

src/include/access/spgist.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include "access/amapi.h"
1818
#include "access/xlogreader.h"
19-
#include "fmgr.h"
2019
#include "lib/stringinfo.h"
2120

2221

src/include/commands/async.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
#include <signal.h>
1717

18-
#include "fmgr.h"
19-
2018
/*
2119
* The number of SLRU page buffers we use for the notification queue.
2220
*/

src/include/executor/executor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#define EXECUTOR_H
1616

1717
#include "executor/execdesc.h"
18+
#include "fmgr.h"
1819
#include "nodes/lockoptions.h"
1920
#include "nodes/parsenodes.h"
2021
#include "utils/memutils.h"

src/include/jit/llvmjit_emit.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#include <llvm-c/Core.h>
1919

20-
#include "fmgr.h"
2120
#include "jit/llvmjit.h"
2221

2322

src/include/nodes/execnodes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "access/tupconvert.h"
1818
#include "executor/instrument.h"
19+
#include "fmgr.h"
1920
#include "lib/pairingheap.h"
2021
#include "nodes/params.h"
2122
#include "nodes/plannodes.h"

src/include/nodes/pathnodes.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#define PATHNODES_H
1616

1717
#include "access/sdir.h"
18-
#include "fmgr.h"
1918
#include "lib/stringinfo.h"
2019
#include "nodes/params.h"
2120
#include "nodes/parsenodes.h"
@@ -400,7 +399,7 @@ typedef struct PartitionSchemeData
400399
bool *parttypbyval;
401400

402401
/* Cached information about partition comparison functions. */
403-
FmgrInfo *partsupfunc;
402+
struct FmgrInfo *partsupfunc;
404403
} PartitionSchemeData;
405404

406405
typedef struct PartitionSchemeData *PartitionScheme;

src/include/pgstat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#define PGSTAT_H
1313

1414
#include "datatype/timestamp.h"
15-
#include "fmgr.h"
1615
#include "libpq/pqcomm.h"
1716
#include "port/atomics.h"
1817
#include "portability/instr_time.h"
@@ -1402,7 +1401,8 @@ extern void pgstat_count_heap_delete(Relation rel);
14021401
extern void pgstat_count_truncate(Relation rel);
14031402
extern void pgstat_update_heap_dead_tuples(Relation rel, int delta);
14041403

1405-
extern void pgstat_init_function_usage(FunctionCallInfo fcinfo,
1404+
struct FunctionCallInfoBaseData;
1405+
extern void pgstat_init_function_usage(struct FunctionCallInfoBaseData *fcinfo,
14061406
PgStat_FunctionCallUsage *fcu);
14071407
extern void pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu,
14081408
bool finalize);

src/include/replication/origin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#ifndef PG_ORIGIN_H
1111
#define PG_ORIGIN_H
1212

13-
#include "fmgr.h"
1413
#include "access/xlog.h"
1514
#include "access/xlogdefs.h"
1615
#include "access/xlogreader.h"

src/include/replication/slot.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#ifndef SLOT_H
1010
#define SLOT_H
1111

12-
#include "fmgr.h"
1312
#include "access/xlog.h"
1413
#include "access/xlogreader.h"
1514
#include "storage/condition_variable.h"

src/include/replication/walreceiver.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
#include "access/xlog.h"
1616
#include "access/xlogdefs.h"
17-
#include "fmgr.h"
1817
#include "getaddrinfo.h" /* for NI_MAXHOST */
1918
#include "replication/logicalproto.h"
2019
#include "replication/walsender.h"

src/include/replication/walsender.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
#include <signal.h>
1616

17-
#include "fmgr.h"
18-
1917
/*
2018
* What to do with a snapshot in create replication slot command.
2119
*/

src/include/utils/bytea.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#ifndef BYTEA_H
1515
#define BYTEA_H
1616

17-
#include "fmgr.h"
1817

1918

2019
typedef enum

src/include/utils/formatting.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#ifndef _FORMATTING_H_
1818
#define _FORMATTING_H_
1919

20-
#include "fmgr.h"
21-
2220

2321
extern char *str_tolower(const char *buff, size_t nbytes, Oid collid);
2422
extern char *str_toupper(const char *buff, size_t nbytes, Oid collid);

src/include/utils/rel.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "catalog/pg_class.h"
2020
#include "catalog/pg_index.h"
2121
#include "catalog/pg_publication.h"
22-
#include "fmgr.h"
2322
#include "nodes/bitmapset.h"
2423
#include "rewrite/prs2lock.h"
2524
#include "storage/block.h"
@@ -159,7 +158,7 @@ typedef struct RelationData
159158
Oid *rd_opfamily; /* OIDs of op families for each index col */
160159
Oid *rd_opcintype; /* OIDs of opclass declared input data types */
161160
RegProcedure *rd_support; /* OIDs of support procedures */
162-
FmgrInfo *rd_supportinfo; /* lookup info for support procedures */
161+
struct FmgrInfo *rd_supportinfo; /* lookup info for support procedures */
163162
int16 *rd_indoption; /* per-column AM-specific flags */
164163
List *rd_indexprs; /* index expression trees, if any */
165164
List *rd_indpred; /* index predicate tree, if any */

src/include/utils/snapmgr.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#define SNAPMGR_H
1515

1616
#include "access/transam.h"
17-
#include "fmgr.h"
1817
#include "utils/relcache.h"
1918
#include "utils/resowner.h"
2019
#include "utils/snapshot.h"

src/include/utils/tuplesort.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
#include "access/itup.h"
2525
#include "executor/tuptable.h"
26-
#include "fmgr.h"
2726
#include "storage/dsm.h"
2827
#include "utils/relcache.h"
2928

0 commit comments

Comments
 (0)