]> granicus.if.org Git - postgresql/commitdiff
Remove fmgr.h includes from headers that don't really need it.
authorAndres Freund <andres@anarazel.de>
Fri, 16 Aug 2019 17:35:31 +0000 (10:35 -0700)
committerAndres Freund <andres@anarazel.de>
Fri, 16 Aug 2019 17:35:31 +0000 (10:35 -0700)
Most of the fmgr.h includes were obsoleted by 352a24a1f9d6f7d4abb1. 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

23 files changed:
src/backend/access/common/printsimple.c
src/backend/nodes/makefuncs.c
src/backend/replication/logical/logical.c
src/backend/replication/pgoutput/pgoutput.c
src/include/access/brin.h
src/include/access/gist_private.h
src/include/access/hash.h
src/include/access/spgist.h
src/include/commands/async.h
src/include/executor/executor.h
src/include/jit/llvmjit_emit.h
src/include/nodes/execnodes.h
src/include/nodes/pathnodes.h
src/include/pgstat.h
src/include/replication/origin.h
src/include/replication/slot.h
src/include/replication/walreceiver.h
src/include/replication/walsender.h
src/include/utils/bytea.h
src/include/utils/formatting.h
src/include/utils/rel.h
src/include/utils/snapmgr.h
src/include/utils/tuplesort.h

index 3ea188d701caa9b9148e8b44c0f8aa3403bc472d..651ade14dd2990be66d7b59a767e6f862dc5030f 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "access/printsimple.h"
 #include "catalog/pg_type.h"
-#include "fmgr.h"
 #include "libpq/pqformat.h"
 #include "utils/builtins.h"
 
index 5c11b5472e563e263e10c3b416821e353ae2a308..18466ac5687b78d0cbdd033f5c72fccaa0657fd9 100644 (file)
@@ -17,7 +17,6 @@
 
 #include "catalog/pg_class.h"
 #include "catalog/pg_type.h"
-#include "fmgr.h"
 #include "nodes/makefuncs.h"
 #include "nodes/nodeFuncs.h"
 #include "utils/lsyscache.h"
index 9853be6d1c2c3b1cfc77fd122b12ad953aa2833a..f8b9020081e558f492254ad2262fb27e5e146581 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "postgres.h"
 
+#include "fmgr.h"
 #include "miscadmin.h"
 
 #include "access/xact.h"
index d317fd70063d69f1b53f16350576dfda5ceca020..9c08757fcaf264f663de098c4b85563b45e92a5c 100644 (file)
@@ -14,6 +14,8 @@
 
 #include "catalog/pg_publication.h"
 
+#include "fmgr.h"
+
 #include "replication/logical.h"
 #include "replication/logicalproto.h"
 #include "replication/origin.h"
index 612721baf3a32cf6aba61602d01df0151f7295e8..fb351b36e03a4b35bff30b056f811beb95ed1410 100644 (file)
@@ -10,7 +10,6 @@
 #ifndef BRIN_H
 #define BRIN_H
 
-#include "fmgr.h"
 #include "nodes/execnodes.h"
 #include "utils/relcache.h"
 
index 664f322df3a521ff9482b0c6152b0ad0c0368d06..fc1a3115565458a3abc580e19f1b50879774f1f9 100644 (file)
@@ -17,7 +17,6 @@
 #include "access/amapi.h"
 #include "access/gist.h"
 #include "access/itup.h"
-#include "fmgr.h"
 #include "lib/pairingheap.h"
 #include "storage/bufmgr.h"
 #include "storage/buffile.h"
index 0d49f4253c54835c9b36c53152809351be12962c..24af778fdf8e55290e05cfd949b0e496d130eaca 100644 (file)
@@ -20,7 +20,6 @@
 #include "access/amapi.h"
 #include "access/itup.h"
 #include "access/sdir.h"
-#include "fmgr.h"
 #include "lib/stringinfo.h"
 #include "storage/bufmgr.h"
 #include "storage/lockdefs.h"
