#include <signal.h>
#include <sys/time.h>
-#include "pg_getopt.h"
-
-#include "common/logging.h"
-
#include "access/xlog_internal.h"
+#include "common/logging.h"
+#include "pg_getopt.h"
const char *progname;
#include "fe_utils/string_utils.h"
#include "getopt_long.h"
#include "libpq-fe.h"
-#include "pqexpbuffer.h"
#include "pgtar.h"
#include "pgtime.h"
+#include "pqexpbuffer.h"
#include "receivelog.h"
#include "replication/basebackup.h"
#include "streamutil.h"
#include <sys/stat.h>
#include <unistd.h>
+#include "access/xlog_internal.h"
#include "common/file_perm.h"
#include "common/logging.h"
-#include "libpq-fe.h"
-#include "access/xlog_internal.h"
#include "getopt_long.h"
-
+#include "libpq-fe.h"
#include "receivelog.h"
#include "streamutil.h"
-
/* Time to sleep between reconnection attempts */
#define RECONNECT_SLEEP_TIME 5
#include <sys/select.h>
#endif
-/* local includes */
-#include "streamutil.h"
-
#include "access/xlog_internal.h"
-#include "common/file_perm.h"
#include "common/fe_memutils.h"
+#include "common/file_perm.h"
#include "common/logging.h"
#include "getopt_long.h"
#include "libpq-fe.h"
#include "libpq/pqsignal.h"
#include "pqexpbuffer.h"
-
+#include "streamutil.h"
/* Time to sleep between reconnection attempts */
#define RECONNECT_SLEEP_TIME 5
#include <sys/select.h>
#endif
-/* local includes */
-#include "receivelog.h"
-#include "streamutil.h"
-
-#include "libpq-fe.h"
#include "access/xlog_internal.h"
#include "common/file_utils.h"
#include "common/logging.h"
-
+#include "libpq-fe.h"
+#include "receivelog.h"
+#include "streamutil.h"
/* fd and filename for currently open WAL file */
static Walfile *walfile = NULL;
#include <sys/time.h>
#include <unistd.h>
-/* local includes */
-#include "receivelog.h"
-#include "streamutil.h"
-
#include "access/xlog_internal.h"
#include "common/fe_memutils.h"
#include "common/file_perm.h"
#include "fe_utils/connect.h"
#include "port/pg_bswap.h"
#include "pqexpbuffer.h"
+#include "receivelog.h"
+#include "streamutil.h"
#define ERRCODE_DUPLICATE_OBJECT "42710"
#include <zlib.h>
#endif
-#include "pgtar.h"
#include "common/file_perm.h"
#include "common/file_utils.h"
-
+#include "pgtar.h"
#include "receivelog.h"
#include "streamutil.h"
#include "postgres_fe.h"
-#include "port.h"
#include "common/config_info.h"
+#include "port.h"
static const char *progname;
#include "catalog/pg_control.h"
#include "common/controldata_utils.h"
#include "common/logging.h"
-#include "pg_getopt.h"
#include "getopt_long.h"
-
+#include "pg_getopt.h"
static void
usage(const char *progname)
*/
#include "postgres_fe.h"
-#include "pg_backup_archiver.h"
-#include "pg_backup_utils.h"
-#include "pg_dump.h"
-
#include <ctype.h>
#include "catalog/pg_class_d.h"
#include "fe_utils/string_utils.h"
-
+#include "pg_backup_archiver.h"
+#include "pg_backup_utils.h"
+#include "pg_dump.h"
/*
* Variables for mapping DumpId to DumpableObject
#include <sys/select.h>
#endif
+#include "fe_utils/string_utils.h"
#include "parallel.h"
#include "pg_backup_utils.h"
-
-#include "fe_utils/string_utils.h"
#include "port/pg_bswap.h"
/* Mnemonic macros for indexing the fd array returned by pipe(2) */
#include <io.h>
#endif
+#include "dumputils.h"
+#include "fe_utils/string_utils.h"
+#include "libpq/libpq-fs.h"
#include "parallel.h"
#include "pg_backup_archiver.h"
#include "pg_backup_db.h"
#include "pg_backup_utils.h"
-#include "dumputils.h"
-#include "fe_utils/string_utils.h"
-
-#include "libpq/libpq-fs.h"
#define TEXT_DUMP_HEADER "--\n-- PostgreSQL database dump\n--\n\n"
#define TEXT_DUMPALL_HEADER "--\n-- PostgreSQL database cluster dump\n--\n\n"
*/
#include "postgres_fe.h"
+#include "common/file_utils.h"
#include "compress_io.h"
#include "parallel.h"
#include "pg_backup_utils.h"
-#include "common/file_utils.h"
-
/*--------
* Routines in the format interface
*/
#include "postgres_fe.h"
-#include "fe_utils/connect.h"
-#include "fe_utils/string_utils.h"
-
-#include "dumputils.h"
-#include "parallel.h"
-#include "pg_backup_archiver.h"
-#include "pg_backup_db.h"
-#include "pg_backup_utils.h"
-
#include <unistd.h>
#include <ctype.h>
#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
+#include "dumputils.h"
+#include "fe_utils/connect.h"
+#include "fe_utils/string_utils.h"
+#include "parallel.h"
+#include "pg_backup_archiver.h"
+#include "pg_backup_db.h"
+#include "pg_backup_utils.h"
static void _check_database_version(ArchiveHandle *AH);
static PGconn *_connectDB(ArchiveHandle *AH, const char *newdbname, const char *newUser);
*/
#include "postgres_fe.h"
+#include <dirent.h>
+#include <sys/stat.h>
+
+#include "common/file_utils.h"
#include "compress_io.h"
#include "parallel.h"
#include "pg_backup_utils.h"
-#include "common/file_utils.h"
-
-#include <dirent.h>
-#include <sys/stat.h>
typedef struct
{
*/
#include "postgres_fe.h"
-#include "pg_backup_archiver.h"
-#include "pg_backup_utils.h"
#include "fe_utils/string_utils.h"
-
#include "libpq/libpq-fs.h"
+#include "pg_backup_archiver.h"
+#include "pg_backup_utils.h"
static void _WriteData(ArchiveHandle *AH, const void *data, size_t dLen);
static void _WriteBlobData(ArchiveHandle *AH, const void *data, size_t dLen);
*/
#include "postgres_fe.h"
-#include "pg_backup_archiver.h"
-#include "pg_backup_tar.h"
-#include "pg_backup_utils.h"
-#include "pgtar.h"
-#include "common/file_utils.h"
-#include "fe_utils/string_utils.h"
-
#include <sys/stat.h>
#include <ctype.h>
#include <limits.h>
#include <unistd.h>
+#include "common/file_utils.h"
+#include "fe_utils/string_utils.h"
+#include "pg_backup_archiver.h"
+#include "pg_backup_tar.h"
+#include "pg_backup_utils.h"
+#include "pgtar.h"
+
static void _ArchiveEntry(ArchiveHandle *AH, TocEntry *te);
static void _StartData(ArchiveHandle *AH, TocEntry *te);
static void _WriteData(ArchiveHandle *AH, const void *data, size_t dLen);
#include <termios.h>
#endif
-#include "getopt_long.h"
-
#include "access/attnum.h"
#include "access/sysattr.h"
#include "access/transam.h"
#include "catalog/pg_proc_d.h"
#include "catalog/pg_trigger_d.h"
#include "catalog/pg_type_d.h"
-#include "libpq/libpq-fs.h"
-#include "storage/block.h"
-
#include "dumputils.h"
+#include "fe_utils/connect.h"
+#include "fe_utils/string_utils.h"
+#include "getopt_long.h"
+#include "libpq/libpq-fs.h"
#include "parallel.h"
#include "pg_backup_db.h"
#include "pg_backup_utils.h"
#include "pg_dump.h"
-#include "fe_utils/connect.h"
-#include "fe_utils/string_utils.h"
-
+#include "storage/block.h"
typedef struct
{
*/
#include "postgres_fe.h"
+#include "catalog/pg_class_d.h"
#include "pg_backup_archiver.h"
#include "pg_backup_utils.h"
#include "pg_dump.h"
-#include "catalog/pg_class_d.h"
-
/*
* Sort priority for database object types.
* Objects are sorted by type, and within a type by name.
#include <time.h>
#include <unistd.h>
-#include "getopt_long.h"
-
-#include "dumputils.h"
-#include "pg_backup.h"
#include "common/file_utils.h"
#include "common/logging.h"
+#include "dumputils.h"
#include "fe_utils/connect.h"
#include "fe_utils/string_utils.h"
+#include "getopt_long.h"
+#include "pg_backup.h"
/* version string we expect back from pg_dump */
#define PGDUMP_VERSIONSTR "pg_dump (PostgreSQL) " PG_VERSION "\n"
#include <termios.h>
#endif
-#include "getopt_long.h"
-
#include "dumputils.h"
+#include "getopt_long.h"
#include "parallel.h"
#include "pg_backup_utils.h"
-
static void usage(const char *progname);
int
#include <time.h>
#include <unistd.h>
-#include "access/transam.h"
#include "access/heaptoast.h"
#include "access/multixact.h"
+#include "access/transam.h"
#include "access/xlog.h"
#include "access/xlog_internal.h"
#include "common/controldata_utils.h"
#include "common/logging.h"
#include "common/restricted_token.h"
#include "common/string.h"
-#include "storage/large_object.h"
-#include "pg_getopt.h"
#include "getopt_long.h"
-
+#include "pg_getopt.h"
+#include "storage/large_object.h"
static ControlFileData ControlFile; /* pg_control values */
static XLogSegNo newXlogSegNo; /* new XLOG segment # */
#include "postgres_fe.h"
-#include "datapagemap.h"
-
#include "common/logging.h"
+#include "datapagemap.h"
struct datapagemap_iterator
{
#include <sys/stat.h>
#include <unistd.h>
-#include "pg_rewind.h"
#include "fetch.h"
#include "file_ops.h"
#include "filemap.h"
+#include "pg_rewind.h"
void
fetchSourceFileList(void)
#include <sys/stat.h>
#include <unistd.h>
+#include "catalog/pg_tablespace_d.h"
+#include "common/string.h"
#include "datapagemap.h"
#include "filemap.h"
#include "pg_rewind.h"
-
-#include "common/string.h"
-#include "catalog/pg_tablespace_d.h"
#include "storage/fd.h"
filemap_t *filemap = NULL;
#include <fcntl.h>
#include <unistd.h>
-#include "pg_rewind.h"
+#include "catalog/pg_type_d.h"
#include "datapagemap.h"
+#include "fe_utils/connect.h"
#include "fetch.h"
#include "file_ops.h"
#include "filemap.h"
-
-#include "catalog/pg_type_d.h"
-#include "fe_utils/connect.h"
+#include "pg_rewind.h"
#include "port/pg_bswap.h"
PGconn *conn = NULL;
#include <unistd.h>
-#include "pg_rewind.h"
-#include "filemap.h"
-
#include "access/rmgr.h"
#include "access/xlog_internal.h"
#include "access/xlogreader.h"
#include "catalog/pg_control.h"
#include "catalog/storage_xlog.h"
#include "commands/dbcommands_xlog.h"
-
+#include "filemap.h"
+#include "pg_rewind.h"
/*
* RmgrNames is an array of resource manager names, to make error messages
#include <time.h>
#include <unistd.h>
-#include "pg_rewind.h"
-#include "fetch.h"
-#include "file_ops.h"
-#include "filemap.h"
-
#include "access/timeline.h"
#include "access/xlog_internal.h"
#include "catalog/catversion.h"
#include "common/file_utils.h"
#include "common/restricted_token.h"
#include "fe_utils/recovery_gen.h"
+#include "fetch.h"
+#include "file_ops.h"
+#include "filemap.h"
#include "getopt_long.h"
+#include "pg_rewind.h"
#include "storage/bufpage.h"
static void usage(const char *progname);
*/
#include "postgres_fe.h"
-#include "pg_rewind.h"
-
#include "access/timeline.h"
#include "access/xlog_internal.h"
+#include "pg_rewind.h"
/*
* This is copy-pasted from the backend readTimeLineHistory, modified to
#include <unistd.h>
#include <signal.h>
-#include "getopt_long.h"
#include "access/xlogdefs.h"
#include "common/logging.h"
-
+#include "getopt_long.h"
/*
* put the temp files in the local directory
#include "mb/pg_wchar.h"
#include "pg_upgrade.h"
-
static void check_new_cluster_is_empty(void);
static void check_databases_are_compatible(void);
static void check_locale_and_encoding(DbInfo *olddb, DbInfo *newdb);
#include "postgres_fe.h"
-#include "pg_upgrade.h"
-
#include <ctype.h>
+#include "pg_upgrade.h"
+
/*
* get_control_data()
*
#include "postgres_fe.h"
-#include "pg_upgrade.h"
-
#include "fe_utils/string_utils.h"
-
+#include "pg_upgrade.h"
void
generate_old_dump(void)
#include "postgres_fe.h"
-#include "access/visibilitymap.h"
-#include "common/file_perm.h"
-#include "pg_upgrade.h"
-#include "storage/bufpage.h"
-#include "storage/checksum.h"
-#include "storage/checksum_impl.h"
-
#include <sys/stat.h>
#include <fcntl.h>
#ifdef HAVE_COPYFILE_H
#include <linux/fs.h>
#endif
+#include "access/visibilitymap.h"
+#include "common/file_perm.h"
+#include "pg_upgrade.h"
+#include "storage/bufpage.h"
+#include "storage/checksum.h"
+#include "storage/checksum_impl.h"
#ifdef WIN32
static int win32_pghardlink(const char *src, const char *dst);
#include "postgres_fe.h"
-#include "pg_upgrade.h"
-
#include "access/transam.h"
#include "catalog/pg_language_d.h"
-
+#include "pg_upgrade.h"
/*
* qsort comparator for pointers to library names
#include "postgres_fe.h"
-#include "pg_upgrade.h"
-
#include "access/transam.h"
#include "catalog/pg_class_d.h"
-
+#include "pg_upgrade.h"
static void create_rel_filename_map(const char *old_data, const char *new_data,
const DbInfo *old_db, const DbInfo *new_db,
#include <io.h>
#endif
-#include "getopt_long.h"
#include "common/string.h"
-#include "utils/pidfile.h"
-
+#include "getopt_long.h"
#include "pg_upgrade.h"
-
+#include "utils/pidfile.h"
static void usage(void);
static void check_required_directory(char **dirpath,
#include "pg_upgrade.h"
-
static int parallel_jobs;
#ifdef WIN32
#include "postgres_fe.h"
-#include "pg_upgrade.h"
+#ifdef HAVE_LANGINFO_H
+#include <langinfo.h>
+#endif
+
#include "catalog/pg_class_d.h"
#include "common/file_perm.h"
#include "common/logging.h"
#include "common/restricted_token.h"
#include "fe_utils/string_utils.h"
-
-#ifdef HAVE_LANGINFO_H
-#include <langinfo.h>
-#endif
+#include "pg_upgrade.h"
static void prepare_new_cluster(void);
static void prepare_new_globals(void);
#include "postgres_fe.h"
-#include "pg_upgrade.h"
-
#include <sys/stat.h>
-#include "catalog/pg_class_d.h"
-#include "access/transam.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);
static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
#include "fe_utils/string_utils.h"
#include "pg_upgrade.h"
-
static PGconn *get_db_conn(ClusterInfo *cluster, const char *db_name);
#include "postgres_fe.h"
-#include "common/username.h"
-#include "pg_upgrade.h"
-
#include <signal.h>
+#include "common/username.h"
+#include "pg_upgrade.h"
LogOpts log_opts;
#include "postgres_fe.h"
-#include "pg_upgrade.h"
-
#include "catalog/pg_class_d.h"
#include "fe_utils/string_utils.h"
-
-
+#include "pg_upgrade.h"
/*
* new_9_0_populate_pg_largeobject_metadata()
#include <time.h>
-#include "utils/datetime.h"
#include "lib/stringinfo.h"
+#include "utils/datetime.h"
/* copied from timestamp.c */
pg_time_t
#include <sys/stat.h>
#include <unistd.h>
+#include "access/xlog_internal.h"
#include "access/xlogreader.h"
#include "access/xlogrecord.h"
-#include "access/xlog_internal.h"
#include "access/transam.h"
#include "common/fe_memutils.h"
#include "common/logging.h"
#include "getopt_long.h"
#include "rmgrdesc.h"
-
static const char *progname;
static int WalSegSz;
#endif
#include "postgres_fe.h"
-#include "common/int.h"
-#include "common/logging.h"
-#include "fe_utils/conditional.h"
-#include "getopt_long.h"
-#include "libpq-fe.h"
-#include "portability/instr_time.h"
#include <ctype.h>
#include <float.h>
#endif
#endif
+#include "common/int.h"
+#include "common/logging.h"
+#include "fe_utils/conditional.h"
+#include "getopt_long.h"
+#include "libpq-fe.h"
+#include "pgbench.h"
+#include "portability/instr_time.h"
+
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
-#include "pgbench.h"
#define ERRCODE_UNDEFINED_TABLE "42P01"
#include <win32.h>
#endif
-#include "common/logging.h"
-#include "fe_utils/mbprint.h"
-#include "fe_utils/string_utils.h"
-#include "portability/instr_time.h"
-
#include "command.h"
#include "common.h"
+#include "common/logging.h"
#include "copy.h"
#include "crosstabview.h"
+#include "fe_utils/mbprint.h"
+#include "fe_utils/string_utils.h"
+#include "portability/instr_time.h"
#include "settings.h"
-
static bool DescribeQuery(const char *query, double *elapsed_msec);
static bool ExecQueryUsingCursor(const char *query, double *elapsed_msec);
static bool command_no_begin(const char *query);
* src/bin/psql/copy.c
*/
#include "postgres_fe.h"
-#include "copy.h"
#include <signal.h>
#include <sys/stat.h>
#include <io.h> /* I think */
#endif
+#include "common.h"
+#include "common/logging.h"
+#include "copy.h"
#include "libpq-fe.h"
#include "pqexpbuffer.h"
-
-#include "settings.h"
-#include "common.h"
#include "prompt.h"
+#include "settings.h"
#include "stringutils.h"
-#include "common/logging.h"
-
/*
* parse_slash_copy
* -- parses \copy command line
#include "postgres_fe.h"
#include "common.h"
+#include "common/logging.h"
#include "crosstabview.h"
#include "pqexpbuffer.h"
#include "psqlscanslash.h"
#include "settings.h"
-#include "common/logging.h"
-
/*
* Value/position from the resultset that goes into the horizontal or vertical
* crosstabview header.
#include "catalog/pg_cast_d.h"
#include "catalog/pg_class_d.h"
#include "catalog/pg_default_acl_d.h"
-
+#include "common.h"
#include "common/logging.h"
+#include "describe.h"
#include "fe_utils/mbprint.h"
#include "fe_utils/print.h"
#include "fe_utils/string_utils.h"
-
-#include "common.h"
-#include "describe.h"
#include "settings.h"
#include "variables.h"
-
static bool describeOneTableDetails(const char *schemaname,
const char *relationname,
const char *oid,
#include <termios.h>
#endif
+#include "common.h"
#include "common/logging.h"
#include "common/username.h"
-
-#include "common.h"
#include "help.h"
#include "input.h"
#include "settings.h"
#include <fcntl.h>
#include <limits.h>
+#include "common.h"
+#include "common/logging.h"
#include "input.h"
#include "settings.h"
#include "tab-complete.h"
-#include "common.h"
-
-#include "common/logging.h"
#ifndef WIN32
#define PSQLHISTORY ".psql_history"
* src/bin/psql/large_obj.c
*/
#include "postgres_fe.h"
-#include "large_obj.h"
-#include "settings.h"
#include "common.h"
-
#include "common/logging.h"
+#include "large_obj.h"
+#include "settings.h"
static void print_lo_result(const char *fmt,...) pg_attribute_printf(1, 2);
* src/bin/psql/mainloop.c
*/
#include "postgres_fe.h"
-#include "mainloop.h"
#include "command.h"
#include "common.h"
+#include "common/logging.h"
#include "input.h"
+#include "mainloop.h"
+#include "mb/pg_wchar.h"
#include "prompt.h"
#include "settings.h"
-#include "common/logging.h"
-#include "mb/pg_wchar.h"
-
-
/* callback functions for our flex lexer */
const PsqlScanCallbacks psqlscan_callbacks = {
psql_get_variable,
#endif
#include "common.h"
+#include "common/string.h"
#include "input.h"
#include "prompt.h"
#include "settings.h"
-#include "common/string.h"
-
/*--------------------------
* get_prompt
*
#include <win32.h>
#endif /* WIN32 */
-#include "getopt_long.h"
-
-#include "common/logging.h"
-#include "fe_utils/print.h"
-
#include "command.h"
#include "common.h"
+#include "common/logging.h"
#include "describe.h"
+#include "fe_utils/print.h"
+#include "getopt_long.h"
#include "help.h"
#include "input.h"
#include "mainloop.h"
#include "settings.h"
-
-
/*
* Global psql options
*/
#include "postgres_fe.h"
#include "common.h"
-#include "variables.h"
-
#include "common/logging.h"
-
+#include "variables.h"
/*
* Check whether a variable's name is allowed.
#endif
#include "common/shortest_dec.h"
-
-#include "ryu_common.h"
#include "digit_table.h"
+#include "ryu_common.h"
#define FLOAT_MANTISSA_BITS 23
#define FLOAT_EXPONENT_BITS 8
#include <termios.h>
#endif
-#include "fe_utils/print.h"
-
#include "catalog/pg_type_d.h"
#include "fe_utils/mbprint.h"
-
+#include "fe_utils/print.h"
/*
* If the calling program doesn't have any mechanism for setting
#include "postgres_fe.h"
#include "common/logging.h"
-#include "fe_utils/string_utils.h"
#include "fe_utils/recovery_gen.h"
-
+#include "fe_utils/string_utils.h"
static char *escape_quotes(const char *src);
#include <ctype.h>
-#include "fe_utils/string_utils.h"
-
#include "common/keywords.h"
-
+#include "fe_utils/string_utils.h"
static PQExpBuffer defaultGetLocalPQExpBuffer(void);
#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 */
#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
#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
#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"
#include "postgres_fe.h"
#include "ecpgerrno.h"
-#include "ecpgtype.h"
#include "ecpglib.h"
#include "ecpglib_extern.h"
+#include "ecpgtype.h"
#include "sqlca.h"
void
#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 \
#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)
#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
#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
#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
#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.
#include "postgres_fe.h"
-#include "pgtypeslib_extern.h"
#include "pgtypes.h"
+#include "pgtypeslib_extern.h"
/* Return value is zero-filled. */
char *
#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)
#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},
/* src/interfaces/ecpg/pgtypeslib/interval.c */
#include "postgres_fe.h"
+
#include <time.h>
#include <math.h>
#include <limits.h>
#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
/* 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))
free(buf); \
} while (0)
-#include "pgtypes_numeric.h"
#if 0
/* ----------
#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)
*/
#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,
#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,
#include "common/md5.h"
#include "common/scram-common.h"
-#include "libpq-fe.h"
#include "fe-auth.h"
-
+#include "libpq-fe.h"
#ifdef ENABLE_GSS
/*
#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"
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
#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",
#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);
#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
#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);
#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
#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
#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"
/*
#include <fcntl.h>
#include <ctype.h>
-#include "libpq-fe.h"
-#include "fe-auth.h"
-#include "libpq-int.h"
-
#ifdef WIN32
#include "win32.h"
#else
#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.
#include "funcapi.h"
#include "nodes/makefuncs.h"
#include "parser/parse_type.h"
+#include "plpgsql.h"
#include "utils/builtins.h"
#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
#include "utils/typcache.h"
-#include "plpgsql.h"
-
-
/* ----------
* Our own local and global variables
* ----------
#include "parser/parse_coerce.h"
#include "parser/parse_type.h"
#include "parser/scansup.h"
+#include "plpgsql.h"
#include "storage/proc.h"
#include "tcop/tcopprot.h"
#include "tcop/utility.h"
#include "utils/syscache.h"
#include "utils/typcache.h"
-#include "plpgsql.h"
-
-
typedef struct
{
int nargs; /* number of arguments */
#include "postgres.h"
-#include "utils/memutils.h"
-
#include "plpgsql.h"
-
+#include "utils/memutils.h"
/* ----------
* Local variables for namespace handling
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "miscadmin.h"
+#include "plpgsql.h"
#include "utils/builtins.h"
#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
#include "utils/varlena.h"
-#include "plpgsql.h"
-
-
static bool plpgsql_extra_checks_check_hook(char **newvalue, void **extra, GucSource source);
static void plpgsql_extra_warnings_assign_hook(const char *newvalue, void *extra);
static void plpgsql_extra_errors_assign_hook(const char *newvalue, void *extra);
*/
#include "c.h"
-#include "port/pg_crc32c.h"
-
#include <arm_acle.h>
+#include "port/pg_crc32c.h"
+
pg_crc32c
pg_comp_crc32c_armv8(pg_crc32c crc, const void *data, size_t len)
{
*/
#include "c.h"
-#include "port/pg_crc32c.h"
-
#include <nmmintrin.h>
+#include "port/pg_crc32c.h"
+
pg_crc32c
pg_comp_crc32c_sse42(pg_crc32c crc, const void *data, size_t len)
{
#include "c.h"
-#include "pgtar.h"
+
#include <sys/stat.h>
+#include "pgtar.h"
+
/*
* Print a numeric field in a tar header. The field starts at *s and is of
* length len; val is the value to be written.
#endif
#include "datatype/timestamp.h"
+#include "isolationtester.h"
#include "libpq-fe.h"
-#include "pqexpbuffer.h"
#include "pg_getopt.h"
-
-#include "isolationtester.h"
+#include "pqexpbuffer.h"
#define PREP_WAITING "isolationtester_waiting"
*/
#include "postgres.h"
-#include "fmgr.h"
#include "access/ginblock.h"
#include "access/gin_private.h"
#include "access/htup_details.h"
+#include "fmgr.h"
PG_MODULE_MAGIC;
#include "fmgr.h"
#include "lib/integerset.h"
+#include "miscadmin.h"
#include "nodes/bitmapset.h"
-#include "utils/memutils.h"
-#include "utils/timestamp.h"
#include "storage/block.h"
#include "storage/itemptr.h"
-#include "miscadmin.h"
+#include "utils/memutils.h"
+#include "utils/timestamp.h"
/*
* If you enable this, the "pattern" tests will print information about
#include "postgres.h"
+#include "catalog/pg_type.h"
#include "fmgr.h"
#include "miscadmin.h"
-
-#include "test_rls_hooks.h"
-
-#include "catalog/pg_type.h"
-#include "nodes/makefuncs.h"
#include "nodes/makefuncs.h"
#include "parser/parse_clause.h"
#include "parser/parse_collate.h"
#include "parser/parse_node.h"
#include "parser/parse_relation.h"
#include "rewrite/rowsecurity.h"
+#include "test_rls_hooks.h"
#include "utils/acl.h"
#include "utils/rel.h"
#include "utils/relcache.h"
#include "postmaster/bgworker.h"
#include "storage/procsignal.h"
#include "storage/shm_toc.h"
-#include "utils/memutils.h"
-
#include "test_shm_mq.h"
+#include "utils/memutils.h"
typedef struct
{
#include <sys/resource.h>
#endif
-#include "pg_regress.h"
-
#include "common/logging.h"
#include "common/restricted_token.h"
#include "common/username.h"
#include "getopt_long.h"
#include "libpq/pqcomm.h" /* needed for UNIXSOCK_PATH() */
#include "pg_config_paths.h"
+#include "pg_regress.h"
#include "portability/instr_time.h"
/* for resultmap we need a list of pairs of strings */
#include "port/atomics.h"
#include "utils/builtins.h"
#include "utils/geo_decls.h"
+#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/typcache.h"
-#include "utils/memutils.h"
-
#define EXPECT_TRUE(expr) \
do { \