Make the order of the header file includes consistent.
authorAmit Kapila <akapila@postgresql.org>
Mon, 25 Nov 2019 02:38:57 +0000 (08:08 +0530)
committerAmit Kapila <akapila@postgresql.org>
Mon, 25 Nov 2019 02:38:57 +0000 (08:08 +0530)
Similar to commits 14aec035027e735035f2 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

78 files changed:
contrib/bloom/bloom.h
contrib/btree_gist/btree_gist.h
contrib/btree_gist/btree_utils_num.h
contrib/btree_gist/btree_utils_var.h
contrib/postgres_fdw/postgres_fdw.h
src/backend/libpq/auth.c
src/bin/pg_basebackup/receivelog.h
src/bin/pg_basebackup/streamutil.h
src/bin/pg_dump/pg_backup_archiver.h
src/bin/pg_rewind/datapagemap.h
src/bin/pg_rewind/filemap.h
src/bin/pg_rewind/pg_rewind.h
src/bin/pg_waldump/pg_waldump.c
src/bin/psql/command.c
src/bin/psql/command.h
src/bin/psql/common.h
src/bin/psql/prompt.h
src/bin/psql/settings.h
src/bin/psql/tab-complete.c
src/bin/scripts/common.h
src/include/access/gin_private.h
src/include/access/hio.h
src/include/access/htup_details.h
src/include/access/relation.h
src/include/access/table.h
src/include/access/twophase.h
src/include/catalog/pg_constraint.h
src/include/catalog/pg_conversion.h
src/include/catalog/pg_operator.h
src/include/catalog/pg_proc.h
src/include/catalog/pg_publication.h
src/include/catalog/pg_replication_origin.h
src/include/catalog/pg_subscription_rel.h
src/include/catalog/pg_type.h
src/include/commands/event_trigger.h
src/include/executor/nodeBitmapHeapscan.h
src/include/executor/nodeIndexonlyscan.h
src/include/executor/tuptable.h
src/include/funcapi.h
src/include/jit/llvmjit.h
src/include/nodes/execnodes.h
src/include/replication/decode.h
src/include/replication/logical.h
src/include/replication/walreceiver.h
src/include/rewrite/rewriteHandler.h
src/include/statistics/extended_stats_internal.h
src/include/storage/buf_internals.h
src/include/storage/condition_variable.h
src/include/storage/lock.h
src/include/storage/lwlock.h
src/include/storage/standby.h
src/include/tsearch/ts_locale.h
src/include/utils/date.h
src/include/utils/jsonpath.h
src/include/utils/pg_lsn.h
src/include/utils/xml.h
src/interfaces/ecpg/ecpglib/descriptor.c
src/interfaces/ecpg/ecpglib/ecpglib_extern.h
src/interfaces/ecpg/ecpglib/misc.c
src/interfaces/ecpg/include/ecpglib.h
src/interfaces/ecpg/preproc/preproc_extern.h
src/pl/plperl/plperl.c
src/pl/plpython/plpy_cursorobject.c
src/pl/plpython/plpy_elog.c
src/pl/plpython/plpy_exec.c
src/pl/plpython/plpy_main.c
src/pl/plpython/plpy_planobject.c
src/pl/plpython/plpy_plpymodule.c
src/pl/plpython/plpy_procedure.c
src/pl/plpython/plpy_resultobject.c
src/pl/plpython/plpy_spi.c
src/pl/plpython/plpy_spi.h
src/pl/plpython/plpy_subxactobject.c
src/pl/plpython/plpy_subxactobject.h
src/pl/plpython/plpy_typeio.c
src/pl/plpython/plpy_typeio.h
src/pl/plpython/plpy_util.c
src/test/modules/test_ginpostinglist/test_ginpostinglist.c

index 010148eb032bab798c76c5055f1c87170003014b..a7179981f47490969bd9b878c7c08d7faf3a680d 100644 (file)
@@ -17,8 +17,8 @@
 #include "access/generic_xlog.h"
 #include "access/itup.h"
 #include "access/xlog.h"
-#include "nodes/pathnodes.h"
 #include "fmgr.h"
+#include "nodes/pathnodes.h"
 
 /* Support procedures numbers */
 #define BLOOM_HASH_PROC            1
index 011285abce070dc87ccc2be52e80c02d9ab44b4c..14c7c8ee193a427f4c6c03a754d18ff00f13a8e5 100644 (file)
@@ -4,8 +4,8 @@
 #ifndef __BTREE_GIST_H__
 #define __BTREE_GIST_H__
 
-#include "fmgr.h"
 #include "access/nbtree.h"
+#include "fmgr.h"
 
 #define BtreeGistNotEqualStrategyNumber 6
 
index 50907b3b5c67a9b0826a6248c5e7fffb9af7c88d..1fedfbe82daa6724a65a00176ce0fd4c46ce6ab7 100644 (file)
@@ -4,13 +4,13 @@
 #ifndef __BTREE_UTILS_NUM_H__
 #define __BTREE_UTILS_NUM_H__
 
-#include "btree_gist.h"
-#include "access/gist.h"
-#include "utils/rel.h"
-
 #include <math.h>
 #include <float.h>
 
+#include "access/gist.h"
+#include "btree_gist.h"
+#include "utils/rel.h"
+
 typedef char GBT_NUMKEY;
 
 /* Better readable key */