index 02c87949cee660414df1d99fc134afe234dd0b88..d787ab213dc13db2ef73d479c6305e91e240fb62 100644 (file)
@@ -16,7 +16,6 @@
 
 #include "access/amapi.h"
 #include "access/xlogreader.h"
-#include "fmgr.h"
 #include "lib/stringinfo.h"
 
 
index d132fd59991f7383de9ae8e23b6beff2440cbd07..c295dc67c64fd206008cef094eb1fefbbe3d70bc 100644 (file)
@@ -15,8 +15,6 @@
 
 #include <signal.h>
 
-#include "fmgr.h"
-
 /*
  * The number of SLRU page buffers we use for the notification queue.
  */
index 39c8b3bbbe8d8d2f4a6b4bad47607055c8c9d0e8..affe6ad69828e0965d7ac2d88544e2954d2b3692 100644 (file)
@@ -15,6 +15,7 @@
 #define EXECUTOR_H
 
 #include "executor/execdesc.h"
+#include "fmgr.h"
 #include "nodes/lockoptions.h"
 #include "nodes/parsenodes.h"
 #include "utils/memutils.h"
index 71a8625efe4542aea5f36d1b5c4efeaffa0bd316..cdfa0dc72147c37da2425a5eba43da69b95f7204 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <llvm-c/Core.h>
 
-#include "fmgr.h"
 #include "jit/llvmjit.h"
 
 
index 063b49013c66dac8b6bf512820b30471a46037b1..f42189d2bf6af9654da2f8d9e634cf163df0f72c 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/tupconvert.h"
 #include "executor/instrument.h"
+#include "fmgr.h"
 #include "lib/pairingheap.h"
 #include "nodes/params.h"
 #include "nodes/plannodes.h"
index 13b147d85d5ceb9ee3e7f712ef7a168ce5620acc..23a06d718e3ab73bed9dbe3213eb2e0ad30bee28 100644 (file)
@@ -15,7 +15,6 @@
 #define PATHNODES_H
 
 #include "access/sdir.h"
-#include "fmgr.h"
 #include "lib/stringinfo.h"
 #include "nodes/params.h"
 #include "nodes/parsenodes.h"
@@ -400,7 +399,7 @@ typedef struct PartitionSchemeData
        bool       *parttypbyval;
 
        /* Cached information about partition comparison functions. */
-       FmgrInfo   *partsupfunc;
+       struct FmgrInfo *partsupfunc;
 }                      PartitionSchemeData;
 
 typedef struct PartitionSchemeData *PartitionScheme;
index 0a3ad3a1883b270ba8b44396a4121b7a154f6958..fe076d823db80cf993b3344fff6daa3954bb1140 100644 (file)
@@ -12,7 +12,6 @@
 #define PGSTAT_H
 
 #include "datatype/timestamp.h"
-#include "fmgr.h"
 #include "libpq/pqcomm.h"
 #include "port/atomics.h"
 #include "portability/instr_time.h"
@@ -1402,7 +1401,8 @@ extern void pgstat_count_heap_delete(Relation rel);
 extern void pgstat_count_truncate(Relation rel);
 extern void pgstat_update_heap_dead_tuples(Relation rel, int delta);
 
-extern void pgstat_init_function_usage(FunctionCallInfo fcinfo,
+struct FunctionCallInfoBaseData;
+extern void pgstat_init_function_usage(struct FunctionCallInfoBaseData *fcinfo,
                                                                           PgStat_FunctionCallUsage *fcu);
 extern void pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu,
                                                                          bool finalize);
index 7422b26a6d851c85c3cea8fe877172d2e4115d5c..dccf48418ff3a10c0be6faa8c0519134ead05f79 100644 (file)
@@ -10,7 +10,6 @@
 #ifndef PG_ORIGIN_H
 #define PG_ORIGIN_H
 
