Browse Source

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
master
Amit Kapila 1 month ago
parent
commit
7e735035f2
85 changed files with 115 additions and 183 deletions
  1. +1
    -2
      contrib/bloom/blcost.c
  2. +1
    -2
      contrib/bloom/blinsert.c
  3. +2
    -3
      contrib/bloom/blscan.c
  4. +4
    -6
      contrib/bloom/blutils.c
  5. +1
    -2
      contrib/bloom/blvalidate.c
  6. +1
    -1
      contrib/btree_gin/btree_gin.c
  7. +2
    -2
      contrib/btree_gist/btree_enum.c
  8. +1
    -1
      contrib/btree_gist/btree_inet.c
  9. +1
    -2
      contrib/btree_gist/btree_numeric.c
  10. +2
    -3
      contrib/btree_gist/btree_utils_var.c
  11. +1
    -2
      contrib/cube/cube.c
  12. +1
    -2
      contrib/dblink/dblink.c
  13. +1
    -2
      contrib/hstore/hstore_gist.c
  14. +1
    -2
      contrib/hstore/hstore_io.c
  15. +1
    -2
      contrib/hstore/hstore_op.c
  16. +2
    -2
      contrib/hstore_plpython/hstore_plpython.c
  17. +1
    -2
      contrib/intarray/_int_bool.c
  18. +1
    -2
      contrib/intarray/_int_gin.c
  19. +1
    -2
      contrib/intarray/_int_gist.c
  20. +0
    -1
      contrib/intarray/_int_op.c
  21. +3
    -3
      contrib/intarray/_int_selfuncs.c
  22. +1
    -3
      contrib/intarray/_int_tool.c
  23. +1
    -2
      contrib/intarray/_intbig_gist.c
  24. +3
    -4
      contrib/isn/isn.c
  25. +1
    -1
      contrib/jsonb_plperl/jsonb_plperl.c
  26. +2
    -2
      contrib/jsonb_plpython/jsonb_plpython.c
  27. +1
    -3
      contrib/ltree/_ltree_gist.c
  28. +1
    -1
      contrib/ltree/crc32.c
  29. +1
    -1
      contrib/ltree/lquery_op.c
  30. +1
    -1
      contrib/ltree/ltree_io.c
  31. +1
    -1
      contrib/ltree/ltree_op.c
  32. +1
    -1
      contrib/ltree_plpython/ltree_plpython.c
  33. +1
    -3
      contrib/oid2name/oid2name.c
  34. +3
    -5
      contrib/pageinspect/brinfuncs.c
  35. +1
    -3
      contrib/pageinspect/btreefuncs.c
  36. +1
    -2
      contrib/pageinspect/fsmfuncs.c
  37. +1
    -2
      contrib/pageinspect/ginfuncs.c
  38. +2
    -3
      contrib/pageinspect/hashfuncs.c
  39. +2
    -3
      contrib/pageinspect/heapfuncs.c
  40. +1
    -2
      contrib/pageinspect/rawpage.c
  41. +1
    -1
      contrib/passwordcheck/passwordcheck.c
  42. +1
    -2
      contrib/pg_standby/pg_standby.c
  43. +1
    -3
      contrib/pg_trgm/trgm_gin.c
  44. +1
    -3
      contrib/pg_trgm/trgm_gist.c
  45. +1
    -2
      contrib/pg_trgm/trgm_op.c
  46. +1
    -3
      contrib/pg_trgm/trgm_regexp.c
  47. +1
    -1
      contrib/pgcrypto/crypt-md5.c
  48. +3
    -3
      contrib/pgcrypto/internal.c
  49. +1
    -1
      contrib/pgcrypto/mbuf.c
  50. +1
    -2
      contrib/pgcrypto/openssl.c
  51. +3
    -4
      contrib/pgcrypto/pgcrypto.c
  52. +1
    -1
      contrib/pgcrypto/pgp-armor.c
  53. +1
    -1
      contrib/pgcrypto/pgp-cfb.c
  54. +1
    -2
      contrib/pgcrypto/pgp-compress.c
  55. +1
    -1
      contrib/pgcrypto/pgp-decrypt.c
  56. +1
    -2
      contrib/pgcrypto/pgp-encrypt.c
  57. +1
    -1
      contrib/pgcrypto/pgp-info.c
  58. +1
    -2
      contrib/pgcrypto/pgp-mpi-internal.c
  59. +1
    -1
      contrib/pgcrypto/pgp-mpi-openssl.c
  60. +1
    -1
      contrib/pgcrypto/pgp-mpi.c
  61. +5
    -6
      contrib/pgcrypto/pgp-pgsql.c
  62. +1
    -1
      contrib/pgcrypto/pgp-pubdec.c
  63. +1
    -1
      contrib/pgcrypto/pgp-pubenc.c
  64. +1
    -1
      contrib/pgcrypto/pgp-pubkey.c
  65. +1
    -2
      contrib/pgcrypto/pgp-s2k.c
  66. +1
    -1
      contrib/pgcrypto/pgp.c
  67. +1
    -2
      contrib/pgcrypto/px-crypt.c
  68. +3
    -3
      contrib/pgstattuple/pgstatapprox.c
  69. +1
    -3
      contrib/postgres_fdw/connection.c
  70. +1
    -3
      contrib/postgres_fdw/deparse.c
  71. +1
    -3
      contrib/postgres_fdw/option.c
  72. +1
    -2
      contrib/postgres_fdw/postgres_fdw.c
  73. +1
    -3
      contrib/postgres_fdw/shippable.c
  74. +2
    -2
      contrib/sepgsql/database.c
  75. +2
    -3
      contrib/sepgsql/dml.c
  76. +1
    -2
      contrib/sepgsql/hooks.c
  77. +2
    -3
      contrib/sepgsql/label.c
  78. +1
    -2
      contrib/sepgsql/proc.c
  79. +3
    -4
      contrib/sepgsql/relation.c
  80. +1
    -2
      contrib/sepgsql/schema.c
  81. +1
    -2
      contrib/sepgsql/uavc.c
  82. +1
    -1
      contrib/spi/moddatetime.c
  83. +1
    -2
      contrib/tablefunc/tablefunc.c
  84. +1
    -1
      contrib/tcn/tcn.c
  85. +1
    -2
      contrib/vacuumlo/vacuumlo.c