index 1f2ca43e6bc0f992d769a7bb11291e0b3f8bc5ff..2f8def655c8d6744491811d5ff75ce5842a27217 100644 (file)
@@ -4,9 +4,8 @@
 #ifndef __BTREE_UTILS_VAR_H__
 #define __BTREE_UTILS_VAR_H__
 
-#include "btree_gist.h"
-
 #include "access/gist.h"
+#include "btree_gist.h"
 #include "mb/pg_wchar.h"
 
 /* Variable length key */
index 6acb7dcf6cd283b40e4ac5ec64d9eb6dc0e4097c..bdefe0c40e2a13e788957b068dca10c5422afdce 100644 (file)
 
 #include "foreign/foreign.h"
 #include "lib/stringinfo.h"
+#include "libpq-fe.h"
 #include "nodes/pathnodes.h"
 #include "utils/relcache.h"
 
-#include "libpq-fe.h"
-
 /*
  * FDW-specific planner information kept in RelOptInfo.fdw_private for a
  * postgres_fdw foreign table.  For a baserel, this struct is created by
index 909d7369a5fcef8838b41639ffde0a11d3017b33..c12b810c3d5b7c2f7e0c81c679ffb278fcc1eef9 100644 (file)
@@ -39,7 +39,6 @@
 #include "utils/memutils.h"
 #include "utils/timestamp.h"
 
-
 /*----------------------------------------------------------------
  * Global authentication functions
  *----------------------------------------------------------------
index b6e2743f5545beb81b76a5179a374a741852a9a8..edf1ce669f0f0c9d2b4009ebadea6ffba038336e 100644 (file)
 #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.
index a756eee262c8a13d6eed771ba9618fcfb71c3f8b..1edfc9444582ce20ee0824efc9fb1c286695e529 100644 (file)
 #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;
index fa2c6eff5ad4366073ac868c421724d2a904e61e..6768f92976bb29bdb95ab74c470ca48f0a10efe2 100644 (file)
 #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
index c2baaae644ac8c7029c93ca555bdf788bf8aaa34..d5bcfa6ea93b38dd70f54e9d3bb46b6606650501 100644 (file)
@@ -9,9 +9,8 @@
 #ifndef DATAPAGEMAP_H
 #define DATAPAGEMAP_H
 
-#include "storage/relfilenode.h"
 #include "storage/block.h"
-
+#include "storage/relfilenode.h"
 
 struct datapagemap
 {
index 588228404cd23550e12623fd344d577de86d3a72..0aa822dcaecdbfd95175595416fb146aff7d84da 100644 (file)
@@ -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
index aa3a0ce8fc5e34389d25cc533f0369340d285290..360b2b3da89c541c83fc11117672d7f4bc823498 100644 (file)
 #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;
index 1524e5eb1ef5528e71df77abd8ddd5da87f46627..d6695f7196f5d633a4c8b12ea8e578c58ae819d8 100644 (file)
 #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"
index 7f57da8cc50287800f521675dbfd892d18cd9816..0a2597046d6647e750ca0740dd6d8ff02dbec045 100644 (file)
@@ -6,7 +6,6 @@
  * src/bin/psql/command.c
  */
 #include "postgres_fe.h"
-#include "command.h"
 
 #include <ctype.h>
 #include <time.h>
 #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"
index 33791b6ff8be6e17707c9055de1af759f8d705f4..6d39b90c23047b961f14c67f78f39253bcbfcfaa 100644 (file)
@@ -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
 {
index 282a520116a7f20f6de9793fa421152127a0d553..292dc549190006c9a99619118ca731549c82cbb6 100644 (file)
@@ -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);
index 905ee3d88f8d8e48753dc048a5e926f218ea284d..683e3617bad6fef338908815006b9e9405126e4c 100644 (file)
@@ -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);
 
index 5be5091f0e9e1763e00244622afdd68f9d04ebe7..7cd6d5f5b435915ecc449064b071b01e8c08e487 100644 (file)
@@ -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 "|"
index 172e00b46ef3f3167bc2503f7c6471b96cec78d0..df268269939590dcf8f12b5b40e49e8b12fbe42d 100644 (file)
@@ -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
 
 #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"
 
index f36b26a576510a7a132734bb4ecf44bfb9ac57e7..b8580f927a5fc1530c6e00ffdeb7598189ad9281 100644 (file)
@@ -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
index 4e45552b3f2dce8dfceb23aacf6e0f50b8ba234f..b779cc8c7cac3f983fef8890803ccfa41b798c07 100644 (file)
@@ -16,8 +16,8 @@
 #include "access/itup.h"
 #include "catalog/pg_am_d.h"
 #include "fmgr.h"
-#include "storage/bufmgr.h"
 #include "lib/rbtree.h"
