From dc8dab38070ba6005aefb2cfe941a588f5362664 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 22 Jun 2024 10:22:29 +0200 Subject: [PATCH 2/5] Remove unused #include's from contrib .c files as determined by IWYU --- contrib/amcheck/verify_heapam.c | 6 +++++- contrib/amcheck/verify_nbtree.c | 2 -- contrib/auth_delay/auth_delay.c | 2 -- contrib/auto_explain/auto_explain.c | 2 -- contrib/basic_archive/basic_archive.c | 1 - contrib/bloom/blcost.c | 1 - contrib/bloom/blinsert.c | 4 +--- contrib/bloom/blscan.c | 4 ---- contrib/bloom/blutils.c | 5 +---- contrib/bloom/blvacuum.c | 4 ---- contrib/bloom/blvalidate.c | 2 -- contrib/btree_gin/btree_gin.c | 3 --- contrib/btree_gist/btree_bit.c | 3 +-- contrib/btree_gist/btree_bool.c | 1 - contrib/btree_gist/btree_bytea.c | 3 +-- contrib/btree_gist/btree_date.c | 2 +- contrib/btree_gist/btree_enum.c | 2 +- contrib/btree_gist/btree_inet.c | 1 - contrib/btree_gist/btree_interval.c | 2 +- contrib/btree_gist/btree_macaddr.c | 2 +- contrib/btree_gist/btree_macaddr8.c | 2 +- contrib/btree_gist/btree_text.c | 3 ++- contrib/btree_gist/btree_time.c | 2 +- contrib/btree_gist/btree_ts.c | 4 ++-- contrib/btree_gist/btree_utils_num.h | 1 - contrib/btree_gist/btree_utils_var.c | 3 +-- contrib/btree_gist/btree_utils_var.h | 1 - contrib/citext/citext.c | 2 +- contrib/dict_xsyn/dict_xsyn.c | 2 +- contrib/fuzzystrmatch/fuzzystrmatch.c | 1 - contrib/intarray/_int_bool.c | 1 - contrib/intarray/_int_selfuncs.c | 3 +-- contrib/isn/isn.c | 1 - contrib/lo/lo.c | 2 +- contrib/ltree/ltree_io.c | 1 - contrib/ltree/ltree_op.c | 4 +--- contrib/pageinspect/brinfuncs.c | 4 ---- contrib/pageinspect/fsmfuncs.c | 2 +- contrib/pageinspect/ginfuncs.c | 3 --- contrib/pageinspect/gistfuncs.c | 3 --- contrib/pageinspect/heapfuncs.c | 1 - contrib/pg_freespacemap/pg_freespacemap.c | 2 +- contrib/pg_prewarm/autoprewarm.c | 9 +-------- contrib/pg_stat_statements/pg_stat_statements.c | 3 --- contrib/pg_surgery/heap_surgery.c | 4 ++-- contrib/pg_visibility/pg_visibility.c | 2 -- contrib/pgcrypto/pgcrypto.c | 1 - contrib/pgrowlocks/pgrowlocks.c | 2 +- contrib/pgstattuple/pgstatapprox.c | 6 ------ contrib/pgstattuple/pgstatindex.c | 3 --- contrib/pgstattuple/pgstattuple.c | 1 - contrib/postgres_fdw/connection.c | 4 ---- contrib/postgres_fdw/deparse.c | 2 -- contrib/postgres_fdw/option.c | 1 - contrib/postgres_fdw/postgres_fdw.c | 3 --- contrib/spi/moddatetime.c | 2 +- contrib/tablefunc/tablefunc.c | 1 + contrib/tablefunc/tablefunc.h | 2 -- contrib/tsm_system_rows/tsm_system_rows.c | 1 - contrib/tsm_system_time/tsm_system_time.c | 1 - contrib/unaccent/unaccent.c | 2 -- contrib/xml2/xpath.c | 1 - contrib/xml2/xslt_proc.c | 3 --- 63 files changed, 33 insertions(+), 121 deletions(-) diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c index f2526ed63a2..9c74daaceed 100644 --- a/contrib/amcheck/verify_heapam.c +++ b/contrib/amcheck/verify_heapam.c @@ -12,18 +12,22 @@ #include "access/detoast.h" #include "access/genam.h" -#include "access/heapam.h" #include "access/heaptoast.h" #include "access/multixact.h" +#include "access/relation.h" +#include "access/table.h" #include "access/toast_internals.h" #include "access/visibilitymap.h" +#include "access/xact.h" #include "catalog/pg_am.h" +#include "catalog/pg_class.h" #include "funcapi.h" #include "miscadmin.h" #include "storage/bufmgr.h" #include "storage/procarray.h" #include "utils/builtins.h" #include "utils/fmgroids.h" +#include "utils/rel.h" PG_FUNCTION_INFO_V1(verify_heapam); diff --git a/contrib/amcheck/verify_nbtree.c b/contrib/amcheck/verify_nbtree.c index 7cfb136763f..8b82797c10f 100644 --- a/contrib/amcheck/verify_nbtree.c +++ b/contrib/amcheck/verify_nbtree.c @@ -33,11 +33,9 @@ #include "catalog/index.h" #include "catalog/pg_am.h" #include "catalog/pg_opfamily_d.h" -#include "commands/tablecmds.h" #include "common/pg_prng.h" #include "lib/bloomfilter.h" #include "miscadmin.h" -#include "storage/lmgr.h" #include "storage/smgr.h" #include "utils/guc.h" #include "utils/memutils.h" diff --git a/contrib/auth_delay/auth_delay.c b/contrib/auth_delay/auth_delay.c index ff0e1fd461b..e8dfef3290e 100644 --- a/contrib/auth_delay/auth_delay.c +++ b/contrib/auth_delay/auth_delay.c @@ -14,9 +14,7 @@ #include #include "libpq/auth.h" -#include "port.h" #include "utils/guc.h" -#include "utils/timestamp.h" PG_MODULE_MAGIC; diff --git a/contrib/auto_explain/auto_explain.c b/contrib/auto_explain/auto_explain.c index 677c135f59b..623a674f99c 100644 --- a/contrib/auto_explain/auto_explain.c +++ b/contrib/auto_explain/auto_explain.c @@ -18,8 +18,6 @@ #include "commands/explain.h" #include "common/pg_prng.h" #include "executor/instrument.h" -#include "jit/jit.h" -#include "nodes/params.h" #include "utils/guc.h" PG_MODULE_MAGIC; diff --git a/contrib/basic_archive/basic_archive.c b/contrib/basic_archive/basic_archive.c index 028cf51c25d..36e2feb4fb8 100644 --- a/contrib/basic_archive/basic_archive.c +++ b/contrib/basic_archive/basic_archive.c @@ -36,7 +36,6 @@ #include "storage/copydir.h" #include "storage/fd.h" #include "utils/guc.h" -#include "utils/memutils.h" PG_MODULE_MAGIC; diff --git a/contrib/bloom/blcost.c b/contrib/bloom/blcost.c index 9b629b2c3d5..0f2cf1546c7 100644 --- a/contrib/bloom/blcost.c +++ b/contrib/bloom/blcost.c @@ -13,7 +13,6 @@ #include "postgres.h" #include "bloom.h" -#include "fmgr.h" #include "utils/selfuncs.h" /* diff --git a/contrib/bloom/blinsert.c b/contrib/bloom/blinsert.c index f8a1061abb9..dbb79a51edd 100644 --- a/contrib/bloom/blinsert.c +++ b/contrib/bloom/blinsert.c @@ -16,11 +16,9 @@ #include "access/generic_xlog.h" #include "access/tableam.h" #include "bloom.h" -#include "catalog/index.h" #include "miscadmin.h" +#include "nodes/execnodes.h" #include "storage/bufmgr.h" -#include "storage/indexfsm.h" -#include "storage/smgr.h" #include "utils/memutils.h" #include "utils/rel.h" diff --git a/contrib/bloom/blscan.c b/contrib/bloom/blscan.c index 94b6b449c8c..bf455e579fe 100644 --- a/contrib/bloom/blscan.c +++ b/contrib/bloom/blscan.c @@ -15,11 +15,7 @@ #include "access/relscan.h" #include "bloom.h" #include "miscadmin.h" -#include "pgstat.h" #include "storage/bufmgr.h" -#include "storage/lmgr.h" -#include "utils/memutils.h" -#include "utils/rel.h" /* * Begin scan of bloom index. diff --git a/contrib/bloom/blutils.c b/contrib/bloom/blutils.c index a29330afcd3..af10199394a 100644 --- a/contrib/bloom/blutils.c +++ b/contrib/bloom/blutils.c @@ -17,14 +17,11 @@ #include "access/generic_xlog.h" #include "access/reloptions.h" #include "bloom.h" -#include "catalog/index.h" #include "commands/vacuum.h" -#include "miscadmin.h" #include "storage/bufmgr.h" -#include "storage/freespace.h" #include "storage/indexfsm.h" -#include "storage/lmgr.h" #include "utils/memutils.h" +#include "varatt.h" /* Signature dealing macros - note i is assumed to be of type int */ #define GETWORD(x,i) ( *( (BloomSignatureWord *)(x) + ( (i) / SIGNWORDBITS ) ) ) diff --git a/contrib/bloom/blvacuum.c b/contrib/bloom/blvacuum.c index 0998240feaf..2a268fe0070 100644 --- a/contrib/bloom/blvacuum.c +++ b/contrib/bloom/blvacuum.c @@ -14,13 +14,9 @@ #include "access/genam.h" #include "bloom.h" -#include "catalog/storage.h" #include "commands/vacuum.h" -#include "miscadmin.h" -#include "postmaster/autovacuum.h" #include "storage/bufmgr.h" #include "storage/indexfsm.h" -#include "storage/lmgr.h" /* diff --git a/contrib/bloom/blvalidate.c b/contrib/bloom/blvalidate.c index 88c5a791975..20d3ab9109b 100644 --- a/contrib/bloom/blvalidate.c +++ b/contrib/bloom/blvalidate.c @@ -20,8 +20,6 @@ #include "catalog/pg_opclass.h" #include "catalog/pg_opfamily.h" #include "catalog/pg_type.h" -#include "utils/builtins.h" -#include "utils/lsyscache.h" #include "utils/regproc.h" #include "utils/syscache.h" diff --git a/contrib/btree_gin/btree_gin.c b/contrib/btree_gin/btree_gin.c index 5e27906f802..533c55e9eaf 100644 --- a/contrib/btree_gin/btree_gin.c +++ b/contrib/btree_gin/btree_gin.c @@ -7,15 +7,12 @@ #include "access/stratnum.h" #include "utils/builtins.h" -#include "utils/bytea.h" -#include "utils/cash.h" #include "utils/date.h" #include "utils/float.h" #include "utils/inet.h" #include "utils/numeric.h" #include "utils/timestamp.h" #include "utils/uuid.h" -#include "utils/varbit.h" PG_MODULE_MAGIC; diff --git a/contrib/btree_gist/btree_bit.c b/contrib/btree_gist/btree_bit.c index 6790f22b4b6..9d5e01a1977 100644 --- a/contrib/btree_gist/btree_bit.c +++ b/contrib/btree_gist/btree_bit.c @@ -5,8 +5,7 @@ #include "btree_gist.h" #include "btree_utils_var.h" -#include "utils/builtins.h" -#include "utils/bytea.h" +#include "utils/fmgrprotos.h" #include "utils/varbit.h" diff --git a/contrib/btree_gist/btree_bool.c b/contrib/btree_gist/btree_bool.c index 8b2af129b52..bdc7834bb6a 100644 --- a/contrib/btree_gist/btree_bool.c +++ b/contrib/btree_gist/btree_bool.c @@ -5,7 +5,6 @@ #include "btree_gist.h" #include "btree_utils_num.h" -#include "common/int.h" typedef struct boolkey { diff --git a/contrib/btree_gist/btree_bytea.c b/contrib/btree_gist/btree_bytea.c index 6b005f0157e..394e40ed16b 100644 --- a/contrib/btree_gist/btree_bytea.c +++ b/contrib/btree_gist/btree_bytea.c @@ -5,8 +5,7 @@ #include "btree_gist.h" #include "btree_utils_var.h" -#include "utils/builtins.h" -#include "utils/bytea.h" +#include "utils/fmgrprotos.h" /* diff --git a/contrib/btree_gist/btree_date.c b/contrib/btree_gist/btree_date.c index 68a4107dbf0..5efb5ef96f5 100644 --- a/contrib/btree_gist/btree_date.c +++ b/contrib/btree_gist/btree_date.c @@ -5,7 +5,7 @@ #include "btree_gist.h" #include "btree_utils_num.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/date.h" typedef struct diff --git a/contrib/btree_gist/btree_enum.c b/contrib/btree_gist/btree_enum.c index d4dc38a38e5..26682122f8e 100644 --- a/contrib/btree_gist/btree_enum.c +++ b/contrib/btree_gist/btree_enum.c @@ -6,7 +6,7 @@ #include "btree_gist.h" #include "btree_utils_num.h" #include "fmgr.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" /* enums are really Oids, so we just use the same structure */ diff --git a/contrib/btree_gist/btree_inet.c b/contrib/btree_gist/btree_inet.c index 2fb952dca83..c66ca99e0c3 100644 --- a/contrib/btree_gist/btree_inet.c +++ b/contrib/btree_gist/btree_inet.c @@ -7,7 +7,6 @@ #include "btree_utils_num.h" #include "catalog/pg_type.h" #include "utils/builtins.h" -#include "utils/inet.h" typedef struct inetkey { diff --git a/contrib/btree_gist/btree_interval.c b/contrib/btree_gist/btree_interval.c index 156f2cebac5..c2f6eede226 100644 --- a/contrib/btree_gist/btree_interval.c +++ b/contrib/btree_gist/btree_interval.c @@ -5,7 +5,7 @@ #include "btree_gist.h" #include "btree_utils_num.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/timestamp.h" typedef struct diff --git a/contrib/btree_gist/btree_macaddr.c b/contrib/btree_gist/btree_macaddr.c index 17290529c02..1367eaba735 100644 --- a/contrib/btree_gist/btree_macaddr.c +++ b/contrib/btree_gist/btree_macaddr.c @@ -5,7 +5,7 @@ #include "btree_gist.h" #include "btree_utils_num.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/inet.h" typedef struct diff --git a/contrib/btree_gist/btree_macaddr8.c b/contrib/btree_gist/btree_macaddr8.c index 796cc4efee3..9676e5a15bd 100644 --- a/contrib/btree_gist/btree_macaddr8.c +++ b/contrib/btree_gist/btree_macaddr8.c @@ -5,7 +5,7 @@ #include "btree_gist.h" #include "btree_utils_num.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/inet.h" typedef struct diff --git a/contrib/btree_gist/btree_text.c b/contrib/btree_gist/btree_text.c index be0eac7975b..28d6b5c9c2b 100644 --- a/contrib/btree_gist/btree_text.c +++ b/contrib/btree_gist/btree_text.c @@ -5,7 +5,8 @@ #include "btree_gist.h" #include "btree_utils_var.h" -#include "utils/builtins.h" +#include "mb/pg_wchar.h" +#include "utils/fmgrprotos.h" /* ** Text ops diff --git a/contrib/btree_gist/btree_time.c b/contrib/btree_gist/btree_time.c index d89401c0f51..3034bbb456b 100644 --- a/contrib/btree_gist/btree_time.c +++ b/contrib/btree_gist/btree_time.c @@ -5,7 +5,7 @@ #include "btree_gist.h" #include "btree_utils_num.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/date.h" #include "utils/timestamp.h" diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c index 3f5ba91891d..b3cf2d6f60d 100644 --- a/contrib/btree_gist/btree_ts.c +++ b/contrib/btree_gist/btree_ts.c @@ -7,8 +7,8 @@ #include "btree_gist.h" #include "btree_utils_num.h" -#include "utils/builtins.h" -#include "utils/datetime.h" +#include "utils/fmgrprotos.h" +#include "utils/timestamp.h" #include "utils/float.h" typedef struct diff --git a/contrib/btree_gist/btree_utils_num.h b/contrib/btree_gist/btree_utils_num.h index 11e892311ee..53e477d8b1e 100644 --- a/contrib/btree_gist/btree_utils_num.h +++ b/contrib/btree_gist/btree_utils_num.h @@ -9,7 +9,6 @@ #include "access/gist.h" #include "btree_gist.h" -#include "utils/rel.h" typedef char GBT_NUMKEY; diff --git a/contrib/btree_gist/btree_utils_var.c b/contrib/btree_gist/btree_utils_var.c index 0c0e952f736..d9df2356cd1 100644 --- a/contrib/btree_gist/btree_utils_var.c +++ b/contrib/btree_gist/btree_utils_var.c @@ -9,8 +9,7 @@ #include "btree_gist.h" #include "btree_utils_var.h" -#include "utils/builtins.h" -#include "utils/pg_locale.h" +#include "mb/pg_wchar.h" #include "utils/rel.h" /* used for key sorting */ diff --git a/contrib/btree_gist/btree_utils_var.h b/contrib/btree_gist/btree_utils_var.h index 2f8def655c8..9302d41ced6 100644 --- a/contrib/btree_gist/btree_utils_var.h +++ b/contrib/btree_gist/btree_utils_var.h @@ -6,7 +6,6 @@ #include "access/gist.h" #include "btree_gist.h" -#include "mb/pg_wchar.h" /* Variable length key */ typedef bytea GBT_VARKEY; diff --git a/contrib/citext/citext.c b/contrib/citext/citext.c index 26af935a70f..3c461ff2ff2 100644 --- a/contrib/citext/citext.c +++ b/contrib/citext/citext.c @@ -5,7 +5,7 @@ #include "catalog/pg_collation.h" #include "common/hashfn.h" -#include "utils/builtins.h" +#include "fmgr.h" #include "utils/formatting.h" #include "utils/varlena.h" #include "varatt.h" diff --git a/contrib/dict_xsyn/dict_xsyn.c b/contrib/dict_xsyn/dict_xsyn.c index 62d2d841417..3635ed1df84 100644 --- a/contrib/dict_xsyn/dict_xsyn.c +++ b/contrib/dict_xsyn/dict_xsyn.c @@ -16,7 +16,7 @@ #include "commands/defrem.h" #include "tsearch/ts_locale.h" -#include "tsearch/ts_utils.h" +#include "tsearch/ts_public.h" PG_MODULE_MAGIC; diff --git a/contrib/fuzzystrmatch/fuzzystrmatch.c b/contrib/fuzzystrmatch/fuzzystrmatch.c index 72ae2ab91b5..f243e2caed5 100644 --- a/contrib/fuzzystrmatch/fuzzystrmatch.c +++ b/contrib/fuzzystrmatch/fuzzystrmatch.c @@ -40,7 +40,6 @@ #include -#include "mb/pg_wchar.h" #include "utils/builtins.h" #include "utils/varlena.h" #include "varatt.h" diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c index 8fc6ad87fc7..8cf02c0e5da 100644 --- a/contrib/intarray/_int_bool.c +++ b/contrib/intarray/_int_bool.c @@ -5,7 +5,6 @@ #include "_int.h" #include "miscadmin.h" -#include "utils/builtins.h" PG_FUNCTION_INFO_V1(bqarr_in); PG_FUNCTION_INFO_V1(bqarr_out); diff --git a/contrib/intarray/_int_selfuncs.c b/contrib/intarray/_int_selfuncs.c index bc1ad3a8048..99179d0c6fc 100644 --- a/contrib/intarray/_int_selfuncs.c +++ b/contrib/intarray/_int_selfuncs.c @@ -20,10 +20,9 @@ #include "catalog/pg_statistic.h" #include "catalog/pg_type.h" #include "miscadmin.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/lsyscache.h" #include "utils/selfuncs.h" -#include "utils/syscache.h" PG_FUNCTION_INFO_V1(_int_overlap_sel); PG_FUNCTION_INFO_V1(_int_contains_sel); diff --git a/contrib/isn/isn.c b/contrib/isn/isn.c index 71a543b9478..15bcda200c5 100644 --- a/contrib/isn/isn.c +++ b/contrib/isn/isn.c @@ -21,7 +21,6 @@ #include "UPC.h" #include "fmgr.h" #include "isn.h" -#include "utils/builtins.h" PG_MODULE_MAGIC; diff --git a/contrib/lo/lo.c b/contrib/lo/lo.c index 457be26c4ed..62488e45f3a 100644 --- a/contrib/lo/lo.c +++ b/contrib/lo/lo.c @@ -9,7 +9,7 @@ #include "commands/trigger.h" #include "executor/spi.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/rel.h" PG_MODULE_MAGIC; diff --git a/contrib/ltree/ltree_io.c b/contrib/ltree/ltree_io.c index 0a12c77a621..11eefc809b2 100644 --- a/contrib/ltree/ltree_io.c +++ b/contrib/ltree/ltree_io.c @@ -10,7 +10,6 @@ #include "crc32.h" #include "libpq/pqformat.h" #include "ltree.h" -#include "utils/memutils.h" #include "varatt.h" diff --git a/contrib/ltree/ltree_op.c b/contrib/ltree/ltree_op.c index 24a21d3ea01..0e30dee4658 100644 --- a/contrib/ltree/ltree_op.c +++ b/contrib/ltree/ltree_op.c @@ -7,13 +7,11 @@ #include -#include "access/htup_details.h" -#include "catalog/pg_statistic.h" #include "common/hashfn.h" #include "ltree.h" #include "utils/builtins.h" -#include "utils/lsyscache.h" #include "utils/selfuncs.h" +#include "varatt.h" PG_MODULE_MAGIC; diff --git a/contrib/pageinspect/brinfuncs.c b/contrib/pageinspect/brinfuncs.c index 5a38d926689..22621d584fa 100644 --- a/contrib/pageinspect/brinfuncs.c +++ b/contrib/pageinspect/brinfuncs.c @@ -9,20 +9,16 @@ */ #include "postgres.h" -#include "access/brin.h" #include "access/brin_internal.h" #include "access/brin_page.h" -#include "access/brin_revmap.h" #include "access/brin_tuple.h" #include "access/htup_details.h" -#include "catalog/index.h" #include "catalog/pg_am_d.h" #include "catalog/pg_type.h" #include "funcapi.h" #include "lib/stringinfo.h" #include "miscadmin.h" #include "pageinspect.h" -#include "utils/array.h" #include "utils/builtins.h" #include "utils/lsyscache.h" #include "utils/rel.h" diff --git a/contrib/pageinspect/fsmfuncs.c b/contrib/pageinspect/fsmfuncs.c index f8ae0886244..31182144380 100644 --- a/contrib/pageinspect/fsmfuncs.c +++ b/contrib/pageinspect/fsmfuncs.c @@ -19,7 +19,7 @@ #include "postgres.h" -#include "funcapi.h" +#include "fmgr.h" #include "lib/stringinfo.h" #include "miscadmin.h" #include "pageinspect.h" diff --git a/contrib/pageinspect/ginfuncs.c b/contrib/pageinspect/ginfuncs.c index 1dabbdb5889..7182d225d96 100644 --- a/contrib/pageinspect/ginfuncs.c +++ b/contrib/pageinspect/ginfuncs.c @@ -9,17 +9,14 @@ */ #include "postgres.h" -#include "access/gin.h" #include "access/gin_private.h" #include "access/htup_details.h" -#include "catalog/namespace.h" #include "catalog/pg_type.h" #include "funcapi.h" #include "miscadmin.h" #include "pageinspect.h" #include "utils/array.h" #include "utils/builtins.h" -#include "utils/rel.h" PG_FUNCTION_INFO_V1(gin_metapage_info); diff --git a/contrib/pageinspect/gistfuncs.c b/contrib/pageinspect/gistfuncs.c index 1cc3b8c9e90..029072567a4 100644 --- a/contrib/pageinspect/gistfuncs.c +++ b/contrib/pageinspect/gistfuncs.c @@ -10,10 +10,8 @@ #include "postgres.h" #include "access/gist.h" -#include "access/gist_private.h" #include "access/htup.h" #include "access/relation.h" -#include "catalog/namespace.h" #include "catalog/pg_am_d.h" #include "funcapi.h" #include "miscadmin.h" @@ -25,7 +23,6 @@ #include "utils/pg_lsn.h" #include "utils/rel.h" #include "utils/ruleutils.h" -#include "utils/varlena.h" PG_FUNCTION_INFO_V1(gist_page_opaque_info); PG_FUNCTION_INFO_V1(gist_page_items); diff --git a/contrib/pageinspect/heapfuncs.c b/contrib/pageinspect/heapfuncs.c index 38a539dad1b..3dc705e43f7 100644 --- a/contrib/pageinspect/heapfuncs.c +++ b/contrib/pageinspect/heapfuncs.c @@ -32,7 +32,6 @@ #include "funcapi.h" #include "mb/pg_wchar.h" #include "miscadmin.h" -#include "pageinspect.h" #include "port/pg_bitutils.h" #include "utils/array.h" #include "utils/builtins.h" diff --git a/contrib/pg_freespacemap/pg_freespacemap.c b/contrib/pg_freespacemap/pg_freespacemap.c index b82cab2d97e..565167aaef0 100644 --- a/contrib/pg_freespacemap/pg_freespacemap.c +++ b/contrib/pg_freespacemap/pg_freespacemap.c @@ -9,7 +9,7 @@ #include "postgres.h" #include "access/relation.h" -#include "funcapi.h" +#include "fmgr.h" #include "storage/freespace.h" PG_MODULE_MAGIC; diff --git a/contrib/pg_prewarm/autoprewarm.c b/contrib/pg_prewarm/autoprewarm.c index d061731706a..fac4051e1aa 100644 --- a/contrib/pg_prewarm/autoprewarm.c +++ b/contrib/pg_prewarm/autoprewarm.c @@ -30,8 +30,6 @@ #include "access/relation.h" #include "access/xact.h" -#include "catalog/pg_class.h" -#include "catalog/pg_type.h" #include "pgstat.h" #include "postmaster/bgworker.h" #include "postmaster/interrupt.h" @@ -42,18 +40,13 @@ #include "storage/ipc.h" #include "storage/latch.h" #include "storage/lwlock.h" -#include "storage/proc.h" #include "storage/procsignal.h" -#include "storage/shmem.h" #include "storage/smgr.h" #include "tcop/tcopprot.h" -#include "utils/acl.h" -#include "utils/datetime.h" #include "utils/guc.h" -#include "utils/memutils.h" #include "utils/rel.h" #include "utils/relfilenumbermap.h" -#include "utils/resowner.h" +#include "utils/timestamp.h" #define AUTOPREWARM_FILE "autoprewarm.blocks" diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index 21b26b7b6ec..1798e1d016f 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -49,7 +49,6 @@ #include "access/parallel.h" #include "catalog/pg_authid.h" -#include "common/hashfn.h" #include "common/int.h" #include "executor/instrument.h" #include "funcapi.h" @@ -59,9 +58,7 @@ #include "nodes/queryjumble.h" #include "optimizer/planner.h" #include "parser/analyze.h" -#include "parser/parsetree.h" #include "parser/scanner.h" -#include "parser/scansup.h" #include "pgstat.h" #include "storage/fd.h" #include "storage/ipc.h" diff --git a/contrib/pg_surgery/heap_surgery.c b/contrib/pg_surgery/heap_surgery.c index 37dffe3f7d5..1513d76e4b5 100644 --- a/contrib/pg_surgery/heap_surgery.c +++ b/contrib/pg_surgery/heap_surgery.c @@ -12,11 +12,11 @@ */ #include "postgres.h" -#include "access/heapam.h" +#include "access/htup_details.h" +#include "access/relation.h" #include "access/visibilitymap.h" #include "access/xloginsert.h" #include "catalog/pg_am_d.h" -#include "catalog/pg_proc_d.h" #include "miscadmin.h" #include "storage/bufmgr.h" #include "utils/acl.h" diff --git a/contrib/pg_visibility/pg_visibility.c b/contrib/pg_visibility/pg_visibility.c index 724122b1bc5..5d0deaba61e 100644 --- a/contrib/pg_visibility/pg_visibility.c +++ b/contrib/pg_visibility/pg_visibility.c @@ -19,12 +19,10 @@ #include "funcapi.h" #include "miscadmin.h" #include "storage/bufmgr.h" -#include "storage/proc.h" #include "storage/procarray.h" #include "storage/read_stream.h" #include "storage/smgr.h" #include "utils/rel.h" -#include "utils/snapmgr.h" PG_MODULE_MAGIC; diff --git a/contrib/pgcrypto/pgcrypto.c b/contrib/pgcrypto/pgcrypto.c index 96447c57577..ebd76eed702 100644 --- a/contrib/pgcrypto/pgcrypto.c +++ b/contrib/pgcrypto/pgcrypto.c @@ -38,7 +38,6 @@ #include "px-crypt.h" #include "px.h" #include "utils/builtins.h" -#include "utils/uuid.h" #include "varatt.h" PG_MODULE_MAGIC; diff --git a/contrib/pgrowlocks/pgrowlocks.c b/contrib/pgrowlocks/pgrowlocks.c index adbc8279c3f..7e40ab21dda 100644 --- a/contrib/pgrowlocks/pgrowlocks.c +++ b/contrib/pgrowlocks/pgrowlocks.c @@ -37,7 +37,7 @@ #include "storage/bufmgr.h" #include "storage/procarray.h" #include "utils/acl.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/rel.h" #include "utils/snapmgr.h" #include "utils/varlena.h" diff --git a/contrib/pgstattuple/pgstatapprox.c b/contrib/pgstattuple/pgstatapprox.c index 04457f4b790..3a5aad30ae2 100644 --- a/contrib/pgstattuple/pgstatapprox.c +++ b/contrib/pgstattuple/pgstatapprox.c @@ -14,21 +14,15 @@ #include "access/heapam.h" #include "access/htup_details.h" -#include "access/multixact.h" #include "access/relation.h" -#include "access/transam.h" #include "access/visibilitymap.h" -#include "access/xact.h" -#include "catalog/namespace.h" #include "catalog/pg_am_d.h" #include "commands/vacuum.h" #include "funcapi.h" #include "miscadmin.h" #include "storage/bufmgr.h" #include "storage/freespace.h" -#include "storage/lmgr.h" #include "storage/procarray.h" -#include "utils/builtins.h" PG_FUNCTION_INFO_V1(pgstattuple_approx); PG_FUNCTION_INFO_V1(pgstattuple_approx_v1_5); diff --git a/contrib/pgstattuple/pgstatindex.c b/contrib/pgstattuple/pgstatindex.c index 1b6b768cf80..4b9d76ec4e4 100644 --- a/contrib/pgstattuple/pgstatindex.c +++ b/contrib/pgstattuple/pgstatindex.c @@ -32,14 +32,11 @@ #include "access/htup_details.h" #include "access/nbtree.h" #include "access/relation.h" -#include "access/table.h" #include "catalog/namespace.h" #include "catalog/pg_am.h" #include "funcapi.h" #include "miscadmin.h" #include "storage/bufmgr.h" -#include "storage/lmgr.h" -#include "utils/builtins.h" #include "utils/rel.h" #include "utils/varlena.h" diff --git a/contrib/pgstattuple/pgstattuple.c b/contrib/pgstattuple/pgstattuple.c index 1fff762753b..48cb8f59c4f 100644 --- a/contrib/pgstattuple/pgstattuple.c +++ b/contrib/pgstattuple/pgstattuple.c @@ -36,7 +36,6 @@ #include "miscadmin.h" #include "storage/bufmgr.h" #include "storage/lmgr.h" -#include "utils/builtins.h" #include "utils/varlena.h" PG_MODULE_MAGIC; diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c index 2e5303eac12..2326f391d34 100644 --- a/contrib/postgres_fdw/connection.c +++ b/contrib/postgres_fdw/connection.c @@ -16,7 +16,6 @@ #include #endif -#include "access/htup_details.h" #include "access/xact.h" #include "catalog/pg_user_mapping.h" #include "commands/defrem.h" @@ -27,13 +26,10 @@ #include "miscadmin.h" #include "pgstat.h" #include "postgres_fdw.h" -#include "storage/fd.h" #include "storage/latch.h" #include "utils/builtins.h" -#include "utils/datetime.h" #include "utils/hsearch.h" #include "utils/inval.h" -#include "utils/memutils.h" #include "utils/syscache.h" /* diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c index fb590c87e67..4680d517331 100644 --- a/contrib/postgres_fdw/deparse.c +++ b/contrib/postgres_fdw/deparse.c @@ -47,8 +47,6 @@ #include "catalog/pg_ts_dict.h" #include "catalog/pg_type.h" #include "commands/defrem.h" -#include "commands/tablecmds.h" -#include "nodes/makefuncs.h" #include "nodes/nodeFuncs.h" #include "nodes/plannodes.h" #include "optimizer/optimizer.h" diff --git a/contrib/postgres_fdw/option.c b/contrib/postgres_fdw/option.c index d740893918c..ed11126c09e 100644 --- a/contrib/postgres_fdw/option.c +++ b/contrib/postgres_fdw/option.c @@ -20,7 +20,6 @@ #include "commands/extension.h" #include "libpq/libpq-be.h" #include "postgres_fdw.h" -#include "utils/builtins.h" #include "utils/guc.h" #include "utils/varlena.h" diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index adc62576d1f..53733d642d0 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -17,11 +17,9 @@ #include "access/htup_details.h" #include "access/sysattr.h" #include "access/table.h" -#include "catalog/pg_class.h" #include "catalog/pg_opfamily.h" #include "commands/defrem.h" #include "commands/explain.h" -#include "commands/vacuum.h" #include "executor/execAsync.h" #include "foreign/fdwapi.h" #include "funcapi.h" @@ -29,7 +27,6 @@ #include "nodes/makefuncs.h" #include "nodes/nodeFuncs.h" #include "optimizer/appendinfo.h" -#include "optimizer/clauses.h" #include "optimizer/cost.h" #include "optimizer/inherit.h" #include "optimizer/optimizer.h" diff --git a/contrib/spi/moddatetime.c b/contrib/spi/moddatetime.c index 3eb7004de97..5130804ce2a 100644 --- a/contrib/spi/moddatetime.c +++ b/contrib/spi/moddatetime.c @@ -19,7 +19,7 @@ OH, me, I'm Terry Mackintosh #include "catalog/pg_type.h" #include "commands/trigger.h" #include "executor/spi.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/rel.h" PG_MODULE_MAGIC; diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c index 2a25607a2ad..d41b353a6de 100644 --- a/contrib/tablefunc/tablefunc.c +++ b/contrib/tablefunc/tablefunc.c @@ -38,6 +38,7 @@ #include "catalog/pg_type.h" #include "common/pg_prng.h" #include "executor/spi.h" +#include "fmgr.h" #include "funcapi.h" #include "lib/stringinfo.h" #include "miscadmin.h" diff --git a/contrib/tablefunc/tablefunc.h b/contrib/tablefunc/tablefunc.h index 2009382ce7d..b78030044b5 100644 --- a/contrib/tablefunc/tablefunc.h +++ b/contrib/tablefunc/tablefunc.h @@ -34,6 +34,4 @@ #ifndef TABLEFUNC_H #define TABLEFUNC_H -#include "fmgr.h" - #endif /* TABLEFUNC_H */ diff --git a/contrib/tsm_system_rows/tsm_system_rows.c b/contrib/tsm_system_rows/tsm_system_rows.c index a9f5d657d1c..ecfd1102d7a 100644 --- a/contrib/tsm_system_rows/tsm_system_rows.c +++ b/contrib/tsm_system_rows/tsm_system_rows.c @@ -28,7 +28,6 @@ #include "postgres.h" -#include "access/relscan.h" #include "access/tsmapi.h" #include "catalog/pg_type.h" #include "miscadmin.h" diff --git a/contrib/tsm_system_time/tsm_system_time.c b/contrib/tsm_system_time/tsm_system_time.c index f187fd77655..093682a9155 100644 --- a/contrib/tsm_system_time/tsm_system_time.c +++ b/contrib/tsm_system_time/tsm_system_time.c @@ -26,7 +26,6 @@ #include -#include "access/relscan.h" #include "access/tsmapi.h" #include "catalog/pg_type.h" #include "miscadmin.h" diff --git a/contrib/unaccent/unaccent.c b/contrib/unaccent/unaccent.c index 707962305f8..0217696aac1 100644 --- a/contrib/unaccent/unaccent.c +++ b/contrib/unaccent/unaccent.c @@ -13,7 +13,6 @@ #include "postgres.h" -#include "catalog/namespace.h" #include "catalog/pg_ts_dict.h" #include "commands/defrem.h" #include "lib/stringinfo.h" @@ -22,7 +21,6 @@ #include "tsearch/ts_public.h" #include "utils/builtins.h" #include "utils/lsyscache.h" -#include "utils/regproc.h" #include "utils/syscache.h" PG_MODULE_MAGIC; diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c index ef78aa00c88..f7e3f485fe1 100644 --- a/contrib/xml2/xpath.c +++ b/contrib/xml2/xpath.c @@ -11,7 +11,6 @@ #include "fmgr.h" #include "funcapi.h" #include "lib/stringinfo.h" -#include "miscadmin.h" #include "utils/builtins.h" #include "utils/xml.h" diff --git a/contrib/xml2/xslt_proc.c b/contrib/xml2/xslt_proc.c index e761ca5cb5f..b720d89f754 100644 --- a/contrib/xml2/xslt_proc.c +++ b/contrib/xml2/xslt_proc.c @@ -7,10 +7,7 @@ */ #include "postgres.h" -#include "executor/spi.h" #include "fmgr.h" -#include "funcapi.h" -#include "miscadmin.h" #include "utils/builtins.h" #include "utils/xml.h" -- 2.47.0