+ 1
- 2
contrib/bloom/blcost.c View File

@@ -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.
*/

+ 1
- 2
contrib/bloom/blinsert.c View File

@@ -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;

/*

+ 2
- 3
contrib/bloom/blscan.c View File

@@ -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.
*/

+ 4
- 6
contrib/bloom/blutils.c View File

@@ -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 ) ) )

+ 1
- 2
contrib/bloom/blvalidate.c View File

@@ -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.
*/

+ 1
- 1
contrib/btree_gin/btree_gin.c View File

@@ -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;


+ 2
- 2
contrib/btree_gist/btree_enum.c View File

@@ -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 */


+ 1
- 1
contrib/btree_gist/btree_inet.c View File

@@ -5,9 +5,9 @@

#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
{

+ 1
- 2
contrib/btree_gist/btree_numeric.c View File

@@ -3,11 +3,10 @@
*/
#include "postgres.h"

#include "btree_gist.h"

#include <math.h>
#include <float.h>

#include "btree_gist.h"
#include "btree_utils_var.h"
#include "utils/builtins.h"
#include "utils/numeric.h"

+ 2
- 3
contrib/btree_gist/btree_utils_var.c View File

@@ -3,15 +3,14 @@
*/
#include "postgres.h"

#include "btree_gist.h"

#include <math.h>
#include <limits.h>
#include <float.h>

#include "btree_gist.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 */

+ 1
- 2
contrib/cube/cube.c View File

@@ -12,11 +12,10 @@

#include "access/gist.h"
#include "access/stratnum.h"
#include "cubedata.h"
#include "utils/array.h"
#include "utils/float.h"

#include "cubedata.h"

PG_MODULE_MAGIC;

/*

+ 1
- 2
contrib/dblink/dblink.c View File

@@ -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"

+ 1
- 2
contrib/hstore/hstore_gist.c View File

@@ -6,9 +6,8 @@
#include "access/gist.h"
#include "access/stratnum.h"
#include "catalog/pg_type.h"
#include "utils/pg_crc.h"

#include "hstore.h"
#include "utils/pg_crc.h"

/* bigint defines */
#define BITBYTE 8

+ 1
- 2
contrib/hstore/hstore_io.c View File

@@ -8,6 +8,7 @@
#include "access/htup_details.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "hstore.h"
#include "lib/stringinfo.h"
#include "libpq/pqformat.h"
#include "utils/builtins.h"
@@ -18,8 +19,6 @@
#include "utils/memutils.h"
#include "utils/typcache.h"

#include "hstore.h"

PG_MODULE_MAGIC;

/* old names for C functions */

+ 1
- 2
contrib/hstore/hstore_op.c View File

@@ -6,12 +6,11 @@
#include "access/htup_details.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "hstore.h"
#include "utils/builtins.h"
#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);

+ 2
- 2
contrib/hstore_plpython/hstore_plpython.c View File

@@ -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;


+ 1
- 2
contrib/intarray/_int_bool.c View File

@@ -3,11 +3,10 @@
*/
#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);

+ 1
- 2
contrib/intarray/_int_gin.c View File

@@ -3,11 +3,10 @@
*/
#include "postgres.h"

#include "_int.h"
#include "access/gin.h"
#include "access/stratnum.h"

#include "_int.h"

PG_FUNCTION_INFO_V1(ginint4_queryextract);

Datum

+ 1
- 2
contrib/intarray/_int_gist.c View File

@@ -5,11 +5,10 @@

#include <limits.h>

#include "_int.h"
#include "access/gist.h"
#include "access/stratnum.h"

#include "_int.h"

#define GETENTRY(vec,pos) ((ArrayType *) DatumGetPointer((vec)->vector[(pos)].key))

/*

+ 0
- 1
contrib/intarray/_int_op.c View File

@@ -3,7 +3,6 @@
*/
#include "postgres.h"


#include "_int.h"

PG_MODULE_MAGIC;

+ 3
- 3
contrib/intarray/_int_selfuncs.c View File

@@ -13,17 +13,17 @@
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "_int.h"

#include "_int.h"
#include "access/htup_details.h"
#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);

+ 1
- 3
contrib/intarray/_int_tool.c View File

@@ -5,10 +5,8 @@

#include <limits.h>

#include "catalog/pg_type.h"

#include "_int.h"
#include "catalog/pg_type.h"

/* arguments are assumed sorted & unique-ified */
bool

+ 1
- 2
contrib/intarray/_intbig_gist.c View File

@@ -3,12 +3,11 @@
*/
#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

+ 3
- 4
contrib/isn/isn.c View File

@@ -14,15 +14,14 @@

#include "postgres.h"

#include "fmgr.h"
#include "utils/builtins.h"

#include "isn.h"
#include "EAN13.h"
#include "ISBN.h"
#include "ISMN.h"
#include "ISSN.h"
#include "UPC.h"
#include "fmgr.h"
#include "isn.h"
#include "utils/builtins.h"

PG_MODULE_MAGIC;


+ 1
- 1
contrib/jsonb_plperl/jsonb_plperl.c View File

@@ -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;


+ 2
- 2
contrib/jsonb_plpython/jsonb_plpython.c View File

@@ -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;

+ 1
- 3
contrib/ltree/_ltree_gist.c View File

@@ -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);

