0001-Ordering-of-header-files-in-contrib-dir.patch
application/octet-stream
Filename: 0001-Ordering-of-header-files-in-contrib-dir.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch 0001
Subject: Ordering of header files in contrib dir.
| File | + | − |
|---|---|---|
| contrib/bloom/blcost.c | 1 | 2 |
| contrib/bloom/blinsert.c | 1 | 2 |
| contrib/bloom/blscan.c | 2 | 3 |
| contrib/bloom/blutils.c | 4 | 6 |
| contrib/bloom/blvalidate.c | 1 | 2 |
| contrib/btree_gin/btree_gin.c | 1 | 1 |
| contrib/btree_gist/btree_enum.c | 3 | 3 |
| contrib/btree_gist/btree_inet.c | 2 | 2 |
| contrib/btree_gist/btree_numeric.c | 0 | 1 |
| contrib/btree_gist/btree_utils_var.c | 1 | 2 |
| contrib/cube/cube.c | 1 | 2 |
| contrib/dblink/dblink.c | 1 | 2 |
| contrib/hstore/hstore_gist.c | 1 | 2 |
| contrib/hstore/hstore_io.c | 1 | 1 |
| contrib/hstore/hstore_op.c | 1 | 2 |
| contrib/hstore_plpython/hstore_plpython.c | 2 | 2 |
| contrib/intarray/_intbig_gist.c | 1 | 2 |
| contrib/intarray/_int_bool.c | 1 | 2 |
| contrib/intarray/_int_gin.c | 1 | 2 |
| contrib/intarray/_int_gist.c | 1 | 2 |
| contrib/intarray/_int_selfuncs.c | 2 | 2 |
| contrib/intarray/_int_tool.c | 1 | 3 |
| contrib/isn/isn.c | 1 | 1 |
| contrib/jsonb_plperl/jsonb_plperl.c | 1 | 1 |
| contrib/jsonb_plpython/jsonb_plpython.c | 2 | 2 |
| contrib/ltree/crc32.c | 1 | 1 |
| contrib/ltree/lquery_op.c | 1 | 1 |
| contrib/ltree/_ltree_gist.c | 1 | 3 |
| contrib/ltree/ltree_io.c | 2 | 2 |
| contrib/ltree/ltree_op.c | 1 | 1 |
| contrib/ltree_plpython/ltree_plpython.c | 1 | 1 |
| contrib/oid2name/oid2name.c | 1 | 3 |
| contrib/pageinspect/brinfuncs.c | 2 | 4 |
| contrib/pageinspect/btreefuncs.c | 0 | 2 |
| contrib/pageinspect/fsmfuncs.c | 0 | 1 |
| contrib/pageinspect/ginfuncs.c | 0 | 1 |
| contrib/pageinspect/hashfuncs.c | 1 | 2 |
| contrib/pageinspect/heapfuncs.c | 1 | 2 |
| contrib/pageinspect/rawpage.c | 0 | 1 |
| contrib/passwordcheck/passwordcheck.c | 1 | 1 |
| contrib/pgcrypto/crypt-md5.c | 1 | 1 |
| contrib/pgcrypto/internal.c | 3 | 3 |
| contrib/pgcrypto/mbuf.c | 1 | 1 |
| contrib/pgcrypto/openssl.c | 1 | 2 |
| contrib/pgcrypto/pgcrypto.c | 3 | 4 |
| contrib/pgcrypto/pgp-armor.c | 1 | 1 |
| contrib/pgcrypto/pgp.c | 1 | 1 |
| contrib/pgcrypto/pgp-cfb.c | 1 | 1 |
| contrib/pgcrypto/pgp-compress.c | 1 | 2 |
| contrib/pgcrypto/pgp-decrypt.c | 1 | 1 |
| contrib/pgcrypto/pgp-encrypt.c | 1 | 2 |
| contrib/pgcrypto/pgp-info.c | 1 | 1 |
| contrib/pgcrypto/pgp-mpi.c | 1 | 1 |
| contrib/pgcrypto/pgp-mpi-internal.c | 1 | 2 |
| contrib/pgcrypto/pgp-mpi-openssl.c | 1 | 1 |
| contrib/pgcrypto/pgp-pgsql.c | 5 | 6 |
| contrib/pgcrypto/pgp-pubdec.c | 1 | 1 |
| contrib/pgcrypto/pgp-pubenc.c | 1 | 1 |
| contrib/pgcrypto/pgp-pubkey.c | 1 | 1 |
| contrib/pgcrypto/pgp-s2k.c | 1 | 2 |
| contrib/pgcrypto/px-crypt.c | 1 | 2 |
| contrib/pg_standby/pg_standby.c | 1 | 2 |
| contrib/pgstattuple/pgstatapprox.c | 3 | 3 |
| contrib/pg_trgm/trgm_gin.c | 0 | 2 |
| contrib/pg_trgm/trgm_gist.c | 0 | 2 |
| contrib/pg_trgm/trgm_op.c | 1 | 2 |
| contrib/pg_trgm/trgm_regexp.c | 0 | 2 |
| contrib/postgres_fdw/connection.c | 0 | 2 |
| contrib/postgres_fdw/deparse.c | 0 | 2 |
| contrib/postgres_fdw/option.c | 0 | 2 |
| contrib/postgres_fdw/postgres_fdw.c | 0 | 1 |
| contrib/postgres_fdw/shippable.c | 0 | 2 |
| contrib/sepgsql/database.c | 2 | 2 |
| contrib/sepgsql/dml.c | 2 | 3 |
| contrib/sepgsql/hooks.c | 1 | 2 |
| contrib/sepgsql/label.c | 2 | 3 |
| contrib/sepgsql/proc.c | 1 | 2 |
| contrib/sepgsql/relation.c | 3 | 4 |
| contrib/sepgsql/schema.c | 1 | 2 |
| contrib/sepgsql/uavc.c | 1 | 2 |
| contrib/spi/moddatetime.c | 1 | 1 |
| contrib/tablefunc/tablefunc.c | 1 | 2 |
| contrib/tcn/tcn.c | 1 | 1 |
| contrib/vacuumlo/vacuumlo.c | 1 | 2 |
From 70285e3a973cec292cdab1804fe6b4dec5a5d8b4 Mon Sep 17 00:00:00 2001
From: vignesh <vignesh@localhost.localdomain>
Date: Sun, 20 Oct 2019 16:07:13 +0530
Subject: [PATCH 1/3] Ordering of header files in contrib dir.
Ordering of header files that is included in source code in contrib dir.
---
contrib/bloom/blcost.c | 3 +--
contrib/bloom/blinsert.c | 3 +--
contrib/bloom/blscan.c | 5 ++---
contrib/bloom/blutils.c | 10 ++++------
contrib/bloom/blvalidate.c | 3 +--
contrib/btree_gin/btree_gin.c | 2 +-
contrib/btree_gist/btree_enum.c | 6 +++---
contrib/btree_gist/btree_inet.c | 4 ++--
contrib/btree_gist/btree_numeric.c | 1 -
contrib/btree_gist/btree_utils_var.c | 3 +--
contrib/cube/cube.c | 3 +--
contrib/dblink/dblink.c | 3 +--
contrib/hstore/hstore_gist.c | 3 +--
contrib/hstore/hstore_io.c | 2 +-
contrib/hstore/hstore_op.c | 3 +--
contrib/hstore_plpython/hstore_plpython.c | 4 ++--
contrib/intarray/_int_bool.c | 3 +--
contrib/intarray/_int_gin.c | 3 +--
contrib/intarray/_int_gist.c | 3 +--
contrib/intarray/_int_selfuncs.c | 4 ++--
contrib/intarray/_int_tool.c | 4 +---
contrib/intarray/_intbig_gist.c | 3 +--
contrib/isn/isn.c | 2 +-
contrib/jsonb_plperl/jsonb_plperl.c | 2 +-
contrib/jsonb_plpython/jsonb_plpython.c | 4 ++--
contrib/ltree/_ltree_gist.c | 4 +---
contrib/ltree/crc32.c | 2 +-
contrib/ltree/lquery_op.c | 2 +-
contrib/ltree/ltree_io.c | 4 ++--
contrib/ltree/ltree_op.c | 2 +-
contrib/ltree_plpython/ltree_plpython.c | 2 +-
contrib/oid2name/oid2name.c | 4 +---
contrib/pageinspect/brinfuncs.c | 6 ++----
contrib/pageinspect/btreefuncs.c | 2 --
contrib/pageinspect/fsmfuncs.c | 1 -
contrib/pageinspect/ginfuncs.c | 1 -
contrib/pageinspect/hashfuncs.c | 3 +--
contrib/pageinspect/heapfuncs.c | 3 +--
contrib/pageinspect/rawpage.c | 1 -
contrib/passwordcheck/passwordcheck.c | 2 +-
contrib/pg_standby/pg_standby.c | 3 +--
contrib/pg_trgm/trgm_gin.c | 2 --
contrib/pg_trgm/trgm_gist.c | 2 --
contrib/pg_trgm/trgm_op.c | 3 +--
contrib/pg_trgm/trgm_regexp.c | 2 --
contrib/pgcrypto/crypt-md5.c | 2 +-
contrib/pgcrypto/internal.c | 6 +++---
contrib/pgcrypto/mbuf.c | 2 +-
contrib/pgcrypto/openssl.c | 3 +--
contrib/pgcrypto/pgcrypto.c | 7 +++----
contrib/pgcrypto/pgp-armor.c | 2 +-
contrib/pgcrypto/pgp-cfb.c | 2 +-
contrib/pgcrypto/pgp-compress.c | 3 +--
contrib/pgcrypto/pgp-decrypt.c | 2 +-
contrib/pgcrypto/pgp-encrypt.c | 3 +--
contrib/pgcrypto/pgp-info.c | 2 +-
contrib/pgcrypto/pgp-mpi-internal.c | 3 +--
contrib/pgcrypto/pgp-mpi-openssl.c | 2 +-
contrib/pgcrypto/pgp-mpi.c | 2 +-
contrib/pgcrypto/pgp-pgsql.c | 11 +++++------
contrib/pgcrypto/pgp-pubdec.c | 2 +-
contrib/pgcrypto/pgp-pubenc.c | 2 +-
contrib/pgcrypto/pgp-pubkey.c | 2 +-
contrib/pgcrypto/pgp-s2k.c | 3 +--
contrib/pgcrypto/pgp.c | 2 +-
contrib/pgcrypto/px-crypt.c | 3 +--
contrib/pgstattuple/pgstatapprox.c | 6 +++---
contrib/postgres_fdw/connection.c | 2 --
contrib/postgres_fdw/deparse.c | 2 --
contrib/postgres_fdw/option.c | 2 --
contrib/postgres_fdw/postgres_fdw.c | 1 -
contrib/postgres_fdw/shippable.c | 2 --
contrib/sepgsql/database.c | 4 ++--
contrib/sepgsql/dml.c | 5 ++---
contrib/sepgsql/hooks.c | 3 +--
contrib/sepgsql/label.c | 5 ++---
contrib/sepgsql/proc.c | 3 +--
contrib/sepgsql/relation.c | 7 +++----
contrib/sepgsql/schema.c | 3 +--
contrib/sepgsql/uavc.c | 3 +--
contrib/spi/moddatetime.c | 2 +-
contrib/tablefunc/tablefunc.c | 3 +--
contrib/tcn/tcn.c | 2 +-
contrib/vacuumlo/vacuumlo.c | 3 +--
84 files changed, 98 insertions(+), 163 deletions(-)
diff --git a/contrib/bloom/blcost.c b/contrib/bloom/blcost.c
index f9fe57f..eff0c56 100644
--- a/contrib/bloom/blcost.c
+++ b/contrib/bloom/blcost.c
@@ -11,12 +11,11 @@
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "bloom.h"
#include "fmgr.h"
#include "utils/selfuncs.h"
-#include "bloom.h"
-
/*
* Estimate cost of bloom index scan.
*/
diff --git a/contrib/bloom/blinsert.c b/contrib/bloom/blinsert.c
index 4b2186b..bcbcd09 100644
--- a/contrib/bloom/blinsert.c
+++ b/contrib/bloom/blinsert.c
@@ -11,6 +11,7 @@
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "bloom.h"
#include "access/genam.h"
#include "access/generic_xlog.h"
@@ -23,8 +24,6 @@
#include "utils/memutils.h"
#include "utils/rel.h"
-#include "bloom.h"
-
PG_MODULE_MAGIC;
/*
diff --git a/contrib/bloom/blscan.c b/contrib/bloom/blscan.c
index 49e364a..aab3a76 100644
--- a/contrib/bloom/blscan.c
+++ b/contrib/bloom/blscan.c
@@ -11,17 +11,16 @@
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "bloom.h"
#include "access/relscan.h"
-#include "pgstat.h"
#include "miscadmin.h"
+#include "pgstat.h"
#include "storage/bufmgr.h"
#include "storage/lmgr.h"
#include "utils/memutils.h"
#include "utils/rel.h"
-#include "bloom.h"
-
/*
* Begin scan of bloom index.
*/
diff --git a/contrib/bloom/blutils.c b/contrib/bloom/blutils.c
index dbb24cb..d600e17 100644
--- a/contrib/bloom/blutils.c
+++ b/contrib/bloom/blutils.c
@@ -12,20 +12,18 @@
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "bloom.h"
#include "access/amapi.h"
#include "access/generic_xlog.h"
+#include "access/reloptions.h"
#include "catalog/index.h"
-#include "storage/lmgr.h"
#include "miscadmin.h"
#include "storage/bufmgr.h"
-#include "storage/indexfsm.h"
-#include "utils/memutils.h"
-#include "access/reloptions.h"
#include "storage/freespace.h"
#include "storage/indexfsm.h"
-
-#include "bloom.h"
+#include "storage/lmgr.h"
+#include "utils/memutils.h"
/* Signature dealing macros - note i is assumed to be of type int */
#define GETWORD(x,i) ( *( (BloomSignatureWord *)(x) + ( (i) / SIGNWORDBITS ) ) )
diff --git a/contrib/bloom/blvalidate.c b/contrib/bloom/blvalidate.c
index e9bd1b4..d6919c2 100644
--- a/contrib/bloom/blvalidate.c
+++ b/contrib/bloom/blvalidate.c
@@ -11,6 +11,7 @@
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "bloom.h"
#include "access/amvalidate.h"
#include "access/htup_details.h"
@@ -24,8 +25,6 @@
#include "utils/regproc.h"
#include "utils/syscache.h"
-#include "bloom.h"
-
/*
* Validator for a bloom opclass.
*/
diff --git a/contrib/btree_gin/btree_gin.c b/contrib/btree_gin/btree_gin.c
index 2ecf7a2..0ed3d58 100644
--- a/contrib/btree_gin/btree_gin.c
+++ b/contrib/btree_gin/btree_gin.c
@@ -14,8 +14,8 @@
#include "utils/inet.h"
#include "utils/numeric.h"
#include "utils/timestamp.h"
-#include "utils/varbit.h"
#include "utils/uuid.h"
+#include "utils/varbit.h"
PG_MODULE_MAGIC;
diff --git a/contrib/btree_gist/btree_enum.c b/contrib/btree_gist/btree_enum.c
index 0ec7d8b..dc1734a 100644
--- a/contrib/btree_gist/btree_enum.c
+++ b/contrib/btree_gist/btree_enum.c
@@ -2,11 +2,11 @@
* contrib/btree_gist/btree_enum.c
*/
#include "postgres.h"
-#include "fmgr.h"
-#include "utils/builtins.h"
-
#include "btree_gist.h"
+
#include "btree_utils_num.h"
+#include "fmgr.h"
+#include "utils/builtins.h"
/* enums are really Oids, so we just use the same structure */
diff --git a/contrib/btree_gist/btree_inet.c b/contrib/btree_gist/btree_inet.c
index 34308cc..11e2589 100644
--- a/contrib/btree_gist/btree_inet.c
+++ b/contrib/btree_gist/btree_inet.c
@@ -2,12 +2,12 @@
* contrib/btree_gist/btree_inet.c
*/
#include "postgres.h"
-
#include "btree_gist.h"
+
#include "btree_utils_num.h"
+#include "catalog/pg_type.h"
#include "utils/builtins.h"
#include "utils/inet.h"
-#include "catalog/pg_type.h"
typedef struct inetkey
{
diff --git a/contrib/btree_gist/btree_numeric.c b/contrib/btree_gist/btree_numeric.c
index b72060c..664a2d5 100644
--- a/contrib/btree_gist/btree_numeric.c
+++ b/contrib/btree_gist/btree_numeric.c
@@ -2,7 +2,6 @@
* contrib/btree_gist/btree_numeric.c
*/
#include "postgres.h"
-
#include "btree_gist.h"
#include <math.h>
diff --git a/contrib/btree_gist/btree_utils_var.c b/contrib/btree_gist/btree_utils_var.c
index 670c879..ead737a 100644
--- a/contrib/btree_gist/btree_utils_var.c
+++ b/contrib/btree_gist/btree_utils_var.c
@@ -2,7 +2,6 @@
* contrib/btree_gist/btree_utils_var.c
*/
#include "postgres.h"
-
#include "btree_gist.h"
#include <math.h>
@@ -10,8 +9,8 @@
#include <float.h>
#include "btree_utils_var.h"
-#include "utils/pg_locale.h"
#include "utils/builtins.h"
+#include "utils/pg_locale.h"
#include "utils/rel.h"
/* used for key sorting */
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c
index b720366..29670a6 100644
--- a/contrib/cube/cube.c
+++ b/contrib/cube/cube.c
@@ -7,6 +7,7 @@
******************************************************************************/
#include "postgres.h"
+#include "cubedata.h"
#include <math.h>
@@ -15,8 +16,6 @@
#include "utils/array.h"
#include "utils/float.h"
-#include "cubedata.h"
-
PG_MODULE_MAGIC;
/*
diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index e432457..54b7bf9 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -34,8 +34,6 @@
#include <limits.h>
-#include "libpq-fe.h"
-
#include "access/htup_details.h"
#include "access/relation.h"
#include "access/reloptions.h"
@@ -50,6 +48,7 @@
#include "foreign/foreign.h"
#include "funcapi.h"
#include "lib/stringinfo.h"
+#include "libpq-fe.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "parser/scansup.h"
diff --git a/contrib/hstore/hstore_gist.c b/contrib/hstore/hstore_gist.c
index 6a885f2..a2e1455 100644
--- a/contrib/hstore/hstore_gist.c
+++ b/contrib/hstore/hstore_gist.c
@@ -2,14 +2,13 @@
* contrib/hstore/hstore_gist.c
*/
#include "postgres.h"
+#include "hstore.h"
#include "access/gist.h"
#include "access/stratnum.h"
#include "catalog/pg_type.h"
#include "utils/pg_crc.h"
-#include "hstore.h"
-
/* bigint defines */
#define BITBYTE 8
#define SIGLENINT 4 /* >122 => key will toast, so very slow!!! */
diff --git a/contrib/hstore/hstore_io.c b/contrib/hstore/hstore_io.c
index 745497c..5013225 100644
--- a/contrib/hstore/hstore_io.c
+++ b/contrib/hstore/hstore_io.c
@@ -2,6 +2,7 @@
* contrib/hstore/hstore_io.c
*/
#include "postgres.h"
+#include "hstore.h"
#include <ctype.h>
@@ -18,7 +19,6 @@
#include "utils/memutils.h"
#include "utils/typcache.h"
-#include "hstore.h"
PG_MODULE_MAGIC;
diff --git a/contrib/hstore/hstore_op.c b/contrib/hstore/hstore_op.c
index a3a8a91..dd5d476 100644
--- a/contrib/hstore/hstore_op.c
+++ b/contrib/hstore/hstore_op.c
@@ -2,6 +2,7 @@
* contrib/hstore/hstore_op.c
*/
#include "postgres.h"
+#include "hstore.h"
#include "access/htup_details.h"
#include "catalog/pg_type.h"
@@ -10,8 +11,6 @@
#include "utils/hashutils.h"
#include "utils/memutils.h"
-#include "hstore.h"
-
/* old names for C functions */
HSTORE_POLLUTE(hstore_fetchval, fetchval);
HSTORE_POLLUTE(hstore_exists, exists);
diff --git a/contrib/hstore_plpython/hstore_plpython.c b/contrib/hstore_plpython/hstore_plpython.c
index 93705f0..4dee569 100644
--- a/contrib/hstore_plpython/hstore_plpython.c
+++ b/contrib/hstore_plpython/hstore_plpython.c
@@ -1,9 +1,9 @@
#include "postgres.h"
#include "fmgr.h"
-#include "plpython.h"
-#include "plpy_typeio.h"
#include "hstore/hstore.h"
+#include "plpy_typeio.h"
+#include "plpython.h"
PG_MODULE_MAGIC;
diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c
index 91e2a80..a609504 100644
--- a/contrib/intarray/_int_bool.c
+++ b/contrib/intarray/_int_bool.c
@@ -2,12 +2,11 @@
* contrib/intarray/_int_bool.c
*/
#include "postgres.h"
+#include "_int.h"
#include "miscadmin.h"
#include "utils/builtins.h"
-#include "_int.h"
-
PG_FUNCTION_INFO_V1(bqarr_in);
PG_FUNCTION_INFO_V1(bqarr_out);
PG_FUNCTION_INFO_V1(boolop);
diff --git a/contrib/intarray/_int_gin.c b/contrib/intarray/_int_gin.c
index 7aebfec..4f3c9b7 100644
--- a/contrib/intarray/_int_gin.c
+++ b/contrib/intarray/_int_gin.c
@@ -2,12 +2,11 @@
* contrib/intarray/_int_gin.c
*/
#include "postgres.h"
+#include "_int.h"
#include "access/gin.h"
#include "access/stratnum.h"
-#include "_int.h"
-
PG_FUNCTION_INFO_V1(ginint4_queryextract);
Datum
diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c
index e5a8011..e6cf4d2 100644
--- a/contrib/intarray/_int_gist.c
+++ b/contrib/intarray/_int_gist.c
@@ -2,14 +2,13 @@
* contrib/intarray/_int_gist.c
*/
#include "postgres.h"
+#include "_int.h"
#include <limits.h>
#include "access/gist.h"
#include "access/stratnum.h"
-#include "_int.h"
-
#define GETENTRY(vec,pos) ((ArrayType *) DatumGetPointer((vec)->vector[(pos)].key))
/*
diff --git a/contrib/intarray/_int_selfuncs.c b/contrib/intarray/_int_selfuncs.c
index aebffae..6d555de 100644
--- a/contrib/intarray/_int_selfuncs.c
+++ b/contrib/intarray/_int_selfuncs.c
@@ -19,11 +19,11 @@
#include "catalog/pg_operator.h"
#include "catalog/pg_statistic.h"
#include "catalog/pg_type.h"
+#include "miscadmin.h"
#include "utils/builtins.h"
+#include "utils/lsyscache.h"
#include "utils/selfuncs.h"
#include "utils/syscache.h"
-#include "utils/lsyscache.h"
-#include "miscadmin.h"
PG_FUNCTION_INFO_V1(_int_overlap_sel);
PG_FUNCTION_INFO_V1(_int_contains_sel);
diff --git a/contrib/intarray/_int_tool.c b/contrib/intarray/_int_tool.c
index fde8d15..ae1f03b 100644
--- a/contrib/intarray/_int_tool.c
+++ b/contrib/intarray/_int_tool.c
@@ -2,14 +2,12 @@
* contrib/intarray/_int_tool.c
*/
#include "postgres.h"
+#include "_int.h"
#include <limits.h>
#include "catalog/pg_type.h"
-#include "_int.h"
-
-
/* arguments are assumed sorted & unique-ified */
bool
inner_int_contains(ArrayType *a, ArrayType *b)
diff --git a/contrib/intarray/_intbig_gist.c b/contrib/intarray/_intbig_gist.c
index 2a20abe..671d991 100644
--- a/contrib/intarray/_intbig_gist.c
+++ b/contrib/intarray/_intbig_gist.c
@@ -2,13 +2,12 @@
* contrib/intarray/_intbig_gist.c
*/
#include "postgres.h"
+#include "_int.h"
#include "access/gist.h"
#include "access/stratnum.h"
#include "port/pg_bitutils.h"
-#include "_int.h"
-
#define GETENTRY(vec,pos) ((GISTTYPE *) DatumGetPointer((vec)->vector[(pos)].key))
/*
** _intbig methods
diff --git a/contrib/isn/isn.c b/contrib/isn/isn.c
index 0c2cac7..98abac2 100644
--- a/contrib/isn/isn.c
+++ b/contrib/isn/isn.c
@@ -13,11 +13,11 @@
*/
#include "postgres.h"
+#include "isn.h"
#include "fmgr.h"
#include "utils/builtins.h"
-#include "isn.h"
#include "EAN13.h"
#include "ISBN.h"
#include "ISMN.h"
diff --git a/contrib/jsonb_plperl/jsonb_plperl.c b/contrib/jsonb_plperl/jsonb_plperl.c
index 04b04df..4ae1353 100644
--- a/contrib/jsonb_plperl/jsonb_plperl.c
+++ b/contrib/jsonb_plperl/jsonb_plperl.c
@@ -5,8 +5,8 @@
#include "fmgr.h"
#include "plperl.h"
#include "plperl_helpers.h"
-#include "utils/jsonb.h"
#include "utils/fmgrprotos.h"
+#include "utils/jsonb.h"
PG_MODULE_MAGIC;
diff --git a/contrib/jsonb_plpython/jsonb_plpython.c b/contrib/jsonb_plpython/jsonb_plpython.c
index 776cf7c..ecaa4c6 100644
--- a/contrib/jsonb_plpython/jsonb_plpython.c
+++ b/contrib/jsonb_plpython/jsonb_plpython.c
@@ -1,10 +1,10 @@
#include "postgres.h"
-#include "plpython.h"
#include "plpy_elog.h"
#include "plpy_typeio.h"
-#include "utils/jsonb.h"
+#include "plpython.h"
#include "utils/fmgrprotos.h"
+#include "utils/jsonb.h"
#include "utils/numeric.h"
PG_MODULE_MAGIC;
diff --git a/contrib/ltree/_ltree_gist.c b/contrib/ltree/_ltree_gist.c
index c33ac4e..6b14ed5 100644
--- a/contrib/ltree/_ltree_gist.c
+++ b/contrib/ltree/_ltree_gist.c
@@ -9,11 +9,9 @@
#include "access/gist.h"
#include "access/stratnum.h"
-#include "port/pg_bitutils.h"
-
#include "crc32.h"
#include "ltree.h"
-
+#include "port/pg_bitutils.h"
PG_FUNCTION_INFO_V1(_ltree_compress);
PG_FUNCTION_INFO_V1(_ltree_same);
diff --git a/contrib/ltree/crc32.c b/contrib/ltree/crc32.c
index 447e4b2..0c3e459 100644
--- a/contrib/ltree/crc32.c
+++ b/contrib/ltree/crc32.c
@@ -16,8 +16,8 @@
#define TOLOWER(x) (x)
#endif
-#include "utils/pg_crc.h"
#include "crc32.h"
+#include "utils/pg_crc.h"
unsigned int
ltree_crc32_sz(char *buf, int size)
diff --git a/contrib/ltree/lquery_op.c b/contrib/ltree/lquery_op.c
index 62172d5..ea0a0f6 100644
--- a/contrib/ltree/lquery_op.c
+++ b/contrib/ltree/lquery_op.c
@@ -4,12 +4,12 @@
* contrib/ltree/lquery_op.c
*/
#include "postgres.h"
+#include "ltree.h"
#include <ctype.h>
#include "catalog/pg_collation.h"
#include "utils/formatting.h"
-#include "ltree.h"
PG_FUNCTION_INFO_V1(ltq_regex);
PG_FUNCTION_INFO_V1(ltq_rregex);
diff --git a/contrib/ltree/ltree_io.c b/contrib/ltree/ltree_io.c
index f54f037..992c22a 100644
--- a/contrib/ltree/ltree_io.c
+++ b/contrib/ltree/ltree_io.c
@@ -4,12 +4,12 @@
* contrib/ltree/ltree_io.c
*/
#include "postgres.h"
+#include "ltree.h"
#include <ctype.h>
-#include "ltree.h"
-#include "utils/memutils.h"
#include "crc32.h"
+#include "utils/memutils.h"
PG_FUNCTION_INFO_V1(ltree_in);
PG_FUNCTION_INFO_V1(ltree_out);
diff --git a/contrib/ltree/ltree_op.c b/contrib/ltree/ltree_op.c
index df61c63..c689530 100644
--- a/contrib/ltree/ltree_op.c
+++ b/contrib/ltree/ltree_op.c
@@ -4,6 +4,7 @@
* contrib/ltree/ltree_op.c
*/
#include "postgres.h"
+#include "ltree.h"
#include <ctype.h>
@@ -12,7 +13,6 @@
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/selfuncs.h"
-#include "ltree.h"
PG_MODULE_MAGIC;
diff --git a/contrib/ltree_plpython/ltree_plpython.c b/contrib/ltree_plpython/ltree_plpython.c
index b254aa5..1570e77 100644
--- a/contrib/ltree_plpython/ltree_plpython.c
+++ b/contrib/ltree_plpython/ltree_plpython.c
@@ -1,8 +1,8 @@
#include "postgres.h"
#include "fmgr.h"
-#include "plpython.h"
#include "ltree/ltree.h"
+#include "plpython.h"
PG_MODULE_MAGIC;
diff --git a/contrib/oid2name/oid2name.c b/contrib/oid2name/oid2name.c
index fa1e795..9a3eac2 100644
--- a/contrib/oid2name/oid2name.c
+++ b/contrib/oid2name/oid2name.c
@@ -10,13 +10,11 @@
#include "postgres_fe.h"
#include "catalog/pg_class_d.h"
-
#include "common/logging.h"
#include "fe_utils/connect.h"
+#include "getopt_long.h"
#include "libpq-fe.h"
#include "pg_getopt.h"
-#include "getopt_long.h"
-
/* an extensible array to keep track of elements to show */
typedef struct
diff --git a/contrib/pageinspect/brinfuncs.c b/contrib/pageinspect/brinfuncs.c
index 04140ec..47d7d22 100644
--- a/contrib/pageinspect/brinfuncs.c
+++ b/contrib/pageinspect/brinfuncs.c
@@ -8,25 +8,23 @@
* contrib/pageinspect/brinfuncs.c
*/
#include "postgres.h"
-
#include "pageinspect.h"
-#include "access/htup_details.h"
#include "access/brin.h"
#include "access/brin_internal.h"
#include "access/brin_page.h"
#include "access/brin_revmap.h"
#include "access/brin_tuple.h"
+#include "access/htup_details.h"
#include "catalog/index.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "lib/stringinfo.h"
+#include "miscadmin.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
-#include "miscadmin.h"
-
PG_FUNCTION_INFO_V1(brin_page_type);
PG_FUNCTION_INFO_V1(brin_page_items);
diff --git a/contrib/pageinspect/btreefuncs.c b/contrib/pageinspect/btreefuncs.c
index 8d27c9b..59f590e 100644
--- a/contrib/pageinspect/btreefuncs.c
+++ b/contrib/pageinspect/btreefuncs.c
@@ -26,7 +26,6 @@
*/
#include "postgres.h"
-
#include "pageinspect.h"
#include "access/nbtree.h"
@@ -39,7 +38,6 @@
#include "utils/rel.h"
#include "utils/varlena.h"
-
PG_FUNCTION_INFO_V1(bt_metap);
PG_FUNCTION_INFO_V1(bt_page_items);
PG_FUNCTION_INFO_V1(bt_page_items_bytea);
diff --git a/contrib/pageinspect/fsmfuncs.c b/contrib/pageinspect/fsmfuncs.c
index 4b3c596..bd15085 100644
--- a/contrib/pageinspect/fsmfuncs.c
+++ b/contrib/pageinspect/fsmfuncs.c
@@ -18,7 +18,6 @@
*/
#include "postgres.h"
-
#include "pageinspect.h"
#include "funcapi.h"
diff --git a/contrib/pageinspect/ginfuncs.c b/contrib/pageinspect/ginfuncs.c
index 229f9f9..b887769 100644
--- a/contrib/pageinspect/ginfuncs.c
+++ b/contrib/pageinspect/ginfuncs.c
@@ -8,7 +8,6 @@
* contrib/pageinspect/ginfuncs.c
*/
#include "postgres.h"
-
#include "pageinspect.h"
#include "access/gin.h"
diff --git a/contrib/pageinspect/hashfuncs.c b/contrib/pageinspect/hashfuncs.c
index 9374c4a..372a3f8 100644
--- a/contrib/pageinspect/hashfuncs.c
+++ b/contrib/pageinspect/hashfuncs.c
@@ -9,13 +9,12 @@
*/
#include "postgres.h"
-
#include "pageinspect.h"
#include "access/hash.h"
#include "access/htup_details.h"
-#include "catalog/pg_type.h"
#include "catalog/pg_am.h"
+#include "catalog/pg_type.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "utils/array.h"
diff --git a/contrib/pageinspect/heapfuncs.c b/contrib/pageinspect/heapfuncs.c
index 02e2ab9..e9d7e50 100644
--- a/contrib/pageinspect/heapfuncs.c
+++ b/contrib/pageinspect/heapfuncs.c
@@ -24,14 +24,13 @@
*/
#include "postgres.h"
-
#include "pageinspect.h"
#include "access/htup_details.h"
#include "access/relation.h"
-#include "funcapi.h"
#include "catalog/pg_am_d.h"
#include "catalog/pg_type.h"
+#include "funcapi.h"
#include "miscadmin.h"
#include "port/pg_bitutils.h"
#include "utils/array.h"
diff --git a/contrib/pageinspect/rawpage.c b/contrib/pageinspect/rawpage.c
index f08f62f..69f655e 100644
--- a/contrib/pageinspect/rawpage.c
+++ b/contrib/pageinspect/rawpage.c
@@ -14,7 +14,6 @@
*/
#include "postgres.h"
-
#include "pageinspect.h"
#include "access/htup_details.h"
diff --git a/contrib/passwordcheck/passwordcheck.c b/contrib/passwordcheck/passwordcheck.c
index c3fb5a9..6810cab 100644
--- a/contrib/passwordcheck/passwordcheck.c
+++ b/contrib/passwordcheck/passwordcheck.c
@@ -21,8 +21,8 @@
#endif
#include "commands/user.h"
-#include "libpq/crypt.h"
#include "fmgr.h"
+#include "libpq/crypt.h"
PG_MODULE_MAGIC;
diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c
index 9fae146..c6beea7 100644
--- a/contrib/pg_standby/pg_standby.c
+++ b/contrib/pg_standby/pg_standby.c
@@ -30,9 +30,8 @@
#include <signal.h>
#include <sys/time.h>
-#include "pg_getopt.h"
-
#include "access/xlog_internal.h"
+#include "pg_getopt.h"
const char *progname;
diff --git a/contrib/pg_trgm/trgm_gin.c b/contrib/pg_trgm/trgm_gin.c
index 1b9809b..33d1476 100644
--- a/contrib/pg_trgm/trgm_gin.c
+++ b/contrib/pg_trgm/trgm_gin.c
@@ -2,14 +2,12 @@
* contrib/pg_trgm/trgm_gin.c
*/
#include "postgres.h"
-
#include "trgm.h"
#include "access/gin.h"
#include "access/stratnum.h"
#include "fmgr.h"
-
PG_FUNCTION_INFO_V1(gin_extract_trgm);
PG_FUNCTION_INFO_V1(gin_extract_value_trgm);
PG_FUNCTION_INFO_V1(gin_extract_query_trgm);
diff --git a/contrib/pg_trgm/trgm_gist.c b/contrib/pg_trgm/trgm_gist.c
index e79db8a..e43ba04 100644
--- a/contrib/pg_trgm/trgm_gist.c
+++ b/contrib/pg_trgm/trgm_gist.c
@@ -2,14 +2,12 @@
* contrib/pg_trgm/trgm_gist.c
*/
#include "postgres.h"
-
#include "trgm.h"
#include "access/stratnum.h"
#include "fmgr.h"
#include "port/pg_bitutils.h"
-
typedef struct
{
/* most recent inputs to gtrgm_consistent */
diff --git a/contrib/pg_trgm/trgm_op.c b/contrib/pg_trgm/trgm_op.c
index 0d4614e..3118e98 100644
--- a/contrib/pg_trgm/trgm_op.c
+++ b/contrib/pg_trgm/trgm_op.c
@@ -2,11 +2,10 @@
* contrib/pg_trgm/trgm_op.c
*/
#include "postgres.h"
+#include "trgm.h"
#include <ctype.h>
-#include "trgm.h"
-
#include "catalog/pg_type.h"
#include "tsearch/ts_locale.h"
#include "utils/lsyscache.h"
diff --git a/contrib/pg_trgm/trgm_regexp.c b/contrib/pg_trgm/trgm_regexp.c
index 3ad5731..ffec469 100644
--- a/contrib/pg_trgm/trgm_regexp.c
+++ b/contrib/pg_trgm/trgm_regexp.c
@@ -190,7 +190,6 @@
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-
#include "trgm.h"
#include "regex/regexport.h"
@@ -198,7 +197,6 @@
#include "utils/hsearch.h"
#include "utils/memutils.h"
-
/*
* Uncomment (or use -DTRGM_REGEXP_DEBUG) to print debug info,
* for exploring and debugging the algorithm implementation.
diff --git a/contrib/pgcrypto/crypt-md5.c b/contrib/pgcrypto/crypt-md5.c
index 6a09d76..b6466d3 100644
--- a/contrib/pgcrypto/crypt-md5.c
+++ b/contrib/pgcrypto/crypt-md5.c
@@ -8,8 +8,8 @@
#include "postgres.h"
-#include "px.h"
#include "px-crypt.h"
+#include "px.h"
#define MD5_SIZE 16
diff --git a/contrib/pgcrypto/internal.c b/contrib/pgcrypto/internal.c
index db58408..a12d7b4 100644
--- a/contrib/pgcrypto/internal.c
+++ b/contrib/pgcrypto/internal.c
@@ -33,11 +33,11 @@
#include <time.h>
-#include "px.h"
-#include "md5.h"
-#include "sha1.h"
#include "blf.h"
+#include "md5.h"
+#include "px.h"
#include "rijndael.h"
+#include "sha1.h"
#ifndef MD5_DIGEST_LENGTH
#define MD5_DIGEST_LENGTH 16
diff --git a/contrib/pgcrypto/mbuf.c b/contrib/pgcrypto/mbuf.c
index 73dbfbd..0467212 100644
--- a/contrib/pgcrypto/mbuf.c
+++ b/contrib/pgcrypto/mbuf.c
@@ -31,8 +31,8 @@
#include "postgres.h"
-#include "px.h"
#include "mbuf.h"
+#include "px.h"
#define STEP (16*1024)
diff --git a/contrib/pgcrypto/openssl.c b/contrib/pgcrypto/openssl.c
index 7d686f3..3057afb 100644
--- a/contrib/pgcrypto/openssl.c
+++ b/contrib/pgcrypto/openssl.c
@@ -31,12 +31,11 @@
#include "postgres.h"
-#include "px.h"
-
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/rand.h>
+#include "px.h"
#include "utils/memutils.h"
#include "utils/resowner.h"
diff --git a/contrib/pgcrypto/pgcrypto.c b/contrib/pgcrypto/pgcrypto.c
index f69ae10..2d7285f 100644
--- a/contrib/pgcrypto/pgcrypto.c
+++ b/contrib/pgcrypto/pgcrypto.c
@@ -30,17 +30,16 @@
*/
#include "postgres.h"
+#include "pgcrypto.h"
#include <ctype.h>
#include "parser/scansup.h"
+#include "px-crypt.h"
+#include "px.h"
#include "utils/builtins.h"
#include "utils/uuid.h"
-#include "px.h"
-#include "px-crypt.h"
-#include "pgcrypto.h"
-
PG_MODULE_MAGIC;
/* private stuff */
diff --git a/contrib/pgcrypto/pgp-armor.c b/contrib/pgcrypto/pgp-armor.c
index aa5b563..679779a 100644
--- a/contrib/pgcrypto/pgp-armor.c
+++ b/contrib/pgcrypto/pgp-armor.c
@@ -31,8 +31,8 @@
#include "postgres.h"
-#include "px.h"
#include "pgp.h"
+#include "px.h"
/*
* BASE64 - duplicated :(
diff --git a/contrib/pgcrypto/pgp-cfb.c b/contrib/pgcrypto/pgp-cfb.c
index 1d99915..8ae7c86 100644
--- a/contrib/pgcrypto/pgp-cfb.c
+++ b/contrib/pgcrypto/pgp-cfb.c
@@ -31,8 +31,8 @@
#include "postgres.h"
-#include "px.h"
#include "pgp.h"
+#include "px.h"
typedef int (*mix_data_t) (PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst);
diff --git a/contrib/pgcrypto/pgp-compress.c b/contrib/pgcrypto/pgp-compress.c
index 2adaf2c..0505bde 100644
--- a/contrib/pgcrypto/pgp-compress.c
+++ b/contrib/pgcrypto/pgp-compress.c
@@ -31,9 +31,8 @@
#include "postgres.h"
-#include "px.h"
#include "pgp.h"
-
+#include "px.h"
/*
* Compressed pkt writer
diff --git a/contrib/pgcrypto/pgp-decrypt.c b/contrib/pgcrypto/pgp-decrypt.c
index 4c43eb7..3ecbf9c 100644
--- a/contrib/pgcrypto/pgp-decrypt.c
+++ b/contrib/pgcrypto/pgp-decrypt.c
@@ -31,9 +31,9 @@
#include "postgres.h"
-#include "px.h"
#include "mbuf.h"
#include "pgp.h"
+#include "px.h"
#define NO_CTX_SIZE 0
#define ALLOW_CTX_SIZE 1
diff --git a/contrib/pgcrypto/pgp-encrypt.c b/contrib/pgcrypto/pgp-encrypt.c
index 2938b4b..4651894 100644
--- a/contrib/pgcrypto/pgp-encrypt.c
+++ b/contrib/pgcrypto/pgp-encrypt.c
@@ -34,9 +34,8 @@
#include <time.h>
#include "mbuf.h"
-#include "px.h"
#include "pgp.h"
-
+#include "px.h"
#define MDC_DIGEST_LEN 20
#define STREAM_ID 0xE0
diff --git a/contrib/pgcrypto/pgp-info.c b/contrib/pgcrypto/pgp-info.c
index 9bfbbe6..b2300ea 100644
--- a/contrib/pgcrypto/pgp-info.c
+++ b/contrib/pgcrypto/pgp-info.c
@@ -30,9 +30,9 @@
*/
#include "postgres.h"
-#include "px.h"
#include "mbuf.h"
#include "pgp.h"
+#include "px.h"
static int
read_pubkey_keyid(PullFilter *pkt, uint8 *keyid_buf)
diff --git a/contrib/pgcrypto/pgp-mpi-internal.c b/contrib/pgcrypto/pgp-mpi-internal.c
index c73f086..2353a48 100644
--- a/contrib/pgcrypto/pgp-mpi-internal.c
+++ b/contrib/pgcrypto/pgp-mpi-internal.c
@@ -31,9 +31,8 @@
#include "postgres.h"
#include "imath.h"
-
-#include "px.h"
#include "pgp.h"
+#include "px.h"
static mpz_t *
mp_new()
diff --git a/contrib/pgcrypto/pgp-mpi-openssl.c b/contrib/pgcrypto/pgp-mpi-openssl.c
index afece26..75e4c8b 100644
--- a/contrib/pgcrypto/pgp-mpi-openssl.c
+++ b/contrib/pgcrypto/pgp-mpi-openssl.c
@@ -32,8 +32,8 @@
#include <openssl/bn.h>
-#include "px.h"
#include "pgp.h"
+#include "px.h"
static BIGNUM *
mpi_to_bn(PGP_MPI *n)
diff --git a/contrib/pgcrypto/pgp-mpi.c b/contrib/pgcrypto/pgp-mpi.c
index 1da52ac..36a6d36 100644
--- a/contrib/pgcrypto/pgp-mpi.c
+++ b/contrib/pgcrypto/pgp-mpi.c
@@ -30,8 +30,8 @@
*/
#include "postgres.h"
-#include "px.h"
#include "pgp.h"
+#include "px.h"
int
pgp_mpi_alloc(int bits, PGP_MPI **mpi)
diff --git a/contrib/pgcrypto/pgp-pgsql.c b/contrib/pgcrypto/pgp-pgsql.c
index 3feadf7..8be895d 100644
--- a/contrib/pgcrypto/pgp-pgsql.c
+++ b/contrib/pgcrypto/pgp-pgsql.c
@@ -31,16 +31,15 @@
#include "postgres.h"
-#include "lib/stringinfo.h"
#include "catalog/pg_type.h"
-#include "mb/pg_wchar.h"
-#include "utils/builtins.h"
-#include "utils/array.h"
#include "funcapi.h"
-
+#include "lib/stringinfo.h"
+#include "mb/pg_wchar.h"
#include "mbuf.h"
-#include "px.h"
#include "pgp.h"
+#include "px.h"
+#include "utils/array.h"
+#include "utils/builtins.h"
/*
* public functions
diff --git a/contrib/pgcrypto/pgp-pubdec.c b/contrib/pgcrypto/pgp-pubdec.c
index b925ff8..a0a5738 100644
--- a/contrib/pgcrypto/pgp-pubdec.c
+++ b/contrib/pgcrypto/pgp-pubdec.c
@@ -30,8 +30,8 @@
*/
#include "postgres.h"
-#include "px.h"
#include "pgp.h"
+#include "px.h"
/*
* padded msg = 02 || PS || 00 || M
diff --git a/contrib/pgcrypto/pgp-pubenc.c b/contrib/pgcrypto/pgp-pubenc.c
index 08599f0..9fdcf7c 100644
--- a/contrib/pgcrypto/pgp-pubenc.c
+++ b/contrib/pgcrypto/pgp-pubenc.c
@@ -30,8 +30,8 @@
*/
#include "postgres.h"
-#include "px.h"
#include "pgp.h"
+#include "px.h"
/*
* padded msg: 02 || non-zero pad bytes || 00 || msg
diff --git a/contrib/pgcrypto/pgp-pubkey.c b/contrib/pgcrypto/pgp-pubkey.c
index f898d72..d447e5f 100644
--- a/contrib/pgcrypto/pgp-pubkey.c
+++ b/contrib/pgcrypto/pgp-pubkey.c
@@ -30,9 +30,9 @@
*/
#include "postgres.h"
-#include "px.h"
#include "mbuf.h"
#include "pgp.h"
+#include "px.h"
int
pgp_key_alloc(PGP_PubKey **pk_p)
diff --git a/contrib/pgcrypto/pgp-s2k.c b/contrib/pgcrypto/pgp-s2k.c
index 3f2f442..81ca1f0 100644
--- a/contrib/pgcrypto/pgp-s2k.c
+++ b/contrib/pgcrypto/pgp-s2k.c
@@ -31,9 +31,8 @@
#include "postgres.h"
-#include "px.h"
#include "pgp.h"
-
+#include "px.h"
static int
calc_s2k_simple(PGP_S2K *s2k, PX_MD *md, const uint8 *key,
diff --git a/contrib/pgcrypto/pgp.c b/contrib/pgcrypto/pgp.c
index dd8dae1..9b245fe 100644
--- a/contrib/pgcrypto/pgp.c
+++ b/contrib/pgcrypto/pgp.c
@@ -31,8 +31,8 @@
#include "postgres.h"
-#include "px.h"
#include "pgp.h"
+#include "px.h"
/*
* Defaults.
diff --git a/contrib/pgcrypto/px-crypt.c b/contrib/pgcrypto/px-crypt.c
index 51be0b7..0913ff2 100644
--- a/contrib/pgcrypto/px-crypt.c
+++ b/contrib/pgcrypto/px-crypt.c
@@ -31,9 +31,8 @@
#include "postgres.h"
-#include "px.h"
#include "px-crypt.h"
-
+#include "px.h"
static char *
run_crypt_des(const char *psw, const char *salt,
diff --git a/contrib/pgstattuple/pgstatapprox.c b/contrib/pgstattuple/pgstatapprox.c
index 636c8d4..c17f244 100644
--- a/contrib/pgstattuple/pgstatapprox.c
+++ b/contrib/pgstattuple/pgstatapprox.c
@@ -13,12 +13,12 @@
#include "postgres.h"
#include "access/heapam.h"
+#include "access/htup_details.h"
+#include "access/multixact.h"
#include "access/relation.h"
#include "access/transam.h"
#include "access/visibilitymap.h"
#include "access/xact.h"
-#include "access/multixact.h"
-#include "access/htup_details.h"
#include "catalog/namespace.h"
#include "catalog/pg_am_d.h"
#include "commands/vacuum.h"
@@ -26,8 +26,8 @@
#include "miscadmin.h"
#include "storage/bufmgr.h"
#include "storage/freespace.h"
-#include "storage/procarray.h"
#include "storage/lmgr.h"
+#include "storage/procarray.h"
#include "utils/builtins.h"
PG_FUNCTION_INFO_V1(pgstattuple_approx);
diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c
index 57ed5f4..d1940be 100644
--- a/contrib/postgres_fdw/connection.c
+++ b/contrib/postgres_fdw/connection.c
@@ -11,7 +11,6 @@
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-
#include "postgres_fdw.h"
#include "access/htup_details.h"
@@ -26,7 +25,6 @@
#include "utils/memutils.h"
#include "utils/syscache.h"
-
/*
* Connection cache hash table entry
*
diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c
index 431c34a..ffed292 100644
--- a/contrib/postgres_fdw/deparse.c
+++ b/contrib/postgres_fdw/deparse.c
@@ -32,7 +32,6 @@
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-
#include "postgres_fdw.h"
#include "access/htup_details.h"
@@ -58,7 +57,6 @@
#include "utils/syscache.h"
#include "utils/typcache.h"
-
/*
* Global context for foreign_expr_walker's search of an expression tree.
*/
diff --git a/contrib/postgres_fdw/option.c b/contrib/postgres_fdw/option.c
index 7ea68c3..948da8e 100644
--- a/contrib/postgres_fdw/option.c
+++ b/contrib/postgres_fdw/option.c
@@ -11,7 +11,6 @@
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-
#include "postgres_fdw.h"
#include "access/reloptions.h"
@@ -23,7 +22,6 @@
#include "utils/builtins.h"
#include "utils/varlena.h"
-
/*
* Describes the valid options for objects that this wrapper uses.
*/
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index 82d8140..d7ff503 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -11,7 +11,6 @@
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-
#include "postgres_fdw.h"
#include "access/htup_details.h"
diff --git a/contrib/postgres_fdw/shippable.c b/contrib/postgres_fdw/shippable.c
index 2b55a40..8474326 100644
--- a/contrib/postgres_fdw/shippable.c
+++ b/contrib/postgres_fdw/shippable.c
@@ -22,7 +22,6 @@
*/
#include "postgres.h"
-
#include "postgres_fdw.h"
#include "access/transam.h"
@@ -31,7 +30,6 @@
#include "utils/inval.h"
#include "utils/syscache.h"
-
/* Hash table for caching the results of shippability lookups */
static HTAB *ShippableCacheHash = NULL;
diff --git a/contrib/sepgsql/database.c b/contrib/sepgsql/database.c
index 8edd3df..af7edf5 100644
--- a/contrib/sepgsql/database.c
+++ b/contrib/sepgsql/database.c
@@ -9,20 +9,20 @@
* -------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "sepgsql.h"
#include "access/genam.h"
#include "access/htup_details.h"
#include "access/sysattr.h"
#include "access/table.h"
#include "catalog/dependency.h"
-#include "catalog/pg_database.h"
#include "catalog/indexing.h"
+#include "catalog/pg_database.h"
#include "commands/dbcommands.h"
#include "commands/seclabel.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/snapmgr.h"
-#include "sepgsql.h"
/*
* sepgsql_database_post_create
diff --git a/contrib/sepgsql/dml.c b/contrib/sepgsql/dml.c
index 2892346..a40e0df 100644
--- a/contrib/sepgsql/dml.c
+++ b/contrib/sepgsql/dml.c
@@ -9,13 +9,14 @@
* -------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "sepgsql.h"
#include "access/htup_details.h"
#include "access/sysattr.h"
#include "access/tupdesc.h"
#include "catalog/catalog.h"
-#include "catalog/heap.h"
#include "catalog/dependency.h"
+#include "catalog/heap.h"
#include "catalog/pg_attribute.h"
#include "catalog/pg_class.h"
#include "catalog/pg_inherits.h"
@@ -26,8 +27,6 @@
#include "utils/lsyscache.h"
#include "utils/syscache.h"
-#include "sepgsql.h"
-
/*
* fixup_whole_row_references
*
diff --git a/contrib/sepgsql/hooks.c b/contrib/sepgsql/hooks.c
index ebfa441..7f4dded 100644
--- a/contrib/sepgsql/hooks.c
+++ b/contrib/sepgsql/hooks.c
@@ -9,6 +9,7 @@
* -------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "sepgsql.h"
#include "catalog/dependency.h"
#include "catalog/objectaccess.h"
@@ -24,8 +25,6 @@
#include "utils/guc.h"
#include "utils/queryenvironment.h"
-#include "sepgsql.h"
-
PG_MODULE_MAGIC;
/*
diff --git a/contrib/sepgsql/label.c b/contrib/sepgsql/label.c
index 63a2dd5..94f2c32 100644
--- a/contrib/sepgsql/label.c
+++ b/contrib/sepgsql/label.c
@@ -9,11 +9,12 @@
* -------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "sepgsql.h"
#include <selinux/label.h>
-#include "access/htup_details.h"
#include "access/genam.h"
+#include "access/htup_details.h"
#include "access/table.h"
#include "access/xact.h"
#include "catalog/catalog.h"
@@ -36,8 +37,6 @@
#include "utils/memutils.h"
#include "utils/rel.h"
-#include "sepgsql.h"
-
/*
* Saved hook entries (if stacked)
*/
diff --git a/contrib/sepgsql/proc.c b/contrib/sepgsql/proc.c
index aa12dbe..ded8fc3 100644
--- a/contrib/sepgsql/proc.c
+++ b/contrib/sepgsql/proc.c
@@ -9,6 +9,7 @@
* -------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "sepgsql.h"
#include "access/genam.h"
#include "access/htup_details.h"
@@ -27,8 +28,6 @@
#include "utils/snapmgr.h"
#include "utils/syscache.h"
-#include "sepgsql.h"
-
/*
* sepgsql_proc_post_create
*
diff --git a/contrib/sepgsql/relation.c b/contrib/sepgsql/relation.c
index 0615275..3a1dcae 100644
--- a/contrib/sepgsql/relation.c
+++ b/contrib/sepgsql/relation.c
@@ -9,28 +9,27 @@
* -------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "sepgsql.h"
#include "access/genam.h"
#include "access/htup_details.h"
#include "access/sysattr.h"
#include "access/table.h"
-#include "catalog/indexing.h"
#include "catalog/dependency.h"
+#include "catalog/indexing.h"
#include "catalog/pg_attribute.h"
#include "catalog/pg_class.h"
#include "catalog/pg_namespace.h"
#include "commands/seclabel.h"
#include "lib/stringinfo.h"
#include "utils/builtins.h"
-#include "utils/fmgroids.h"
#include "utils/catcache.h"
+#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
-#include "sepgsql.h"
-
static void sepgsql_index_modify(Oid indexOid);
/*
diff --git a/contrib/sepgsql/schema.c b/contrib/sepgsql/schema.c
index 4c4a90f..1ba7881 100644
--- a/contrib/sepgsql/schema.c
+++ b/contrib/sepgsql/schema.c
@@ -9,6 +9,7 @@
* -------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "sepgsql.h"
#include "access/genam.h"
#include "access/htup_details.h"
@@ -26,8 +27,6 @@
#include "utils/lsyscache.h"
#include "utils/snapmgr.h"
-#include "sepgsql.h"
-
/*
* sepgsql_schema_post_create
*
diff --git a/contrib/sepgsql/uavc.c b/contrib/sepgsql/uavc.c
index 60fcf99..ba75c31 100644
--- a/contrib/sepgsql/uavc.c
+++ b/contrib/sepgsql/uavc.c
@@ -11,6 +11,7 @@
* -------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "sepgsql.h"
#include "catalog/pg_proc.h"
#include "commands/seclabel.h"
@@ -19,8 +20,6 @@
#include "utils/hashutils.h"
#include "utils/memutils.h"
-#include "sepgsql.h"
-
/*
* avc_cache
*
diff --git a/contrib/spi/moddatetime.c b/contrib/spi/moddatetime.c
index 70476f7..3eb7004 100644
--- a/contrib/spi/moddatetime.c
+++ b/contrib/spi/moddatetime.c
@@ -17,8 +17,8 @@ OH, me, I'm Terry Mackintosh <terry@terrym.com>
#include "access/htup_details.h"
#include "catalog/pg_type.h"
-#include "executor/spi.h"
#include "commands/trigger.h"
+#include "executor/spi.h"
#include "utils/builtins.h"
#include "utils/rel.h"
diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c
index e31be80..035d16f 100644
--- a/contrib/tablefunc/tablefunc.c
+++ b/contrib/tablefunc/tablefunc.c
@@ -31,6 +31,7 @@
*
*/
#include "postgres.h"
+#include "tablefunc.h"
#include <math.h>
@@ -42,8 +43,6 @@
#include "miscadmin.h"
#include "utils/builtins.h"
-#include "tablefunc.h"
-
PG_MODULE_MAGIC;
static HTAB *load_categories_hash(char *cats_sql, MemoryContext per_query_ctx);
diff --git a/contrib/tcn/tcn.c b/contrib/tcn/tcn.c
index 5355a64..4568768 100644
--- a/contrib/tcn/tcn.c
+++ b/contrib/tcn/tcn.c
@@ -16,9 +16,9 @@
#include "postgres.h"
#include "access/htup_details.h"
-#include "executor/spi.h"
#include "commands/async.h"
#include "commands/trigger.h"
+#include "executor/spi.h"
#include "lib/stringinfo.h"
#include "utils/rel.h"
#include "utils/syscache.h"
diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c
index 533e2ce..55b42e3 100644
--- a/contrib/vacuumlo/vacuumlo.c
+++ b/contrib/vacuumlo/vacuumlo.c
@@ -22,12 +22,11 @@
#endif
#include "catalog/pg_class_d.h"
-
#include "common/logging.h"
#include "fe_utils/connect.h"
+#include "getopt_long.h"
#include "libpq-fe.h"
#include "pg_getopt.h"
-#include "getopt_long.h"
#define BUFSIZE 1024
--
1.8.3.1