+#include "storage/bufmgr.h"
 
 /*
  * Storage type for GIN's reloptions
index dbaabcc073d94dbb61266fa8e79323e2aa2b4887..ad6da6d71b1669209af1598d92acf42b9a26392d 100644 (file)
@@ -15,9 +15,8 @@
 #define HIO_H
 
 #include "access/htup.h"
-#include "utils/relcache.h"
 #include "storage/buf.h"
-
+#include "utils/relcache.h"
 
 /*
  * state for bulk inserts --- private to heapam.c and hio.c
index 66d61fd570008a819b5df3ff47ed8728c6335d4b..7e947190e116efbef0a368ce63d41308a0112e43 100644 (file)
@@ -15,9 +15,9 @@
 #define HTUP_DETAILS_H
 
 #include "access/htup.h"
+#include "access/transam.h"
 #include "access/tupdesc.h"
 #include "access/tupmacs.h"
-#include "access/transam.h"
 #include "storage/bufpage.h"
 
 /*
index 38acaa5a2e958bb5798f52995be85eea718fd960..0a1de3597e2c8ef0a16f4050fafdd502f4681143 100644 (file)
@@ -15,9 +15,8 @@
 #define ACCESS_RELATION_H
 
 #include "nodes/primnodes.h"
-#include "utils/relcache.h"
 #include "storage/lockdefs.h"
-
+#include "utils/relcache.h"
 
 extern Relation relation_open(Oid relationId, LOCKMODE lockmode);
 extern Relation try_relation_open(Oid relationId, LOCKMODE lockmode);
index cb9b43881b5ee37e15f9a454cf15eaad861d15b8..071b25493e15022b04b8973cd208a10de225de0b 100644 (file)
@@ -15,9 +15,8 @@
 #define TABLE_H
 
 #include "nodes/primnodes.h"
-#include "utils/relcache.h"
 #include "storage/lockdefs.h"
-
+#include "utils/relcache.h"
 
 extern Relation table_open(Oid relationId, LOCKMODE lockmode);
 extern Relation table_openrv(const RangeVar *relation, LOCKMODE lockmode);
index 1093085a242f7d75feb4c4636437149855ee383c..02b5315c432f8cedc59c67a8d84403b0f7cae4fe 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef TWOPHASE_H
 #define TWOPHASE_H
 
-#include "access/xlogdefs.h"
 #include "access/xact.h"
+#include "access/xlogdefs.h"
 #include "datatype/timestamp.h"
 #include "storage/lock.h"
 
index c1e60c7dfd2b573e970ddf4580e91be60d7075bf..cbb5d9ab6d46094687c84be82442ac8b33d96184 100644 (file)
 #ifndef PG_CONSTRAINT_H
 #define PG_CONSTRAINT_H
 
+#include "catalog/dependency.h"
 #include "catalog/genbki.h"
 #include "catalog/pg_constraint_d.h"
-
-#include "catalog/dependency.h"
 #include "nodes/pg_list.h"
 
 /* ----------------
index 49c70700ab767cd179f18ed9bf75e0f8f497bcf9..fc523c23268e655d3d2c6b2c36ed85513d88282f 100644 (file)
@@ -18,9 +18,8 @@
 #define PG_CONVERSION_H
 
 #include "catalog/genbki.h"
-#include "catalog/pg_conversion_d.h"
-
 #include "catalog/objectaddress.h"
+#include "catalog/pg_conversion_d.h"
 
 /* ----------------
  *     pg_conversion definition.  cpp turns this into
index 7c4f6862a86299efbf433e2d3fb61725d6a1b6f3..3157fc574b844bd97d6af2b588799a0ab611eb89 100644 (file)
@@ -19,9 +19,8 @@
 #define PG_OPERATOR_H
 
 #include "catalog/genbki.h"
-#include "catalog/pg_operator_d.h"
-
 #include "catalog/objectaddress.h"
+#include "catalog/pg_operator_d.h"
 #include "nodes/pg_list.h"
 
 /* ----------------
index dc29c06f628d600ff119dc6369d6566be3cfe6b0..e6c190926e092c1c46a1141757660d81430d3968 100644 (file)
@@ -18,9 +18,8 @@
 #define PG_PROC_H
 
 #include "catalog/genbki.h"
-#include "catalog/pg_proc_d.h"
-
 #include "catalog/objectaddress.h"
+#include "catalog/pg_proc_d.h"
 #include "nodes/pg_list.h"
 
 /* ----------------
index 20a2f0ac1bf756004ff48aa294c35f1159a3eb5d..ea22aa6563df4daccd67a3f7e2541a1a2a4306c5 100644 (file)
@@ -18,9 +18,8 @@
 #define PG_PUBLICATION_H
 
 #include "catalog/genbki.h"
-#include "catalog/pg_publication_d.h"
-
 #include "catalog/objectaddress.h"
+#include "catalog/pg_publication_d.h"
 
 /* ----------------
  *     pg_publication definition.  cpp turns this into
index b7685847980f13c06473905b4ea1eab2f1454270..613d07e6cf6fc826ff3f000666b29c3466010e06 100644 (file)
 #ifndef PG_REPLICATION_ORIGIN_H
 #define PG_REPLICATION_ORIGIN_H
 
+#include "access/xlogdefs.h"
 #include "catalog/genbki.h"
 #include "catalog/pg_replication_origin_d.h"
 
-#include "access/xlogdefs.h"
-
 /* ----------------
  *     pg_replication_origin.  cpp turns this into
  *     typedef struct FormData_pg_replication_origin
index f7df814a1818931d0d3ab6c3d72cdfa618f1f658..21b4ac2b9a601558cbe5cc76870ee78178972931 100644 (file)
 #ifndef PG_SUBSCRIPTION_REL_H
 #define PG_SUBSCRIPTION_REL_H
 
+#include "access/xlogdefs.h"
 #include "catalog/genbki.h"
 #include "catalog/pg_subscription_rel_d.h"
-
-#include "access/xlogdefs.h"
 #include "nodes/pg_list.h"
 
 /* ----------------
index 2a584b4b1309c806112dd57b18fe0a1d0a44d0af..0c273a0449de6065b0cd2a9e8fa34cc57172661b 100644 (file)
@@ -19,9 +19,8 @@
 #define PG_TYPE_H
 
 #include "catalog/genbki.h"
-#include "catalog/pg_type_d.h"
-
 #include "catalog/objectaddress.h"
+#include "catalog/pg_type_d.h"
 #include "nodes/nodes.h"
 
 /* ----------------
index 575e9243e517e7dbab3e08c1173cc640c3398ca6..6eeb7208fa68df6277721417e221d6fbbee22a34 100644 (file)
@@ -17,8 +17,8 @@
 #include "catalog/objectaddress.h"
 #include "catalog/pg_event_trigger.h"
 #include "nodes/parsenodes.h"
-#include "utils/aclchk_internal.h"
 #include "tcop/deparse_utility.h"
+#include "utils/aclchk_internal.h"
 
 typedef struct EventTriggerData
 {
index 112def153cb26b6a3562e6d9d2f2e6a9d71d8e7e..2c31d6fdcb9032239d6e3344c29406774888fbdd 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef NODEBITMAPHEAPSCAN_H
 #define NODEBITMAPHEAPSCAN_H
 
-#include "nodes/execnodes.h"
 #include "access/parallel.h"
+#include "nodes/execnodes.h"
 
 extern BitmapHeapScanState *ExecInitBitmapHeapScan(BitmapHeapScan *node, EState *estate, int eflags);
 extern void ExecEndBitmapHeapScan(BitmapHeapScanState *node);
index 644166b5bcb887821dad8acd63d63b7159363e27..d85cd12e180a32a56a608365692ecd90e97a2343 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef NODEINDEXONLYSCAN_H
 #define NODEINDEXONLYSCAN_H
 
-#include "nodes/execnodes.h"
 #include "access/parallel.h"
+#include "nodes/execnodes.h"
 
 extern IndexOnlyScanState *ExecInitIndexOnlyScan(IndexOnlyScan *node, EState *estate, int eflags);
 extern void ExecEndIndexOnlyScan(IndexOnlyScanState *node);
index b7f977233be9c19b3f5d6aae4922908abe339bda..04feaba55d931e2ff07ce3537bb87c64d12f9a39 100644 (file)
@@ -15,9 +15,9 @@
 #define TUPTABLE_H
 
 #include "access/htup.h"
+#include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "access/tupdesc.h"
-#include "access/htup_details.h"
 #include "storage/buf.h"
 
 /*----------
index 1a88b520877b307bc586b1d6c4a4204b2e11afee..1aa1f4d8a441aa799e2b8ca89b88ea157e1ba659 100644 (file)
 #ifndef FUNCAPI_H
 #define FUNCAPI_H
 
-#include "fmgr.h"
 #include "access/tupdesc.h"
 #include "executor/executor.h"
 #include "executor/tuptable.h"
-
+#include "fmgr.h"
 
 /*-------------------------------------------------------------------------
  * Support to ease writing Functions returning composite types
index 6178864b2e66797a697d7456b1f2f507d5aaa724..8b441dfdcda3999a174c6ebde231007873fb8ef6 100644 (file)
@@ -30,12 +30,10 @@ extern "C"
 {
 #endif
 
-
+#include "access/tupdesc.h"
 #include "fmgr.h"
 #include "jit/jit.h"
 #include "nodes/pg_list.h"
-#include "access/tupdesc.h"
-
 
 typedef struct LLVMJitContext
 {
index 44f76082e99aec3255cda640772e571702a9f786..6eb647290bebbf8c79b7804b4012c4d9c40e1f26 100644 (file)
 #include "lib/pairingheap.h"
 #include "nodes/params.h"
 #include "nodes/plannodes.h"
+#include "nodes/tidbitmap.h"
 #include "partitioning/partdefs.h"
+#include "storage/condition_variable.h"
 #include "utils/hsearch.h"
 #include "utils/queryenvironment.h"
 #include "utils/reltrigger.h"
 #include "utils/sharedtuplestore.h"
 #include "utils/snapshot.h"
 #include "utils/sortsupport.h"
-#include "utils/tuplestore.h"
 #include "utils/tuplesort.h"
-#include "nodes/tidbitmap.h"
-#include "storage/condition_variable.h"
-
+#include "utils/tuplestore.h"
 
 struct PlanState;              /* forward references in this file */
 struct PartitionRoutingInfo;