+ 1
- 1
contrib/ltree/crc32.c View File

@@ -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)

+ 1
- 1
contrib/ltree/lquery_op.c View File

@@ -8,8 +8,8 @@
#include <ctype.h>

#include "catalog/pg_collation.h"
#include "utils/formatting.h"
#include "ltree.h"
#include "utils/formatting.h"

PG_FUNCTION_INFO_V1(ltq_regex);
PG_FUNCTION_INFO_V1(ltq_rregex);

+ 1
- 1
contrib/ltree/ltree_io.c View File

@@ -7,9 +7,9 @@

#include <ctype.h>

#include "crc32.h"
#include "ltree.h"
#include "utils/memutils.h"
#include "crc32.h"

PG_FUNCTION_INFO_V1(ltree_in);
PG_FUNCTION_INFO_V1(ltree_out);

+ 1
- 1
contrib/ltree/ltree_op.c View File

@@ -9,10 +9,10 @@

#include "access/htup_details.h"
#include "catalog/pg_statistic.h"
#include "ltree.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/selfuncs.h"
#include "ltree.h"

PG_MODULE_MAGIC;


+ 1
- 1
contrib/ltree_plpython/ltree_plpython.c View File

@@ -1,8 +1,8 @@
#include "postgres.h"

#include "fmgr.h"
#include "plpython.h"
#include "ltree/ltree.h"
#include "plpython.h"

