summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorAmit Kapila2019-11-25 02:38:57 +0000
committerAmit Kapila2019-11-25 02:38:57 +0000
commite0487223ecac9cbb7f673e4ff6d2e4086e591abf (patch)
tree31eda4c126c75e7915b451cbbfb739984b68c9be /src/bin
parent2aa84520b3508dda273b9bbffab7bf87f0d98bf8 (diff)
Make the order of the header file includes consistent.
Similar to commits 14aec03502, 7e735035f2 and dddf4cdc33, this commit makes the order of header file inclusion consistent in more places. Author: Vignesh C Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/CALDaNm2Sznv8RR6Ex-iJO6xAdsxgWhCoETkaYX=+9DW3q0QCfA@mail.gmail.com
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/pg_basebackup/receivelog.h3
-rw-r--r--src/bin/pg_basebackup/streamutil.h3
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.h4
-rw-r--r--src/bin/pg_rewind/datapagemap.h3
-rw-r--r--src/bin/pg_rewind/filemap.h5
-rw-r--r--src/bin/pg_rewind/pg_rewind.h4
-rw-r--r--src/bin/pg_waldump/pg_waldump.c2
-rw-r--r--src/bin/psql/command.c16
-rw-r--r--src/bin/psql/command.h3
-rw-r--r--src/bin/psql/common.h2
-rw-r--r--src/bin/psql/prompt.h2
-rw-r--r--src/bin/psql/settings.h3
-rw-r--r--src/bin/psql/tab-complete.c6
-rw-r--r--src/bin/scripts/common.h2
14 files changed, 23 insertions, 35 deletions
diff --git a/src/bin/pg_basebackup/receivelog.h b/src/bin/pg_basebackup/receivelog.h
index b6e2743f554..edf1ce669f0 100644
--- a/src/bin/pg_basebackup/receivelog.h
+++ b/src/bin/pg_basebackup/receivelog.h
@@ -12,11 +12,10 @@
#ifndef RECEIVELOG_H
#define RECEIVELOG_H
+#include "access/xlogdefs.h"
#include "libpq-fe.h"
#include "walmethods.h"
-#include "access/xlogdefs.h"
-
/*
* Called before trying to read more data or when a segment is
* finished. Return true to stop streaming.
diff --git a/src/bin/pg_basebackup/streamutil.h b/src/bin/pg_basebackup/streamutil.h
index a756eee262c..1edfc944458 100644
--- a/src/bin/pg_basebackup/streamutil.h
+++ b/src/bin/pg_basebackup/streamutil.h
@@ -12,10 +12,9 @@
#ifndef STREAMUTIL_H
#define STREAMUTIL_H
-#include "libpq-fe.h"
-
#include "access/xlogdefs.h"
#include "datatype/timestamp.h"
+#include "libpq-fe.h"
extern const char *progname;
extern char *connection_string;
diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h
index fa2c6eff5ad..6768f92976b 100644
--- a/src/bin/pg_dump/pg_backup_archiver.h
+++ b/src/bin/pg_dump/pg_backup_archiver.h
@@ -24,12 +24,10 @@
#ifndef __PG_BACKUP_ARCHIVE__
#define __PG_BACKUP_ARCHIVE__
-
#include <time.h>
-#include "pg_backup.h"
-
#include "libpq-fe.h"
+#include "pg_backup.h"
#include "pqexpbuffer.h"
#define LOBBUFSIZE 16384
diff --git a/src/bin/pg_rewind/datapagemap.h b/src/bin/pg_rewind/datapagemap.h
index c2baaae644a..d5bcfa6ea93 100644
--- a/src/bin/pg_rewind/datapagemap.h
+++ b/src/bin/pg_rewind/datapagemap.h
@@ -9,9 +9,8 @@
#ifndef DATAPAGEMAP_H
#define DATAPAGEMAP_H
-#include "storage/relfilenode.h"
#include "storage/block.h"
-
+#include "storage/relfilenode.h"
struct datapagemap
{
diff --git a/src/bin/pg_rewind/filemap.h b/src/bin/pg_rewind/filemap.h
index 588228404cd..0aa822dcaec 100644
--- a/src/bin/pg_rewind/filemap.h
+++ b/src/bin/pg_rewind/filemap.h
@@ -8,10 +8,9 @@
#ifndef FILEMAP_H
#define FILEMAP_H
-#include "storage/relfilenode.h"
-#include "storage/block.h"
-
#include "datapagemap.h"
+#include "storage/block.h"
+#include "storage/relfilenode.h"
/*
* For every file found in the local or remote system, we have a file entry
diff --git a/src/bin/pg_rewind/pg_rewind.h b/src/bin/pg_rewind/pg_rewind.h
index aa3a0ce8fc5..360b2b3da89 100644
--- a/src/bin/pg_rewind/pg_rewind.h
+++ b/src/bin/pg_rewind/pg_rewind.h
@@ -11,15 +11,13 @@
#ifndef PG_REWIND_H
#define PG_REWIND_H
-#include "datapagemap.h"
-
#include "access/timeline.h"
#include "common/logging.h"
+#include "datapagemap.h"
#include "libpq-fe.h"
#include "storage/block.h"
#include "storage/relfilenode.h"
-
/* Configuration options */
extern char *datadir_target;
extern char *datadir_source;
diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c
index 1524e5eb1ef..d6695f7196f 100644
--- a/src/bin/pg_waldump/pg_waldump.c
+++ b/src/bin/pg_waldump/pg_waldump.c
@@ -16,10 +16,10 @@
#include <sys/stat.h>
#include <unistd.h>
+#include "access/transam.h"
#include "access/xlog_internal.h"
#include "access/xlogreader.h"
#include "access/xlogrecord.h"
-#include "access/transam.h"
#include "common/fe_memutils.h"
#include "common/logging.h"
#include "getopt_long.h"
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 7f57da8cc50..0a2597046d6 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -6,7 +6,6 @@
* src/bin/psql/command.c
*/
#include "postgres_fe.h"
-#include "command.h"
#include <ctype.h>
#include <time.h>
@@ -24,22 +23,21 @@
#endif
#include "catalog/pg_class_d.h"
-#include "portability/instr_time.h"
-
-#include "libpq-fe.h"
-#include "pqexpbuffer.h"
-#include "common/logging.h"
-#include "fe_utils/print.h"
-#include "fe_utils/string_utils.h"
-
+#include "command.h"
#include "common.h"
+#include "common/logging.h"
#include "copy.h"
#include "crosstabview.h"
#include "describe.h"
+#include "fe_utils/print.h"
+#include "fe_utils/string_utils.h"
#include "help.h"
#include "input.h"
#include "large_obj.h"
+#include "libpq-fe.h"
#include "mainloop.h"
+#include "portability/instr_time.h"
+#include "pqexpbuffer.h"
#include "psqlscanslash.h"
#include "settings.h"
#include "variables.h"
diff --git a/src/bin/psql/command.h b/src/bin/psql/command.h
index 33791b6ff8b..6d39b90c230 100644
--- a/src/bin/psql/command.h
+++ b/src/bin/psql/command.h
@@ -8,10 +8,9 @@
#ifndef COMMAND_H
#define COMMAND_H
+#include "fe_utils/conditional.h"
#include "fe_utils/print.h"
#include "fe_utils/psqlscan.h"
-#include "fe_utils/conditional.h"
-
typedef enum _backslashResult
{
diff --git a/src/bin/psql/common.h b/src/bin/psql/common.h
index 282a520116a..292dc549190 100644
--- a/src/bin/psql/common.h
+++ b/src/bin/psql/common.h
@@ -10,9 +10,9 @@
#include <setjmp.h>
-#include "libpq-fe.h"
#include "fe_utils/print.h"
#include "fe_utils/psqlscan.h"
+#include "libpq-fe.h"
extern bool openQueryOutputFile(const char *fname, FILE **fout, bool *is_pipe);
extern bool setQFout(const char *fname);
diff --git a/src/bin/psql/prompt.h b/src/bin/psql/prompt.h
index 905ee3d88f8..683e3617bad 100644
--- a/src/bin/psql/prompt.h
+++ b/src/bin/psql/prompt.h
@@ -8,9 +8,9 @@
#ifndef PROMPT_H
#define PROMPT_H
+#include "fe_utils/conditional.h"
/* enum promptStatus_t is now defined by psqlscan.h */
#include "fe_utils/psqlscan.h"
-#include "fe_utils/conditional.h"
char *get_prompt(promptStatus_t status, ConditionalStack cstack);
diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h
index 5be5091f0e9..7cd6d5f5b43 100644
--- a/src/bin/psql/settings.h
+++ b/src/bin/psql/settings.h
@@ -8,9 +8,8 @@
#ifndef SETTINGS_H
#define SETTINGS_H
-
-#include "variables.h"
#include "fe_utils/print.h"
+#include "variables.h"
#define DEFAULT_CSV_FIELD_SEP ','
#define DEFAULT_FIELD_SEP "|"
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 172e00b46ef..df268269939 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -33,8 +33,9 @@
*/
#include "postgres_fe.h"
-#include "tab-complete.h"
+
#include "input.h"
+#include "tab-complete.h"
/* If we don't have this, we might as well forget about the whole thing: */
#ifdef USE_READLINE
@@ -43,10 +44,9 @@
#include "catalog/pg_am_d.h"
#include "catalog/pg_class_d.h"
-
+#include "common.h"
#include "libpq-fe.h"
#include "pqexpbuffer.h"
-#include "common.h"
#include "settings.h"
#include "stringutils.h"
diff --git a/src/bin/scripts/common.h b/src/bin/scripts/common.h
index f36b26a5765..b8580f927a5 100644
--- a/src/bin/scripts/common.h
+++ b/src/bin/scripts/common.h
@@ -10,8 +10,8 @@
#define COMMON_H
#include "common/username.h"
-#include "libpq-fe.h"
#include "getopt_long.h" /* pgrminclude ignore */
+#include "libpq-fe.h"
#include "pqexpbuffer.h" /* pgrminclude ignore */
enum trivalue