diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2024-03-04 12:00:11 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2024-03-04 12:02:20 +0100 |
commit | dbbca2cf299b81299112ca6ada671a36235ec008 (patch) | |
tree | aac5368f0983f682c6a31b6bc6140cd89b50fe3c /src/backend/access/spgist | |
parent | 24eebc65c26cfcc0ea5b8a95b61fa2fda6118e68 (diff) | |
download | postgresql-dbbca2cf299b81299112ca6ada671a36235ec008.tar.gz postgresql-dbbca2cf299b81299112ca6ada671a36235ec008.zip |
Remove unused #include's from backend .c files
as determined by include-what-you-use (IWYU)
While IWYU also suggests to *add* a bunch of #include's (which is its
main purpose), this patch does not do that. In some cases, a more
specific #include replaces another less specific one.
Some manual adjustments of the automatic result:
- IWYU currently doesn't know about includes that provide global
variable declarations (like -Wmissing-variable-declarations), so
those includes are being kept manually.
- All includes for port(ability) headers are being kept for now, to
play it safe.
- No changes of catalog/pg_foo.h to catalog/pg_foo_d.h, to keep the
patch from exploding in size.
Note that this patch touches just *.c files, so nothing declared in
header files changes in hidden ways.
As a small example, in src/backend/access/transam/rmgr.c, some IWYU
pragma annotations are added to handle a special case there.
Discussion: https://www.postgresql.org/message-id/flat/af837490-6b2f-46df-ba05-37ea6a6653fc%40eisentraut.org
Diffstat (limited to 'src/backend/access/spgist')
-rw-r--r-- | src/backend/access/spgist/spginsert.c | 4 | ||||
-rw-r--r-- | src/backend/access/spgist/spgkdtreeproc.c | 2 | ||||
-rw-r--r-- | src/backend/access/spgist/spgproc.c | 2 | ||||
-rw-r--r-- | src/backend/access/spgist/spgquadtreeproc.c | 2 | ||||
-rw-r--r-- | src/backend/access/spgist/spgtextproc.c | 2 | ||||
-rw-r--r-- | src/backend/access/spgist/spgutils.c | 4 | ||||
-rw-r--r-- | src/backend/access/spgist/spgvacuum.c | 1 | ||||
-rw-r--r-- | src/backend/access/spgist/spgvalidate.c | 2 | ||||
-rw-r--r-- | src/backend/access/spgist/spgxlog.c | 2 |
9 files changed, 8 insertions, 13 deletions
diff --git a/src/backend/access/spgist/spginsert.c b/src/backend/access/spgist/spginsert.c index 1b70c5a59fd..1bec19c2b88 100644 --- a/src/backend/access/spgist/spginsert.c +++ b/src/backend/access/spgist/spginsert.c @@ -18,12 +18,10 @@ #include "access/genam.h" #include "access/spgist_private.h" -#include "access/spgxlog.h" #include "access/tableam.h" -#include "access/xlog.h" #include "access/xloginsert.h" -#include "catalog/index.h" #include "miscadmin.h" +#include "nodes/execnodes.h" #include "storage/bufmgr.h" #include "storage/bulk_write.h" #include "utils/memutils.h" diff --git a/src/backend/access/spgist/spgkdtreeproc.c b/src/backend/access/spgist/spgkdtreeproc.c index 900fe0d2af5..44d05452520 100644 --- a/src/backend/access/spgist/spgkdtreeproc.c +++ b/src/backend/access/spgist/spgkdtreeproc.c @@ -19,8 +19,8 @@ #include "access/spgist_private.h" #include "access/stratnum.h" #include "catalog/pg_type.h" -#include "utils/builtins.h" #include "utils/float.h" +#include "utils/fmgrprotos.h" #include "utils/geo_decls.h" diff --git a/src/backend/access/spgist/spgproc.c b/src/backend/access/spgist/spgproc.c index e7797067292..89699e7e7ff 100644 --- a/src/backend/access/spgist/spgproc.c +++ b/src/backend/access/spgist/spgproc.c @@ -18,8 +18,8 @@ #include <math.h> #include "access/spgist_private.h" -#include "utils/builtins.h" #include "utils/float.h" +#include "utils/fmgrprotos.h" #include "utils/geo_decls.h" #define point_point_distance(p1,p2) \ diff --git a/src/backend/access/spgist/spgquadtreeproc.c b/src/backend/access/spgist/spgquadtreeproc.c index 3543936fbc3..791db1d42e0 100644 --- a/src/backend/access/spgist/spgquadtreeproc.c +++ b/src/backend/access/spgist/spgquadtreeproc.c @@ -19,8 +19,8 @@ #include "access/spgist_private.h" #include "access/stratnum.h" #include "catalog/pg_type.h" -#include "utils/builtins.h" #include "utils/float.h" +#include "utils/fmgrprotos.h" #include "utils/geo_decls.h" Datum diff --git a/src/backend/access/spgist/spgtextproc.c b/src/backend/access/spgist/spgtextproc.c index d5db5225a9c..06042feb115 100644 --- a/src/backend/access/spgist/spgtextproc.c +++ b/src/backend/access/spgist/spgtextproc.c @@ -43,8 +43,8 @@ #include "common/int.h" #include "catalog/pg_type.h" #include "mb/pg_wchar.h" -#include "utils/builtins.h" #include "utils/datum.h" +#include "utils/fmgrprotos.h" #include "utils/pg_locale.h" #include "utils/varlena.h" #include "varatt.h" diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c index 5b5e6e82d39..3f793125f74 100644 --- a/src/backend/access/spgist/spgutils.c +++ b/src/backend/access/spgist/spgutils.c @@ -28,11 +28,11 @@ #include "parser/parse_coerce.h" #include "storage/bufmgr.h" #include "storage/indexfsm.h" -#include "storage/lmgr.h" -#include "utils/builtins.h" #include "utils/catcache.h" +#include "utils/fmgrprotos.h" #include "utils/index_selfuncs.h" #include "utils/lsyscache.h" +#include "utils/rel.h" #include "utils/syscache.h" diff --git a/src/backend/access/spgist/spgvacuum.c b/src/backend/access/spgist/spgvacuum.c index ff82b97dd88..d2e1624924a 100644 --- a/src/backend/access/spgist/spgvacuum.c +++ b/src/backend/access/spgist/spgvacuum.c @@ -20,7 +20,6 @@ #include "access/spgxlog.h" #include "access/transam.h" #include "access/xloginsert.h" -#include "catalog/storage_xlog.h" #include "commands/vacuum.h" #include "miscadmin.h" #include "storage/bufmgr.h" diff --git a/src/backend/access/spgist/spgvalidate.c b/src/backend/access/spgist/spgvalidate.c index 8834f22ba85..850c3b675d6 100644 --- a/src/backend/access/spgist/spgvalidate.c +++ b/src/backend/access/spgist/spgvalidate.c @@ -15,7 +15,7 @@ #include "access/amvalidate.h" #include "access/htup_details.h" -#include "access/spgist_private.h" +#include "access/spgist.h" #include "catalog/pg_amop.h" #include "catalog/pg_amproc.h" #include "catalog/pg_opclass.h" diff --git a/src/backend/access/spgist/spgxlog.c b/src/backend/access/spgist/spgxlog.c index 3ca7d18868c..11d006998ed 100644 --- a/src/backend/access/spgist/spgxlog.c +++ b/src/backend/access/spgist/spgxlog.c @@ -17,8 +17,6 @@ #include "access/bufmask.h" #include "access/spgist_private.h" #include "access/spgxlog.h" -#include "access/transam.h" -#include "access/xlog.h" #include "access/xlogutils.h" #include "storage/standby.h" #include "utils/memutils.h" |