PG_MODULE_MAGIC;


+ 1
- 3
contrib/oid2name/oid2name.c View File

@@ -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

+ 3
- 5
contrib/pageinspect/brinfuncs.c View File

@@ -9,24 +9,22 @@
*/
#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 "pageinspect.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);

+ 1
- 3
contrib/pageinspect/btreefuncs.c View File

@@ -27,19 +27,17 @@

#include "postgres.h"

#include "pageinspect.h"

#include "access/nbtree.h"
#include "access/relation.h"
#include "catalog/namespace.h"
#include "catalog/pg_am.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "pageinspect.h"
#include "utils/builtins.h"
#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);

+ 1
- 2
contrib/pageinspect/fsmfuncs.c View File

@@ -19,11 +19,10 @@

#include "postgres.h"

#include "pageinspect.h"

#include "funcapi.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "pageinspect.h"
#include "storage/fsm_internals.h"
#include "utils/builtins.h"


+ 1
- 2
contrib/pageinspect/ginfuncs.c View File

@@ -9,8 +9,6 @@
*/
#include "postgres.h"

#include "pageinspect.h"

#include "access/gin.h"
#include "access/gin_private.h"
#include "access/htup_details.h"
@@ -18,6 +16,7 @@
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "pageinspect.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/rel.h"

+ 2
- 3
contrib/pageinspect/hashfuncs.c View File

@@ -10,14 +10,13 @@

#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 "pageinspect.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/rel.h"

+ 2
- 3
contrib/pageinspect/heapfuncs.c View File

@@ -25,14 +25,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 "pageinspect.h"
#include "port/pg_bitutils.h"
#include "utils/array.h"
#include "utils/builtins.h"

+ 1
- 2
contrib/pageinspect/rawpage.c View File

@@ -15,14 +15,13 @@

#include "postgres.h"

#include "pageinspect.h"

#include "access/htup_details.h"
#include "access/relation.h"
#include "catalog/namespace.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "pageinspect.h"
#include "storage/bufmgr.h"
#include "storage/checksum.h"
#include "utils/builtins.h"

+ 1
- 1
contrib/passwordcheck/passwordcheck.c View File

@@ -21,8 +21,8 @@
#endif

#include "commands/user.h"
#include "libpq/crypt.h"
#include "fmgr.h"
#include "libpq/crypt.h"

PG_MODULE_MAGIC;


+ 1
- 2
contrib/pg_standby/pg_standby.c View File

@@ -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;


+ 1
- 3
contrib/pg_trgm/trgm_gin.c View File

@@ -3,12 +3,10 @@
*/
#include "postgres.h"

#include "trgm.h"

#include "access/gin.h"
#include "access/stratnum.h"
#include "fmgr.h"
#include "trgm.h"

