diff options
author | Amit Kapila | 2019-10-23 03:56:22 +0000 |
---|---|---|
committer | Amit Kapila | 2019-10-24 02:35:34 +0000 |
commit | 7e735035f208418f31b91846ae3e8a381edb3af3 (patch) | |
tree | 3e65f5f1c373f43e4ab7abaa49b30bfbafecb4d5 /contrib/bloom | |
parent | 59c2617af35f064e5d3ef39cfe94531f7459f3de (diff) |
Make the order of the header file includes consistent in contrib modules.
The basic rule we follow here is to always first include 'postgres.h' or
'postgres_fe.h' whichever is applicable, then system header includes and
then Postgres header includes. In this, we also follow that all the
Postgres header includes are in order based on their ASCII value. We
generally follow these rules, but the code has deviated in many places.
This commit makes it consistent just for contrib modules. The later
commits will enforce similar rules in other parts of code.
Author: Vignesh C
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CALDaNm2Sznv8RR6Ex-iJO6xAdsxgWhCoETkaYX=+9DW3q0QCfA@mail.gmail.com
Diffstat (limited to 'contrib/bloom')
-rw-r--r-- | contrib/bloom/blcost.c | 3 | ||||
-rw-r--r-- | contrib/bloom/blinsert.c | 3 | ||||
-rw-r--r-- | contrib/bloom/blscan.c | 5 | ||||
-rw-r--r-- | contrib/bloom/blutils.c | 10 | ||||
-rw-r--r-- | contrib/bloom/blvalidate.c | 3 |
5 files changed, 9 insertions, 15 deletions
diff --git a/contrib/bloom/blcost.c b/contrib/bloom/blcost.c index f9fe57fb845..b2cd6499984 100644 --- a/contrib/bloom/blcost.c +++ b/contrib/bloom/blcost.c @@ -12,11 +12,10 @@ */ #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 4b2186b8dda..30d17f501db 100644 --- a/contrib/bloom/blinsert.c +++ b/contrib/bloom/blinsert.c @@ -15,6 +15,7 @@ #include "access/genam.h" #include "access/generic_xlog.h" #include "access/tableam.h" +#include "bloom.h" #include "catalog/index.h" #include "miscadmin.h" #include "storage/bufmgr.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 49e364ac12d..30fa20619bb 100644 --- a/contrib/bloom/blscan.c +++ b/contrib/bloom/blscan.c @@ -13,15 +13,14 @@ #include "postgres.h" #include "access/relscan.h" -#include "pgstat.h" +#include "bloom.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 dbb24cb5b24..3d44616adcf 100644 --- a/contrib/bloom/blutils.c +++ b/contrib/bloom/blutils.c @@ -15,17 +15,15 @@ #include "access/amapi.h" #include "access/generic_xlog.h" +#include "access/reloptions.h" +#include "bloom.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 e9bd1b4f03e..b3dfe030226 100644 --- a/contrib/bloom/blvalidate.c +++ b/contrib/bloom/blvalidate.c @@ -14,6 +14,7 @@ #include "access/amvalidate.h" #include "access/htup_details.h" +#include "bloom.h" #include "catalog/pg_amop.h" #include "catalog/pg_amproc.h" #include "catalog/pg_opclass.h" @@ -24,8 +25,6 @@ #include "utils/regproc.h" #include "utils/syscache.h" -#include "bloom.h" - /* * Validator for a bloom opclass. */ |