1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-06 19:59:18 +03:00

Remove unused #include's from bin .c files

as determined by IWYU

Similar to commit dbbca2cf299, but for bin and some related files.

Discussion: https://www.postgresql.org/message-id/flat/0df1d5b1-8ca8-4f84-93be-121081bde049%40eisentraut.org
This commit is contained in:
Peter Eisentraut 2024-11-06 11:06:58 +01:00
parent ba08edb065
commit ecb5af7798
39 changed files with 10 additions and 57 deletions

@ -13,14 +13,13 @@
#include "postgres_fe.h"
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <time.h>
#include "catalog/pg_authid_d.h"
#include "common/connect.h"
#include "common/controldata_utils.h"
#include "common/file_perm.h"
#include "common/logging.h"
#include "common/pg_prng.h"
#include "common/restricted_token.h"

@ -18,8 +18,6 @@
#include <sys/stat.h>
#include <unistd.h>
#include "access/xlog_internal.h"
#include "common/fe_memutils.h"
#include "common/file_perm.h"
#include "common/logging.h"
#include "fe_utils/option_utils.h"

@ -19,7 +19,6 @@
#include <unistd.h>
#include "access/xlog_internal.h"
#include "common/file_utils.h"
#include "common/logging.h"
#include "libpq-fe.h"
#include "receivelog.h"

@ -19,14 +19,12 @@
#include "access/xlog_internal.h"
#include "common/connect.h"
#include "common/fe_memutils.h"
#include "common/file_perm.h"
#include "common/logging.h"
#include "common/string.h"
#include "datatype/timestamp.h"
#include "port/pg_bswap.h"
#include "pqexpbuffer.h"
#include "receivelog.h"
#include "streamutil.h"
#define ERRCODE_DUPLICATE_OBJECT "42710"

@ -11,6 +11,7 @@
#include "postgres_fe.h"
#include <fcntl.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
@ -26,8 +27,7 @@
#include "common/file_utils.h"
#include "common/logging.h"
#include "pgtar.h"
#include "receivelog.h"
#include "streamutil.h"
#include "walmethods.h"
/* Size of zlib buffer for .tar.gz */
#define ZLIB_OUT_SIZE 4096

@ -21,7 +21,6 @@
#include <unistd.h>
#include "common/controldata_utils.h"
#include "common/file_perm.h"
#include "common/file_utils.h"
#include "common/logging.h"
#include "common/relpath.h"

@ -13,7 +13,6 @@
#include "c.h"
#include "common/checksum_helper.h"
#include "common/file_utils.h"
/*
* Enumeration to denote copy modes.

@ -25,12 +25,12 @@
#endif
#include "backup_label.h"
#include "common/blkreftable.h"
#include "common/checksum_helper.h"
#include "common/controldata_utils.h"
#include "common/file_perm.h"
#include "common/file_utils.h"
#include "common/logging.h"
#include "common/relpath.h"
#include "copy_file.h"
#include "fe_utils/option_utils.h"
#include "getopt_long.h"

@ -25,7 +25,6 @@
#include "postgres_fe.h"
#include "common/config_info.h"
#include "port.h"
static const char *progname;

@ -27,8 +27,6 @@
#include "catalog/pg_subscription_d.h"
#include "catalog/pg_type_d.h"
#include "common/hashfn.h"
#include "fe_utils/string_utils.h"
#include "pg_backup_archiver.h"
#include "pg_backup_utils.h"
#include "pg_dump.h"

@ -70,7 +70,6 @@
#include "compress_lz4.h"
#include "compress_none.h"
#include "compress_zstd.h"
#include "pg_backup_utils.h"
/*----------------------
* Generic functions

@ -13,7 +13,6 @@
*/
#include "postgres_fe.h"
#include "common/fe_memutils.h"
#include "common/logging.h"
#include "common/string.h"
#include "filter.h"

@ -63,7 +63,9 @@
#include "fe_utils/string_utils.h"
#include "parallel.h"
#include "pg_backup_utils.h"
#ifdef WIN32
#include "port/pg_bswap.h"
#endif
/* Mnemonic macros for indexing the fd array returned by pipe(2) */
#define PIPE_READ 0

@ -27,7 +27,6 @@
#include "common/file_utils.h"
#include "compress_io.h"
#include "parallel.h"
#include "pg_backup_utils.h"
/*--------

@ -19,8 +19,6 @@
#include "common/connect.h"
#include "common/string.h"
#include "dumputils.h"
#include "fe_utils/string_utils.h"
#include "parallel.h"
#include "pg_backup_archiver.h"
#include "pg_backup_db.h"

@ -13,7 +13,9 @@
*/
#include "postgres_fe.h"
#ifdef WIN32
#include "parallel.h"
#endif
#include "pg_backup_utils.h"
/* Globals exported by this file */

@ -49,10 +49,8 @@
#include "catalog/pg_class_d.h"
#include "catalog/pg_default_acl_d.h"
#include "catalog/pg_largeobject_d.h"
#include "catalog/pg_largeobject_metadata_d.h"
#include "catalog/pg_proc_d.h"
#include "catalog/pg_subscription.h"
#include "catalog/pg_trigger_d.h"
#include "catalog/pg_type_d.h"
#include "common/connect.h"
#include "common/int.h"

@ -18,7 +18,6 @@
#include "catalog/pg_class_d.h"
#include "common/int.h"
#include "lib/binaryheap.h"
#include "pg_backup_archiver.h"
#include "pg_backup_utils.h"
#include "pg_dump.h"