index 89689a010b297efb30ebcf8b68333dbde985fa47..3f877244e1af1608a69523c062ed8224f893256b 100644 (file)
@@ -11,8 +11,8 @@
 
 #include "access/xlogreader.h"
 #include "access/xlogrecord.h"
-#include "replication/reorderbuffer.h"
 #include "replication/logical.h"
+#include "replication/reorderbuffer.h"
 
 void       LogicalDecodingProcessRecord(LogicalDecodingContext *ctx,
                                         XLogReaderState *record);
index 31c796b765160378adf7a28c0338c6b5cb1752c9..6879a2e6d299a5a6861b082a191f2eb637b003e9 100644 (file)
@@ -9,11 +9,10 @@
 #ifndef LOGICAL_H
 #define LOGICAL_H
 
-#include "replication/slot.h"
-
 #include "access/xlog.h"
 #include "access/xlogreader.h"
 #include "replication/output_plugin.h"
+#include "replication/slot.h"
 
 struct LogicalDecodingContext;
 
index e12a9349660c3e7598e7d4261f729d85fda8dab6..41714eaf0cec0b270a17e6ed7e38e14ae6ad317a 100644 (file)
 #include "access/xlog.h"
 #include "access/xlogdefs.h"
 #include "getaddrinfo.h"       /* for NI_MAXHOST */
