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/postgres_fdw | |
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/postgres_fdw')
-rw-r--r-- | contrib/postgres_fdw/connection.c | 4 | ||||
-rw-r--r-- | contrib/postgres_fdw/deparse.c | 4 | ||||
-rw-r--r-- | contrib/postgres_fdw/option.c | 4 | ||||
-rw-r--r-- | contrib/postgres_fdw/postgres_fdw.c | 3 | ||||
-rw-r--r-- | contrib/postgres_fdw/shippable.c | 4 |
5 files changed, 5 insertions, 14 deletions
diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c index 57ed5f4b905..12f9dd35be8 100644 --- a/contrib/postgres_fdw/connection.c +++ b/contrib/postgres_fdw/connection.c @@ -12,21 +12,19 @@ */ #include "postgres.h" -#include "postgres_fdw.h" - #include "access/htup_details.h" #include "access/xact.h" #include "catalog/pg_user_mapping.h" #include "mb/pg_wchar.h" #include "miscadmin.h" #include "pgstat.h" +#include "postgres_fdw.h" #include "storage/latch.h" #include "utils/hsearch.h" #include "utils/inval.h" #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 431c34a4246..e803997be6c 100644 --- a/contrib/postgres_fdw/deparse.c +++ b/contrib/postgres_fdw/deparse.c @@ -33,8 +33,6 @@ */ #include "postgres.h" -#include "postgres_fdw.h" - #include "access/htup_details.h" #include "access/sysattr.h" #include "access/table.h" @@ -52,13 +50,13 @@ #include "optimizer/prep.h" #include "optimizer/tlist.h" #include "parser/parsetree.h" +#include "postgres_fdw.h" #include "utils/builtins.h" #include "utils/lsyscache.h" #include "utils/rel.h" #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 7ea68c3ce3d..da175a626f2 100644 --- a/contrib/postgres_fdw/option.c +++ b/contrib/postgres_fdw/option.c @@ -12,18 +12,16 @@ */ #include "postgres.h" -#include "postgres_fdw.h" - #include "access/reloptions.h" #include "catalog/pg_foreign_server.h" #include "catalog/pg_foreign_table.h" #include "catalog/pg_user_mapping.h" #include "commands/defrem.h" #include "commands/extension.h" +#include "postgres_fdw.h" #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 82d8140ba25..32366641a3e 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -12,8 +12,6 @@ */ #include "postgres.h" -#include "postgres_fdw.h" - #include "access/htup_details.h" #include "access/sysattr.h" #include "access/table.h" @@ -35,6 +33,7 @@ #include "optimizer/restrictinfo.h" #include "optimizer/tlist.h" #include "parser/parsetree.h" +#include "postgres_fdw.h" #include "utils/builtins.h" #include "utils/float.h" #include "utils/guc.h" diff --git a/contrib/postgres_fdw/shippable.c b/contrib/postgres_fdw/shippable.c index 2b55a40db36..14d6d092121 100644 --- a/contrib/postgres_fdw/shippable.c +++ b/contrib/postgres_fdw/shippable.c @@ -23,15 +23,13 @@ #include "postgres.h" -#include "postgres_fdw.h" - #include "access/transam.h" #include "catalog/dependency.h" +#include "postgres_fdw.h" #include "utils/hsearch.h" #include "utils/inval.h" #include "utils/syscache.h" - /* Hash table for caching the results of shippability lookups */ static HTAB *ShippableCacheHash = NULL; |