@ -45,7 +45,6 @@
#include <termios.h>
#endif
#include "dumputils.h"
#include "fe_utils/option_utils.h"
#include "filter.h"
#include "getopt_long.h"

@ -10,7 +10,6 @@
#define DATAPAGEMAP_H
#include "storage/block.h"
#include "storage/relfilelocator.h"
struct datapagemap
{

@ -11,7 +11,6 @@
#include "catalog/pg_type_d.h"
#include "common/connect.h"
#include "datapagemap.h"
#include "file_ops.h"
#include "filemap.h"
#include "lib/stringinfo.h"

@ -12,10 +12,8 @@
#include <fcntl.h>
#include <unistd.h>
#include "datapagemap.h"
#include "common/logging.h"
#include "file_ops.h"
#include "filemap.h"
#include "pg_rewind.h"
#include "rewind_source.h"
typedef struct

@ -14,10 +14,6 @@
#include "access/timeline.h"
#include "common/logging.h"
#include "common/file_utils.h"
#include "datapagemap.h"
#include "libpq-fe.h"
#include "storage/block.h"
#include "storage/relfilelocator.h"
/* Configuration options */
extern char *datadir_target;

@ -19,7 +19,6 @@
#include <unistd.h>
#include <signal.h>
#include "access/xlogdefs.h"
#include "common/logging.h"
#include "common/pg_prng.h"
#include "getopt_long.h"

@ -11,9 +11,7 @@
#include "catalog/pg_authid_d.h"
#include "catalog/pg_class_d.h"
#include "catalog/pg_collation.h"
#include "fe_utils/string_utils.h"
#include "mb/pg_wchar.h"
#include "pg_upgrade.h"
static void check_new_cluster_is_empty(void);

@ -11,8 +11,6 @@
#include <sys/stat.h>
#include "access/transam.h"
#include "catalog/pg_class_d.h"
#include "pg_upgrade.h"
static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);

@ -20,7 +20,6 @@
#include "common/logging.h"
#include "fe_utils/option_utils.h"
#include "getopt_long.h"
#include "lib/stringinfo.h"
typedef struct ws_options
{

@ -30,7 +30,6 @@
#include "common/logging.h"
#include "common/string.h"
#include "copy.h"
#include "crosstabview.h"
#include "describe.h"
#include "fe_utils/cancel.h"
#include "fe_utils/print.h"
@ -38,10 +37,8 @@
#include "help.h"
#include "input.h"
#include "large_obj.h"
#include "libpq-fe.h"
#include "libpq/pqcomm.h"
#include "mainloop.h"
#include "portability/instr_time.h"
#include "pqexpbuffer.h"
#include "psqlscanslash.h"
#include "settings.h"

@ -27,7 +27,6 @@
#include "fe_utils/print.h"
#include "fe_utils/string_utils.h"
#include "settings.h"
#include "variables.h"
static const char *map_typename_pattern(const char *pattern);
static bool describeOneTableDetails(const char *schemaname,

@ -21,9 +21,6 @@
#include <termios.h>
#endif
#include "common.h"
#include "common/logging.h"
#include "common/username.h"
#include "help.h"
#include "input.h"
#include "settings.h"

@ -16,7 +16,6 @@
#include "fe_utils/option_utils.h"
#include "fe_utils/query_utils.h"
#include "fe_utils/simple_list.h"
#include "fe_utils/string_utils.h"
static void cluster_one_database(const ConnParams *cparams, const char *table,

@ -21,7 +21,6 @@
#include "common/connect.h"
#include "common/logging.h"
#include "common/string.h"
#include "fe_utils/cancel.h"
#include "fe_utils/query_utils.h"
#include "fe_utils/string_utils.h"

@ -15,7 +15,6 @@
#include "catalog/pg_class_d.h"
#include "common.h"
#include "common/connect.h"
#include "common/logging.h"
#include "fe_utils/cancel.h"
#include "fe_utils/option_utils.h"

@ -28,8 +28,8 @@
#include "access/xlog_internal.h"
#include "catalog/pg_control.h"
#include "common/controldata_utils.h"
#include "common/file_perm.h"
#ifdef FRONTEND
#include "common/file_perm.h"
#include "common/logging.h"
#endif
#include "port/pg_crc32c.h"

@ -22,7 +22,6 @@
#endif
#include "common/string.h"
#include "lib/stringinfo.h"
/*

@ -17,7 +17,6 @@
#include "common/unicode_case.h"
#include "common/unicode_case_table.h"
#include "common/unicode_category.h"
#include "mb/pg_wchar.h"
static const pg_case_map *find_case_map(pg_wchar ucs);

@ -19,7 +19,6 @@
#include "common/file_perm.h"
#include "common/logging.h"
#include "common/string.h"
#include "fe_utils/astreamer.h"
typedef struct astreamer_plain_writer

@ -32,9 +32,7 @@
#include <zlib.h>
#endif
#include "common/file_perm.h"
#include "common/logging.h"
#include "common/string.h"
#include "fe_utils/astreamer.h"
#ifdef HAVE_LIBZ

@ -21,9 +21,7 @@
#include <lz4frame.h>
#endif
#include "common/file_perm.h"
#include "common/logging.h"
#include "common/string.h"
#include "fe_utils/astreamer.h"
#ifdef USE_LZ4