+#include "pgtime.h"
 #include "replication/logicalproto.h"
 #include "replication/walsender.h"
 #include "storage/latch.h"
 #include "storage/spin.h"
-#include "pgtime.h"
 #include "utils/tuplestore.h"
 
 /* user-settable parameters */
index 77b2ffa962156c7fdec1c9d1363d73144d01696d..76fde0b89cece3581021d8b128248b51ae044959 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef REWRITEHANDLER_H
 #define REWRITEHANDLER_H
 
-#include "utils/relcache.h"
 #include "nodes/parsenodes.h"
+#include "utils/relcache.h"
 
 extern List *QueryRewrite(Query *parsetree);
 extern void AcquireRewriteLocks(Query *parsetree,
index fcf4e8ae0b3d44cf20b58f18f63ddc9cfb4cb76c..8ff1ef3edbf6f35857a5399cb558bd5ad38bf27e 100644 (file)
@@ -14,9 +14,8 @@
 #ifndef EXTENDED_STATS_INTERNAL_H
 #define EXTENDED_STATS_INTERNAL_H
 
-#include "utils/sortsupport.h"
 #include "statistics/statistics.h"
-
+#include "utils/sortsupport.h"
 
 typedef struct
 {
index 6ffe184476d8ac58e79658e62e85055d0db8d78b..d540c0aaff3fe56bb45063bffb9c3406b9d827c3 100644 (file)
 #ifndef BUFMGR_INTERNALS_H
 #define BUFMGR_INTERNALS_H
 
+#include "port/atomics.h"
 #include "storage/buf.h"
 #include "storage/bufmgr.h"
 #include "storage/latch.h"
 #include "storage/lwlock.h"
 #include "storage/shmem.h"
 #include "storage/smgr.h"
-#include "port/atomics.h"
 #include "storage/spin.h"
 #include "utils/relcache.h"
 
-
 /*
  * Buffer state is a single 32-bit variable where following data is combined.
  *
index ee06e051ce1246ec8511d5bda433327223613622..0aad8cce72da819f53c7c6aff837d360f1c17934 100644 (file)
@@ -22,8 +22,8 @@
 #ifndef CONDITION_VARIABLE_H
 #define CONDITION_VARIABLE_H
 
-#include "storage/s_lock.h"
 #include "storage/proclist_types.h"
+#include "storage/s_lock.h"
 
 typedef struct
 {
index 6efb7a96481f53c19a6603f5224f3d9b5a02630e..e8b50fe0949962dd05e56555fcb52a56ba1bc0c3 100644 (file)
 #error "lock.h may not be included from frontend code"
 #endif
 
-#include "storage/lockdefs.h"
 #include "storage/backendid.h"
+#include "storage/lockdefs.h"
 #include "storage/lwlock.h"
 #include "storage/shmem.h"
 
-
 /* struct PGPROC is declared in proc.h, but must forward-reference it */
 typedef struct PGPROC PGPROC;
 
index f627dfedc5c27008c95600e45ea37abc7480ccae..f9450dac902a1b66378c7f3ebc8631e2eb74c09d 100644 (file)
@@ -18,9 +18,9 @@
 #error "lwlock.h may not be included from frontend code"
 #endif
 
+#include "port/atomics.h"
 #include "storage/proclist_types.h"
 #include "storage/s_lock.h"
-#include "port/atomics.h"
 
 struct PGPROC;
 
index a3f8f82ff32fbf429751952210c73a0098d3e052..6ba90c6406de5ddd47d0cc4a54b132d735422b2d 100644 (file)
 #ifndef STANDBY_H
 #define STANDBY_H
 
-#include "storage/standbydefs.h"
 #include "storage/lock.h"
 #include "storage/procsignal.h"
 #include "storage/relfilenode.h"
+#include "storage/standbydefs.h"
 
 /* User-settable GUC parameters */
 extern int vacuum_defer_cleanup_age;
index 9e8cd77245b3813f3c5a4e968dbe224b805e614e..b7db7b28641c445702ed1df4f7240a7b8d33742b 100644 (file)
@@ -15,8 +15,8 @@
 #include <ctype.h>
 #include <limits.h>
 
-#include "utils/pg_locale.h"
 #include "mb/pg_wchar.h"
+#include "utils/pg_locale.h"
 
 /*
  * towlower() and friends should be in <wctype.h>, but some pre-C99 systems
index 7352b1f4fec59db072f641f55bd5c34064507efc..6015983010fc95c8e433b466894a07196ad7a82d 100644 (file)
@@ -16,9 +16,9 @@
 
 #include <math.h>
 
+#include "datatype/timestamp.h"
 #include "fmgr.h"
 #include "pgtime.h"
-#include "datatype/timestamp.h"
 
 typedef int32 DateADT;
 
index 0f2b08efe6e993aaaa6d0f9c72259f96e426b329..9af9ffd2968efee49da2ff675371a9d1fcade5b1 100644 (file)
@@ -15,8 +15,8 @@
 #define JSONPATH_H
 
 #include "fmgr.h"
-#include "utils/jsonb.h"
 #include "nodes/pg_list.h"
+#include "utils/jsonb.h"
 
 typedef struct
 {
index 70d8640ef3eabb46bb84863ede58ebdfebd5501e..8b371c5bc817c245bbc8bdf82165ec5c5edcae3a 100644 (file)
@@ -15,8 +15,8 @@
 #ifndef PG_LSN_H
 #define PG_LSN_H
 
-#include "fmgr.h"
 #include "access/xlogdefs.h"
+#include "fmgr.h"
 
 #define DatumGetLSN(X) ((XLogRecPtr) DatumGetInt64(X))
 #define LSNGetDatum(X) (Int64GetDatum((int64) (X)))
index 90d08b1fcf27113935dc1e6e7e4c3510e19bf83b..69e9a9c0e244dbbfdb5a93b96f85250fc5d8aa38 100644 (file)
 #ifndef XML_H
 #define XML_H
 
+#include "executor/tablefunc.h"
 #include "fmgr.h"
 #include "nodes/execnodes.h"
 #include "nodes/primnodes.h"
-#include "executor/tablefunc.h"
 
 typedef struct varlena xmltype;
 
index 7bd0534ef7078edea2fe433588dc1e1c2fbc3523..f71f539bef9eee37fa595c6f347fd44f306dfadd 100644 (file)
@@ -12,9 +12,9 @@
 #include "ecpglib.h"
 #include "ecpglib_extern.h"
 #include "ecpgtype.h"
+#include "sql3types.h"
 #include "sqlca.h"
 #include "sqlda.h"
-#include "sql3types.h"
 
 static void descriptor_free(struct descriptor *desc);
 
index 4bf55fe3fdfe4ca0e7f3a8f53390b25a18137d0b..1a98dea1b55a3be7753ad408a54927925420a494 100644 (file)
@@ -3,12 +3,12 @@
 #ifndef _ECPG_ECPGLIB_EXTERN_H
 #define _ECPG_ECPGLIB_EXTERN_H
 
+#include "ecpg_config.h"
+#include "ecpgtype.h"
 #include "libpq-fe.h"
 #include "sqlca.h"
-#include "sqlda-native.h"
 #include "sqlda-compat.h"
-#include "ecpg_config.h"
-#include "ecpgtype.h"
+#include "sqlda-native.h"
 
 #ifndef CHAR_BIT
 #include <limits.h>
index c4b2183b5dd57cab59ab783a540cedcbc5a0dce8..a07d0dfb9fc2a6b90ea2ac8ea5cccb5ed317ed37 100644 (file)
 #include "ecpglib.h"
 #include "ecpglib_extern.h"
 #include "ecpgtype.h"
+#include "pg_config_paths.h"
 #include "pgtypes_date.h"
 #include "pgtypes_interval.h"
 #include "pgtypes_numeric.h"
 #include "pgtypes_timestamp.h"
-#include "pg_config_paths.h"
 #include "sqlca.h"
 
 #ifndef LONG_LONG_MIN
index c65073f15acc149e5605859a28337a4f307577c1..00240109a6ce629c0e33d69765f5f1c0b07dd57c 100644 (file)
@@ -7,11 +7,12 @@
 #ifndef _ECPGLIB_H
 #define _ECPGLIB_H
 
-#include "libpq-fe.h"
+#include <string.h>
+
 #include "ecpg_config.h"
 #include "ecpgtype.h"
+#include "libpq-fe.h"
 #include "sqlca.h"
-#include <string.h>
 
 /*
  * This is a small extract from c.h since we don't want to leak all postgres
index 323fd5c3c1a147b4bbf6bea542618571e3ee55b1..51d5f94f07f464006b5a3fa09223d0acfdf07286 100644 (file)
@@ -3,9 +3,8 @@
 #ifndef _ECPG_PREPROC_EXTERN_H
 #define _ECPG_PREPROC_EXTERN_H
 
-#include "type.h"
-
 #include "common/keywords.h"
+#include "type.h"
 
 #ifndef CHAR_BIT
 #include <limits.h>
index 90f7cf169c791fa2b674468e9b83fed21af11267..0b224b933cb9760d3f0c5d6c5f609ae7fa4e0e47 100644 (file)
 #define TEXTDOMAIN PG_TEXTDOMAIN("plperl")
 
 /* perl stuff */
-#include "plperl.h"
-#include "plperl_helpers.h"
-
 /* string literal macros defining chunks of perl code */
 #include "perlchunks.h"
+#include "plperl.h"
+#include "plperl_helpers.h"
 /* defines PLPERL_SET_OPMASK */
 #include "plperl_opmask.h"
 
index b44ce7e225f010fcebd317d79c050d15085eae3f..4c37ff898c9fb70c775801ae2e2cbfb9caad4c96 100644 (file)
 #include "access/xact.h"
 #include "catalog/pg_type.h"
 #include "mb/pg_wchar.h"
-#include "utils/memutils.h"
-
-#include "plpython.h"
-
 #include "plpy_cursorobject.h"
-
 #include "plpy_elog.h"
 #include "plpy_main.h"
 #include "plpy_planobject.h"
 #include "plpy_procedure.h"
 #include "plpy_resultobject.h"
 #include "plpy_spi.h"
-
+#include "plpython.h"
+#include "utils/memutils.h"
 
 static PyObject *PLy_cursor_query(const char *query);
 static void PLy_cursor_dealloc(PyObject *arg);
index 15cc444af8eb236dbaa8b39d0354a296ca517048..eb562821a27bb1cb57f22298deacf90f9975969b 100644 (file)
@@ -7,14 +7,10 @@
 #include "postgres.h"
 
 #include "lib/stringinfo.h"
-
-#include "plpython.h"
-
 #include "plpy_elog.h"
-
 #include "plpy_main.h"
 #include "plpy_procedure.h"
-
+#include "plpython.h"
 
 PyObject   *PLy_exc_error = NULL;
 PyObject   *PLy_exc_fatal = NULL;
index 1aec1b27ddda88a8db13e0f82924c87521f96c27..c6f6a6fbccaa61766b517f609fa2854ade7c303a 100644 (file)
 #include "commands/trigger.h"
 #include "executor/spi.h"
 #include "funcapi.h"
-#include "utils/builtins.h"
-#include "utils/lsyscache.h"
-#include "utils/rel.h"
-#include "utils/typcache.h"
-
-#include "plpython.h"
-
-#include "plpy_exec.h"
-
 #include "plpy_elog.h"
+#include "plpy_exec.h"
 #include "plpy_main.h"
 #include "plpy_procedure.h"
 #include "plpy_subxactobject.h"
-
+#include "plpython.h"
+#include "utils/builtins.h"
+#include "utils/lsyscache.h"
+#include "utils/rel.h"
+#include "utils/typcache.h"
 
 /* saved state for a set-returning function */
 typedef struct PLySRFState
index 6edfcf207e547626e178a5ea5ec0f27c2abf6edc..faaec559a22bf24f966485d532aa3786ffda49a5 100644 (file)
 #include "commands/trigger.h"
 #include "executor/spi.h"
 #include "miscadmin.h"
-#include "utils/guc.h"
-#include "utils/memutils.h"
-#include "utils/rel.h"
-#include "utils/syscache.h"
-
-#include "plpython.h"
-
-#include "plpy_main.h"
-
 #include "plpy_elog.h"
 #include "plpy_exec.h"
+#include "plpy_main.h"
 #include "plpy_plpymodule.h"
 #include "plpy_procedure.h"
 #include "plpy_subxactobject.h"
-
+#include "plpython.h"
+#include "utils/guc.h"
+#include "utils/memutils.h"
+#include "utils/rel.h"
+#include "utils/syscache.h"
 
 /*
  * exported functions
index 96ea24cbcf55aabe6d8cf3d8c35c22ec2195ddc5..c23e79fe55f865897e8b870a8027df210e67f433 100644 (file)
@@ -6,16 +6,13 @@
 
 #include "postgres.h"
 
-#include "plpython.h"
-
-#include "plpy_planobject.h"
-
 #include "plpy_cursorobject.h"
 #include "plpy_elog.h"
+#include "plpy_planobject.h"
 #include "plpy_spi.h"
+#include "plpython.h"
 #include "utils/memutils.h"
 
-
 static void PLy_plan_dealloc(PyObject *arg);
 static PyObject *PLy_plan_cursor(PyObject *self, PyObject *args);
 static PyObject *PLy_plan_execute(PyObject *self, PyObject *args);
index c80b35040bf72fb274d22ed2126c59afe8b98452..e308c61d50fe522352e908baf607c9ff9a08c7f1 100644 (file)
@@ -8,21 +8,17 @@
 
 #include "access/xact.h"
 #include "mb/pg_wchar.h"
-#include "utils/builtins.h"
-#include "utils/snapmgr.h"
-
-#include "plpython.h"
-
-#include "plpy_plpymodule.h"
-
 #include "plpy_cursorobject.h"
 #include "plpy_elog.h"
 #include "plpy_main.h"
 #include "plpy_planobject.h"
+#include "plpy_plpymodule.h"
 #include "plpy_resultobject.h"
 #include "plpy_spi.h"
 #include "plpy_subxactobject.h"
-
+#include "plpython.h"
+#include "utils/builtins.h"
+#include "utils/snapmgr.h"
 
 HTAB      *PLy_spi_exceptions = NULL;
 
index 6e08c03fcdb36f8a24e8e4d512fcb96899b8ad51..9e1583961115982019650ab4ce4b5fe6f43df195 100644 (file)
 #include "funcapi.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_type.h"
+#include "plpy_elog.h"
+#include "plpy_main.h"
+#include "plpy_procedure.h"
+#include "plpython.h"
 #include "utils/builtins.h"
 #include "utils/hsearch.h"
 #include "utils/inval.h"
 #include "utils/memutils.h"
 #include "utils/syscache.h"
 
-#include "plpython.h"
-
-#include "plpy_procedure.h"
-
-#include "plpy_elog.h"
-#include "plpy_main.h"
-
-
 static HTAB *PLy_procedure_cache = NULL;
 
 static PLyProcedure *PLy_procedure_create(HeapTuple procTup, Oid fn_oid, bool is_trigger);
index 20cf3edea878e63b248baf333ae1dc2fad871cb8..b31dbdaa1d4d0bcba64523653f69ce9ce0729ac7 100644 (file)
@@ -6,11 +6,9 @@
 
 #include "postgres.h"
 
-#include "plpython.h"
-
-#include "plpy_resultobject.h"
 #include "plpy_elog.h"
-
+#include "plpy_resultobject.h"
+#include "plpython.h"
 
 static void PLy_result_dealloc(PyObject *arg);
 static PyObject *PLy_result_colnames(PyObject *self, PyObject *unused);
index ed2eee0603ae91c458f48bf5119c6af4dc0f7d2f..99c1b4f28f62684a11a766e663327b2014dd8ef8 100644 (file)
 #include "executor/spi.h"
 #include "mb/pg_wchar.h"
 #include "parser/parse_type.h"
-#include "utils/memutils.h"
-#include "utils/syscache.h"
-
-#include "plpython.h"
-
-#include "plpy_spi.h"
-
 #include "plpy_elog.h"
 #include "plpy_main.h"
 #include "plpy_planobject.h"
 #include "plpy_plpymodule.h"
 #include "plpy_procedure.h"
 #include "plpy_resultobject.h"
-
+#include "plpy_spi.h"
+#include "plpython.h"
+#include "utils/memutils.h"
+#include "utils/syscache.h"
 
 static PyObject *PLy_spi_execute_query(char *query, long limit);
 static PyObject *PLy_spi_execute_fetch_result(SPITupleTable *tuptable,
index ec7b689359721f9a27e8756bb44f3878cb3ac8db..a5e2e60da7f48392d21db04950c49157d06a28d6 100644 (file)
@@ -5,9 +5,8 @@
 #ifndef PLPY_SPI_H
 #define PLPY_SPI_H
 
-#include "utils/resowner.h"
-
 #include "plpython.h"
+#include "utils/resowner.h"
 
 extern PyObject *PLy_spi_prepare(PyObject *self, PyObject *args);
 extern PyObject *PLy_spi_execute(PyObject *self, PyObject *args);
index 5dfb8a4cb5467c1c751ea59d8b0fac9b1b6e0ebb..98d7c90c81b6911d3dfd238b3370d54e8a087836 100644 (file)
@@ -7,14 +7,10 @@
 #include "postgres.h"
 
 #include "access/xact.h"
-#include "utils/memutils.h"
-
-#include "plpython.h"
-
-#include "plpy_subxactobject.h"
-
 #include "plpy_elog.h"
-
+#include "plpy_subxactobject.h"
+#include "plpython.h"
+#include "utils/memutils.h"
 
 List      *explicit_subtransactions = NIL;
 
index 1ee85c0cdf3be36a16e42d7be4ae4660ad9a2e33..5b6f86326da045cbfd8714b9b4eeb9b52d32187e 100644 (file)
@@ -6,9 +6,8 @@
 #define PLPY_SUBXACTOBJECT
 
 #include "nodes/pg_list.h"
-#include "utils/resowner.h"
-
 #include "plpython.h"
+#include "utils/resowner.h"
 
 /* a list of nested explicit subtransactions */
 extern List *explicit_subtransactions;
index e1a05244969fbc42f41a4260bda39a0df97397e5..e734b0d130349dc7927a6dd03f896d8a0c8bfe98 100644 (file)
 #include "funcapi.h"
 #include "mb/pg_wchar.h"
 #include "miscadmin.h"
+#include "plpy_elog.h"
+#include "plpy_main.h"
+#include "plpy_typeio.h"
+#include "plpython.h"
 #include "utils/array.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
 
-#include "plpython.h"
-
-#include "plpy_typeio.h"
-
-#include "plpy_elog.h"
-#include "plpy_main.h"
-
-
 /* conversion from Datums to Python objects */
 static PyObject *PLyBool_FromBool(PLyDatumToOb *arg, Datum d);
 static PyObject *PLyFloat_FromFloat4(PLyDatumToOb *arg, Datum d);
index 3412a9817bfb0d86cf22cc5141f69b9faeea7148..d11e6ae1b89571fe70c869b94ab59d2e1450f8b4 100644 (file)
@@ -7,9 +7,8 @@
 
 #include "access/htup.h"
 #include "fmgr.h"
-#include "utils/typcache.h"
-
 #include "plpython.h"
+#include "utils/typcache.h"
 
 struct PLyProcedure;           /* avoid requiring plpy_procedure.h here */
 
index 2128acbd914db9afb2025db2a9a7be2dc79f0082..4a7d7264d79d14d66662a16b9872595c819218aa 100644 (file)
@@ -7,14 +7,10 @@
 #include "postgres.h"
 
 #include "mb/pg_wchar.h"
-#include "utils/memutils.h"
-
-#include "plpython.h"
-
-#include "plpy_util.h"
-
 #include "plpy_elog.h"
-
+#include "plpy_util.h"
+#include "plpython.h"
+#include "utils/memutils.h"
 
 /*
  * Convert a Python unicode object to a Python string/bytes object in
index 7e9d7de70c3ebcd5f372ca14af2141bc1e4e5613..be318a69fa5461b396f29bb13e0cf120cd35f21f 100644 (file)
@@ -12,8 +12,8 @@
  */
 #include "postgres.h"
 
-#include "access/ginblock.h"
 #include "access/gin_private.h"
+#include "access/ginblock.h"
 #include "access/htup_details.h"
 #include "fmgr.h"