-#include "fmgr.h"
 #include "access/xlog.h"
 #include "access/xlogdefs.h"
 #include "access/xlogreader.h"
index 8fbddea78fd3270748819833c72ae4d1dceacd0a..3a5763fb07a32b71486c188a6651533240e4c395 100644 (file)
@@ -9,7 +9,6 @@
 #ifndef SLOT_H
 #define SLOT_H
 
-#include "fmgr.h"
 #include "access/xlog.h"
 #include "access/xlogreader.h"
 #include "storage/condition_variable.h"
index 86a81300517c73f7052832bf6e340ea6edab2709..bc9468b519e70a2e89b9a67c583b839f89cf9b49 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "access/xlog.h"
 #include "access/xlogdefs.h"
-#include "fmgr.h"
 #include "getaddrinfo.h"               /* for NI_MAXHOST */
 #include "replication/logicalproto.h"
 #include "replication/walsender.h"
index 4a60893a3bc52a050cf8dde91dafd2b930a91c4e..61223aecbc1c4d2e0e7144c435c93842eaabe5c7 100644 (file)
@@ -14,8 +14,6 @@
 
 #include <signal.h>
 
-#include "fmgr.h"
-
 /*
  * What to do with a snapshot in create replication slot command.
  */
index c96011fae84747d1fbdbf39b34ac2b2a5993b827..72224ca95f3a7d03c2515d0e3b0245083ad8d53f 100644 (file)
@@ -14,7 +14,6 @@
 #ifndef BYTEA_H
 #define BYTEA_H
 
-#include "fmgr.h"
 
 
 typedef enum
index 741c5f4809fa7548227cf55725b9ad7d75e72b21..0117144779e1201a3a179faf446088a855338e15 100644 (file)
@@ -17,8 +17,6 @@
 #ifndef _FORMATTING_H_
 #define _FORMATTING_H_
 
-#include "fmgr.h"
-
 
 extern char *str_tolower(const char *buff, size_t nbytes, Oid collid);
 extern char *str_toupper(const char *buff, size_t nbytes, Oid collid);
index 2174bbafd14d689396b00bdb80134d43c80a8090..c5d36680a2b4d4f8bfa0eac1cd14b98f263c1bf3 100644 (file)
@@ -19,7 +19,6 @@
 #include "catalog/pg_class.h"
 #include "catalog/pg_index.h"
 #include "catalog/pg_publication.h"
-#include "fmgr.h"
 #include "nodes/bitmapset.h"
 #include "rewrite/prs2lock.h"
 #include "storage/block.h"
@@ -159,7 +158,7 @@ typedef struct RelationData
        Oid                *rd_opfamily;        /* OIDs of op families for each index col */
        Oid                *rd_opcintype;       /* OIDs of opclass declared input data types */
        RegProcedure *rd_support;       /* OIDs of support procedures */
-       FmgrInfo   *rd_supportinfo; /* lookup info for support procedures */
+       struct FmgrInfo *rd_supportinfo; /* lookup info for support procedures */
        int16      *rd_indoption;       /* per-column AM-specific flags */
        List       *rd_indexprs;        /* index expression trees, if any */
        List       *rd_indpred;         /* index predicate tree, if any */
index 6641ee510a1db05c6ba735ba69b49011478af425..8c070d7f4124047448a7a76ddfd3c7238c5a71e6 100644 (file)
@@ -14,7 +14,6 @@
 #define SNAPMGR_H
 
 #include "access/transam.h"
-#include "fmgr.h"
 #include "utils/relcache.h"
 #include "utils/resowner.h"
 #include "utils/snapshot.h"
index 4521de18e13d0e51cdd10b34813137360e78e13c..d774bc1152fa38c7561e2d0bf98175a3436b62aa 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "access/itup.h"
 #include "executor/tuptable.h"
-#include "fmgr.h"
 #include "storage/dsm.h"
 #include "utils/relcache.h"