mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
Make the order of the header file includes consistent in non-backend modules.
Similar to commit 7e735035f2
, this commit makes the order of header file
inclusion consistent for non-backend modules.
In passing, fix the case where we were using angle brackets (<>) for the
local module includes instead of quotes ("").
Author: Vignesh C
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CALDaNm2Sznv8RR6Ex-iJO6xAdsxgWhCoETkaYX=+9DW3q0QCfA@mail.gmail.com
This commit is contained in:
@@ -7,14 +7,14 @@
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpg_informix.h>
|
||||
#include <pgtypes_error.h>
|
||||
#include <pgtypes_date.h>
|
||||
#include <pgtypes_numeric.h>
|
||||
#include <sqltypes.h>
|
||||
#include <sqlca.h>
|
||||
#include <ecpgerrno.h>
|
||||
#include "ecpg_informix.h"
|
||||
#include "ecpgerrno.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "pgtypes_date.h"
|
||||
#include "pgtypes_error.h"
|
||||
#include "pgtypes_numeric.h"
|
||||
#include "sqlca.h"
|
||||
#include "sqltypes.h"
|
||||
|
||||
/* this is also defined in ecpglib/misc.c, by defining it twice we don't have to export the symbol */
|
||||
|
||||
|
@@ -4,10 +4,10 @@
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include "ecpg-pthread-win32.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpgerrno.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpglib_extern.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "sqlca.h"
|
||||
|
||||
#ifdef ENABLE_THREAD_SAFETY
|
||||
|
@@ -5,15 +5,15 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "ecpgtype.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpgerrno.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpglib_extern.h"
|
||||
#include "sqlca.h"
|
||||
#include "pgtypes_numeric.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "pgtypes_date.h"
|
||||
#include "pgtypes_timestamp.h"
|
||||
#include "pgtypes_interval.h"
|
||||
#include "pgtypes_numeric.h"
|
||||
#include "pgtypes_timestamp.h"
|
||||
#include "sqlca.h"
|
||||
|
||||
/* returns true if character c is a delimiter for the given array type */
|
||||
static bool
|
||||
|
@@ -7,12 +7,11 @@
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include "catalog/pg_type_d.h"
|
||||
|
||||
#include "ecpg-pthread-win32.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpgerrno.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpglib_extern.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "sqlca.h"
|
||||
#include "sqlda.h"
|
||||
#include "sql3types.h"
|
||||
|
@@ -4,9 +4,9 @@
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include "ecpgerrno.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpglib_extern.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "sqlca.h"
|
||||
|
||||
void
|
||||
|
@@ -19,19 +19,18 @@
|
||||
#include <math.h>
|
||||
|
||||
#include "catalog/pg_type_d.h"
|
||||
|
||||
#include "ecpgtype.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpgerrno.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpglib_extern.h"
|
||||
#include "sqlca.h"
|
||||
#include "sqlda-native.h"
|
||||
#include "sqlda-compat.h"
|
||||
#include "sql3types.h"
|
||||
#include "pgtypes_numeric.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "pgtypes_date.h"
|
||||
#include "pgtypes_timestamp.h"
|
||||
#include "pgtypes_interval.h"
|
||||
#include "pgtypes_numeric.h"
|
||||
#include "pgtypes_timestamp.h"
|
||||
#include "sql3types.h"
|
||||
#include "sqlca.h"
|
||||
#include "sqlda-compat.h"
|
||||
#include "sqlda-native.h"
|
||||
|
||||
/*
|
||||
* This function returns a newly malloced string that has ' and \
|
||||
|
@@ -4,10 +4,10 @@
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include "ecpg-pthread-win32.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpgerrno.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpglib_extern.h"
|
||||
#include "ecpgtype.h"
|
||||
|
||||
void
|
||||
ecpg_free(void *ptr)
|
||||
|
@@ -5,17 +5,18 @@
|
||||
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "ecpg-pthread-win32.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpgerrno.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpglib_extern.h"
|
||||
#include "sqlca.h"
|
||||
#include "pgtypes_numeric.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "pgtypes_date.h"
|
||||
#include "pgtypes_timestamp.h"
|
||||
#include "pgtypes_interval.h"
|
||||
#include "pgtypes_numeric.h"
|
||||
#include "pgtypes_timestamp.h"
|
||||
#include "pg_config_paths.h"
|
||||
#include "sqlca.h"
|
||||
|
||||
#ifdef HAVE_LONG_LONG_INT
|
||||
#ifndef LONG_LONG_MIN
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "ecpgtype.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpgerrno.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpglib_extern.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "sqlca.h"
|
||||
|
||||
#define STMTID_SIZE 32
|
||||
|
@@ -10,16 +10,15 @@
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include "catalog/pg_type_d.h"
|
||||
|
||||
#include "ecpg-pthread-win32.h"
|
||||
#include "decimal.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpg-pthread-win32.h"
|
||||
#include "ecpgerrno.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpglib_extern.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "sqlca.h"
|
||||
#include "sqlda-native.h"
|
||||
#include "sqlda-compat.h"
|
||||
#include "sqlda-native.h"
|
||||
|
||||
/*
|
||||
* Compute the next variable's offset with
|
||||
|
@@ -4,12 +4,11 @@
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include "catalog/pg_type_d.h"
|
||||
|
||||
#include "ecpgtype.h"
|
||||
#include "ecpglib.h"
|
||||
#include "ecpglib_extern.h"
|
||||
#include "sqltypes.h"
|
||||
#include "ecpgtype.h"
|
||||
#include "sql3types.h"
|
||||
#include "sqltypes.h"
|
||||
|
||||
/*
|
||||
* This function is used to generate the correct type names.
|
||||
|
@@ -2,8 +2,8 @@
|
||||
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include "pgtypeslib_extern.h"
|
||||
#include "pgtypes.h"
|
||||
#include "pgtypeslib_extern.h"
|
||||
|
||||
/* Return value is zero-filled. */
|
||||
char *
|
||||
|
@@ -6,10 +6,10 @@
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "pgtypeslib_extern.h"
|
||||
#include "dt.h"
|
||||
#include "pgtypes_error.h"
|
||||
#include "pgtypes_date.h"
|
||||
#include "pgtypes_error.h"
|
||||
#include "pgtypeslib_extern.h"
|
||||
|
||||
date *
|
||||
PGTYPESdate_new(void)
|
||||
|
@@ -7,9 +7,9 @@
|
||||
#include <math.h>
|
||||
|
||||
#include "common/string.h"
|
||||
#include "pgtypeslib_extern.h"
|
||||
#include "dt.h"
|
||||
#include "pgtypes_timestamp.h"
|
||||
#include "pgtypeslib_extern.h"
|
||||
|
||||
const int day_tab[2][13] = {
|
||||
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0},
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/* src/interfaces/ecpg/pgtypeslib/interval.c */
|
||||
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
@@ -10,11 +11,10 @@
|
||||
#endif
|
||||
|
||||
#include "common/string.h"
|
||||
|
||||
#include "pgtypeslib_extern.h"
|
||||
#include "dt.h"
|
||||
#include "pgtypes_error.h"
|
||||
#include "pgtypes_interval.h"
|
||||
#include "pgtypeslib_extern.h"
|
||||
|
||||
/* copy&pasted from .../src/backend/utils/adt/datetime.c
|
||||
* and changesd struct pg_tm to struct tm
|
||||
|
@@ -1,12 +1,14 @@
|
||||
/* src/interfaces/ecpg/pgtypeslib/numeric.c */
|
||||
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <float.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "pgtypeslib_extern.h"
|
||||
#include "pgtypes_error.h"
|
||||
#include "pgtypes_numeric.h"
|
||||
#include "pgtypeslib_extern.h"
|
||||
|
||||
#define Max(x, y) ((x) > (y) ? (x) : (y))
|
||||
#define Min(x, y) ((x) < (y) ? (x) : (y))
|
||||
@@ -20,7 +22,6 @@
|
||||
free(buf); \
|
||||
} while (0)
|
||||
|
||||
#include "pgtypes_numeric.h"
|
||||
|
||||
#if 0
|
||||
/* ----------
|
||||
|
@@ -11,11 +11,10 @@
|
||||
#error -ffast-math is known to break this code
|
||||
#endif
|
||||
|
||||
#include "pgtypeslib_extern.h"
|
||||
#include "dt.h"
|
||||
#include "pgtypes_timestamp.h"
|
||||
#include "pgtypes_date.h"
|
||||
|
||||
#include "pgtypes_timestamp.h"
|
||||
#include "pgtypeslib_extern.h"
|
||||
|
||||
static int64
|
||||
time2t(const int hour, const int min, const int sec, const fsec_t fsec)
|
||||
|
@@ -9,11 +9,10 @@
|
||||
*/
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include "preproc_extern.h"
|
||||
#include "preproc.h"
|
||||
|
||||
/* ScanKeywordList lookup data for C keywords */
|
||||
#include "c_kwlist_d.h"
|
||||
#include "preproc_extern.h"
|
||||
#include "preproc.h"
|
||||
|
||||
/* Token codes for C keywords */
|
||||
#define PG_KEYWORD(kwname, value) value,
|
||||
|
@@ -13,11 +13,10 @@
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "preproc_extern.h"
|
||||
#include "preproc.h"
|
||||
|
||||
/* ScanKeywordList lookup data for ECPG keywords */
|
||||
#include "ecpg_kwlist_d.h"
|
||||
#include "preproc_extern.h"
|
||||
#include "preproc.h"
|
||||
|
||||
/* Token codes for ECPG keywords */
|
||||
#define PG_KEYWORD(kwname, value) value,
|
||||
|
@@ -40,9 +40,8 @@
|
||||
|
||||
#include "common/md5.h"
|
||||
#include "common/scram-common.h"
|
||||
#include "libpq-fe.h"
|
||||
#include "fe-auth.h"
|
||||
|
||||
#include "libpq-fe.h"
|
||||
|
||||
#ifdef ENABLE_GSS
|
||||
/*
|
||||
|
@@ -21,10 +21,16 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "common/ip.h"
|
||||
#include "common/link-canary.h"
|
||||
#include "common/scram-common.h"
|
||||
#include "common/string.h"
|
||||
#include "fe-auth.h"
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-int.h"
|
||||
#include "fe-auth.h"
|
||||
#include "mb/pg_wchar.h"
|
||||
#include "pg_config_paths.h"
|
||||
#include "port/pg_bswap.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include "win32.h"
|
||||
@@ -70,14 +76,6 @@ static int ldapServiceLookup(const char *purl, PQconninfoOption *options,
|
||||
PQExpBuffer errorMessage);
|
||||
#endif
|
||||
|
||||
#include "common/ip.h"
|
||||
#include "common/link-canary.h"
|
||||
#include "common/scram-common.h"
|
||||
#include "common/string.h"
|
||||
#include "mb/pg_wchar.h"
|
||||
#include "port/pg_bswap.h"
|
||||
|
||||
|
||||
#ifndef WIN32
|
||||
#define PGPASSFILE ".pgpass"
|
||||
#else
|
||||
|
@@ -18,17 +18,16 @@
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-int.h"
|
||||
|
||||
#include "mb/pg_wchar.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include "win32.h"
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-int.h"
|
||||
#include "mb/pg_wchar.h"
|
||||
|
||||
/* keep this in same order as ExecStatusType in libpq-fe.h */
|
||||
char *const pgresStatus[] = {
|
||||
"PGRES_EMPTY_QUERY",
|
||||
|
@@ -50,9 +50,8 @@
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-int.h"
|
||||
#include "mb/pg_wchar.h"
|
||||
#include "port/pg_bswap.h"
|
||||
#include "pg_config_paths.h"
|
||||
|
||||
#include "port/pg_bswap.h"
|
||||
|
||||
static int pqPutMsgBytes(const void *buf, size_t len, PGconn *conn);
|
||||
static int pqSendSome(PGconn *conn, int len);
|
||||
|
@@ -17,11 +17,6 @@
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-int.h"
|
||||
#include "port/pg_bswap.h"
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#include "win32.h"
|
||||
#else
|
||||
@@ -31,6 +26,9 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-int.h"
|
||||
#include "port/pg_bswap.h"
|
||||
|
||||
static int getRowDescriptions(PGconn *conn);
|
||||
static int getAnotherTuple(PGconn *conn, bool binary);
|
||||
|
@@ -17,12 +17,6 @@
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-int.h"
|
||||
|
||||
#include "mb/pg_wchar.h"
|
||||
#include "port/pg_bswap.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include "win32.h"
|
||||
#else
|
||||
@@ -32,6 +26,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-int.h"
|
||||
#include "mb/pg_wchar.h"
|
||||
#include "port/pg_bswap.h"
|
||||
|
||||
/*
|
||||
* This macro lists the backend message types that could be "long" (more
|
||||
|
@@ -13,9 +13,9 @@
|
||||
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include "fe-gssapi-common.h"
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-int.h"
|
||||
#include "fe-gssapi-common.h"
|
||||
#include "port/pg_bswap.h"
|
||||
|
||||
/*
|
||||
|
@@ -28,10 +28,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "libpq-fe.h"
|
||||
#include "fe-auth.h"
|
||||
#include "libpq-int.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include "win32.h"
|
||||
#else
|
||||
@@ -55,6 +51,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "fe-auth.h"
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-int.h"
|
||||
|
||||
/*
|
||||
* Macros to handle disabling and then restoring the state of SIGPIPE handling.
|
||||
* On Windows, these are all no-ops since there's no SIGPIPEs.
|
||||
|
Reference in New Issue
Block a user