PG_FUNCTION_INFO_V1(gin_extract_trgm);
PG_FUNCTION_INFO_V1(gin_extract_value_trgm);

+ 1
- 3
contrib/pg_trgm/trgm_gist.c View File

@@ -3,12 +3,10 @@
*/
#include "postgres.h"

#include "trgm.h"

#include "access/stratnum.h"
#include "fmgr.h"
#include "port/pg_bitutils.h"
#include "trgm.h"

typedef struct
{

+ 1
- 2
contrib/pg_trgm/trgm_op.c View File

@@ -5,9 +5,8 @@

#include <ctype.h>

#include "trgm.h"

#include "catalog/pg_type.h"
#include "trgm.h"
#include "tsearch/ts_locale.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"

+ 1
- 3
contrib/pg_trgm/trgm_regexp.c View File

@@ -191,14 +191,12 @@
*/
#include "postgres.h"

#include "trgm.h"

#include "regex/regexport.h"
#include "trgm.h"
#include "tsearch/ts_locale.h"
#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.

+ 1
- 1
contrib/pgcrypto/crypt-md5.c View File

@@ -8,8 +8,8 @@

#include "postgres.h"

#include "px.h"
#include "px-crypt.h"
#include "px.h"

#define MD5_SIZE 16


+ 3
- 3
contrib/pgcrypto/internal.c View File

@@ -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

+ 1
- 1
contrib/pgcrypto/mbuf.c View File

@@ -31,8 +31,8 @@

#include "postgres.h"

#include "px.h"
#include "mbuf.h"
#include "px.h"

#define STEP (16*1024)


+ 1
- 2
contrib/pgcrypto/openssl.c View File

@@ -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"


+ 3
- 4
contrib/pgcrypto/pgcrypto.c View File

@@ -34,13 +34,12 @@
#include <ctype.h>

#include "parser/scansup.h"
#include "pgcrypto.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 */

+ 1
- 1
contrib/pgcrypto/pgp-armor.c View File

@@ -31,8 +31,8 @@

#include "postgres.h"

#include "px.h"
#include "pgp.h"
#include "px.h"

/*
* BASE64 - duplicated :(

+ 1
- 1
contrib/pgcrypto/pgp-cfb.c View File

@@ -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);


+ 1
- 2
contrib/pgcrypto/pgp-compress.c View File

@@ -31,9 +31,8 @@

#include "postgres.h"

#include "px.h"
#include "pgp.h"
#include "px.h"

/*
* Compressed pkt writer

+ 1
- 1
contrib/pgcrypto/pgp-decrypt.c View File

@@ -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

+ 1
- 2
contrib/pgcrypto/pgp-encrypt.c View File

@@ -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

+ 1
- 1
contrib/pgcrypto/pgp-info.c View File

@@ -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)

+ 1
- 2
contrib/pgcrypto/pgp-mpi-internal.c View File

@@ -31,9 +31,8 @@
#include "postgres.h"

#include "imath.h"

#include "px.h"
#include "pgp.h"
#include "px.h"

static mpz_t *
mp_new()

+ 1
- 1
contrib/pgcrypto/pgp-mpi-openssl.c View File

@@ -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)

+ 1
- 1
contrib/pgcrypto/pgp-mpi.c View File

@@ -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)

+ 5
- 6
contrib/pgcrypto/pgp-pgsql.c View File

@@ -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

+ 1
- 1
contrib/pgcrypto/pgp-pubdec.c View File

@@ -30,8 +30,8 @@
*/
#include "postgres.h"

#include "px.h"
#include "pgp.h"
#include "px.h"

/*
* padded msg = 02 || PS || 00 || M

+ 1
- 1
contrib/pgcrypto/pgp-pubenc.c View File

@@ -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

+ 1
- 1
contrib/pgcrypto/pgp-pubkey.c View File

@@ -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)

+ 1
- 2
contrib/pgcrypto/pgp-s2k.c View File

@@ -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,

+ 1
- 1
contrib/pgcrypto/pgp.c View File

@@ -31,8 +31,8 @@

#include "postgres.h"

#include "px.h"
#include "pgp.h"
#include "px.h"

/*
* Defaults.

+ 1
- 2
contrib/pgcrypto/px-crypt.c View File

@@ -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,

+ 3
- 3
contrib/pgstattuple/pgstatapprox.c View File

@@ -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);

+ 1
- 3
contrib/postgres_fdw/connection.c View File

@@ -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
*

+ 1
- 3
contrib/postgres_fdw/deparse.c View File

@@ -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.
*/

+ 1
- 3
contrib/postgres_fdw/option.c View File

@@ -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.
*/

+ 1
- 2
contrib/postgres_fdw/postgres_fdw.c View File

@@ -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"

+ 1
- 3
contrib/postgres_fdw/shippable.c View File

@@ -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;


+ 2
- 2
contrib/sepgsql/database.c View File

@@ -15,14 +15,14 @@
#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 "sepgsql.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/snapmgr.h"
#include "sepgsql.h"

/*
* sepgsql_database_post_create

+ 2
- 3
contrib/sepgsql/dml.c View File

@@ -14,8 +14,8 @@
#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"
@@ -23,11 +23,10 @@
#include "commands/tablecmds.h"
#include "executor/executor.h"
#include "nodes/bitmapset.h"
#include "sepgsql.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"

#include "sepgsql.h"

/*
* fixup_whole_row_references
*

+ 1
- 2
contrib/sepgsql/hooks.c View File

@@ -20,12 +20,11 @@
#include "executor/executor.h"
#include "fmgr.h"
#include "miscadmin.h"
#include "sepgsql.h"
#include "tcop/utility.h"
#include "utils/guc.h"
#include "utils/queryenvironment.h"

#include "sepgsql.h"

PG_MODULE_MAGIC;

/*

+ 2
- 3
contrib/sepgsql/label.c View File

@@ -12,8 +12,8 @@

#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"
@@ -29,6 +29,7 @@
#include "libpq/auth.h"
#include "libpq/libpq-be.h"
#include "miscadmin.h"
#include "sepgsql.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/guc.h"
@@ -36,8 +37,6 @@
#include "utils/memutils.h"
#include "utils/rel.h"

#include "sepgsql.h"

/*
* Saved hook entries (if stacked)
*/

+ 1
- 2
contrib/sepgsql/proc.c View File

@@ -21,14 +21,13 @@
#include "catalog/pg_type.h"
#include "commands/seclabel.h"
#include "lib/stringinfo.h"
#include "sepgsql.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"

#include "sepgsql.h"

/*
* sepgsql_proc_post_create
*

+ 3
- 4
contrib/sepgsql/relation.c View File

@@ -14,23 +14,22 @@
#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 "sepgsql.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);

/*

+ 1
- 2
contrib/sepgsql/schema.c View File

@@ -21,13 +21,12 @@
#include "commands/seclabel.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "sepgsql.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/snapmgr.h"

#include "sepgsql.h"

/*
* sepgsql_schema_post_create
*

+ 1
- 2
contrib/sepgsql/uavc.c View File

@@ -14,13 +14,12 @@

#include "catalog/pg_proc.h"
#include "commands/seclabel.h"
#include "sepgsql.h"
#include "storage/ipc.h"
#include "utils/guc.h"
#include "utils/hashutils.h"
#include "utils/memutils.h"

#include "sepgsql.h"

/*
* avc_cache
*

+ 1
- 1
contrib/spi/moddatetime.c View File

@@ -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"


+ 1
- 2
contrib/tablefunc/tablefunc.c View File

@@ -40,9 +40,8 @@
#include "funcapi.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "utils/builtins.h"

#include "tablefunc.h"
#include "utils/builtins.h"

PG_MODULE_MAGIC;


+ 1
- 1
contrib/tcn/tcn.c View File

@@ -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"

+ 1
- 2
contrib/vacuumlo/vacuumlo.c View File

@@ -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


Loading…
Cancel
Save