diff options
author | Bruce Momjian | 1999-07-15 15:21:54 +0000 |
---|---|---|
committer | Bruce Momjian | 1999-07-15 15:21:54 +0000 |
commit | f3c8a1020ec8ab49031f7ebabf17ca6edd86284d (patch) | |
tree | 0a63095b03da71f54a0664ad03e2b06c9529dc23 | |
parent | f775cbcf395971e61dabbb99725c20b31e264289 (diff) |
Clean up #include in /include directory. Add scripts for checking includes.
286 files changed, 156 insertions, 472 deletions
diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml index 2289a18260..10456d97f0 100644 --- a/doc/src/sgml/release.sgml +++ b/doc/src/sgml/release.sgml @@ -39,7 +39,7 @@ Portability fixes for linux_ppc, Irix, linux_alpha, OpenBSD, alpha Remove QUERY_LIMIT, use SELECT...LIMIT Fix for EXPLAIN on inheritance(Tom) Patch to allow vacuum on multi-segment tables(Hiroshi) -R=Tree optimizer selectivity fix(Tom) +R-Tree optimizer selectivity fix(Tom) ACL file descriptor leak fix(Atsushi Ogawa) New expresssion subtree code(Tom) Avoid disk writes for read-only transactions(Vadim) diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index 06321990a8..bf2499fa05 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -14,6 +14,7 @@ #include <postgres.h> #include <fmgr.h> +#include <catalog/pg_index.h> #include <access/genam.h> #include <access/gist.h> #include <access/gistscan.h> diff --git a/src/backend/access/hash/hashscan.c b/src/backend/access/hash/hashscan.c index 14fb9bfa27..7d15063f57 100644 --- a/src/backend/access/hash/hashscan.c +++ b/src/backend/access/hash/hashscan.c @@ -30,7 +30,6 @@ #include <postgres.h> #include <access/hash.h> -#include <utils/mcxt.h> static void _hash_scandel(IndexScanDesc scan, BlockNumber blkno, OffsetNumber offno); static bool _hash_scantouched(IndexScanDesc scan, BlockNumber blkno, OffsetNumber offno); diff --git a/src/backend/access/hash/hashutil.c b/src/backend/access/hash/hashutil.c index d29138250c..057514f800 100644 --- a/src/backend/access/hash/hashutil.c +++ b/src/backend/access/hash/hashutil.c @@ -18,7 +18,6 @@ #include <fmgr.h> #include <utils/memutils.h> #include <access/iqual.h> -#include <utils/mcxt.h> #ifndef HAVE_MEMMOVE #include <regex/utils.h> diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 1740e7ce89..e09a0765f9 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -89,7 +89,6 @@ #include <utils/inval.h> #include <utils/memutils.h> #include <utils/builtins.h> -#include <utils/mcxt.h> #ifndef HAVE_MEMMOVE #include <regex/utils.h> diff --git a/src/backend/access/heap/stats.c b/src/backend/access/heap/stats.c index d78e2b06bf..c831621322 100644 --- a/src/backend/access/heap/stats.c +++ b/src/backend/access/heap/stats.c @@ -21,7 +21,6 @@ #include <postgres.h> #include <access/heapam.h> -#include <utils/mcxt.h> #ifndef HAVE_MEMMOVE #include <regex/utils.h> diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index 2a8c0459a2..09d5c96d62 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -70,7 +70,6 @@ #include <fmgr.h> #include <storage/lmgr.h> #include <access/heapam.h> -#include <utils/mcxt.h> /* ---------------- * undefine macros we aren't going to use that would otherwise diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index 252aaa3f6a..8d00ddc7b7 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -19,8 +19,9 @@ #include <access/nbtree.h> #include <access/heapam.h> #include <access/xact.h> +#include <storage/bufmgr.h> +#include <access/transam.h> #include <fmgr.h> -#include <utils/mcxt.h> #ifndef HAVE_MEMMOVE #include <regex/utils.h> diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index fa917b9392..5944004cea 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -28,7 +28,7 @@ #include <access/nbtree.h> #include <miscadmin.h> #include <storage/lmgr.h> -#include <utils/mcxt.h> +#include <storage/bufmgr.h> #ifndef HAVE_MEMMOVE #include <regex/utils.h> diff --git a/src/backend/access/nbtree/nbtscan.c b/src/backend/access/nbtree/nbtscan.c index 3ab6689532..a33232df34 100644 --- a/src/backend/access/nbtree/nbtscan.c +++ b/src/backend/access/nbtree/nbtscan.c @@ -30,8 +30,8 @@ #include <postgres.h> #include <storage/bufpage.h> +#include <storage/bufmgr.h> #include <access/nbtree.h> -#include <utils/mcxt.h> typedef struct BTScanListData { diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c index 86547e3c24..ee0ab47e72 100644 --- a/src/backend/access/nbtree/nbtsearch.c +++ b/src/backend/access/nbtree/nbtsearch.c @@ -17,9 +17,9 @@ #include <access/genam.h> #include <fmgr.h> #include <storage/bufpage.h> +#include <storage/bufmgr.h> #include <access/nbtree.h> #include <catalog/pg_proc.h> -#include <utils/mcxt.h> #ifndef HAVE_MEMMOVE #include <regex/utils.h> diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c index 621b1ec2f7..15e251b0d9 100644 --- a/src/backend/access/nbtree/nbtsort.c +++ b/src/backend/access/nbtree/nbtsort.c @@ -53,8 +53,8 @@ #include "access/nbtree.h" #include "storage/bufpage.h" +#include "storage/bufmgr.h" #include "utils/memutils.h" -#include "utils/mcxt.h" #ifndef HAVE_MEMMOVE #include <regex/utils.h> diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c index 8c055c7fe0..e0b180868f 100644 --- a/src/backend/access/nbtree/nbtutils.c +++ b/src/backend/access/nbtree/nbtutils.c @@ -21,7 +21,6 @@ #include "executor/execdebug.h" #include "fmgr.h" #include "storage/bufpage.h" -#include "utils/mcxt.h" extern int NIndexTupleProcessed; diff --git a/src/backend/access/rtree/rtget.c b/src/backend/access/rtree/rtget.c index 8ef7546d82..4cdae456bf 100644 --- a/src/backend/access/rtree/rtget.c +++ b/src/backend/access/rtree/rtget.c @@ -20,7 +20,6 @@ #include <access/iqual.h> #include <access/rtree.h> #include <storage/bufpage.h> -#include <utils/mcxt.h> #ifndef HAVE_MEMMOVE #include <regex/utils.h> diff --git a/src/backend/access/rtree/rtproc.c b/src/backend/access/rtree/rtproc.c index c749640579..73efabe4b2 100644 --- a/src/backend/access/rtree/rtproc.c +++ b/src/backend/access/rtree/rtproc.c @@ -16,7 +16,6 @@ #include <utils/builtins.h> #include <utils/geo_decls.h> -#include <utils/mcxt.h> #ifndef HAVE_MEMMOVE #include <regex/utils.h> diff --git a/src/backend/access/rtree/rtscan.c b/src/backend/access/rtree/rtscan.c index 5be47e485b..70d293906e 100644 --- a/src/backend/access/rtree/rtscan.c +++ b/src/backend/access/rtree/rtscan.c @@ -20,7 +20,6 @@ #include <storage/bufpage.h> #include <access/rtree.h> #include <access/rtstrat.h> -#include <utils/mcxt.h> #ifndef HAVE_MEMMOVE #include <regex/utils.h> diff --git a/src/backend/access/transam/transam.c b/src/backend/access/transam/transam.c index 932464a867..262627c411 100644 --- a/src/backend/access/transam/transam.c +++ b/src/backend/access/transam/transam.c @@ -21,7 +21,6 @@ #include <access/transam.h> #include <access/xact.h> #include <access/heapam.h> -#include <utils/mcxt.h> #include <catalog/catname.h> #include <storage/spin.h> #include <commands/vacuum.h> diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 9726ceef9e..2ded6c624e 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -150,7 +150,6 @@ #include <access/transam.h> #include <storage/fd.h> #include <storage/proc.h> -#include <utils/mcxt.h> #include <catalog/heap.h> #include <utils/relcache.h> #include <miscadmin.h> diff --git a/src/backend/access/transam/xid.c b/src/backend/access/transam/xid.c index ba6ac0e029..56e5de1f36 100644 --- a/src/backend/access/transam/xid.c +++ b/src/backend/access/transam/xid.c @@ -22,7 +22,6 @@ #include <postgres.h> #include <access/xact.h> -#include <utils/mcxt.h> extern TransactionId NullTransactionId; extern TransactionId DisabledTransactionId; diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index eb537fa453..aa1448cd92 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -75,7 +75,6 @@ #include "utils/geo_decls.h" #include "utils/hsearch.h" #include "utils/lsyscache.h" -#include "utils/mcxt.h" #include "utils/nabstime.h" #include "utils/portal.h" #include "utils/rel.h" diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 432214186f..02bdc94841 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -57,7 +57,6 @@ #include "tcop/tcopprot.h" #include "utils/catcache.h" #include "utils/builtins.h" -#include "utils/mcxt.h" #include "utils/relcache.h" #include "utils/syscache.h" #include "utils/tqual.h" diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index e7f85d0be0..c45614e5ca 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -30,6 +30,7 @@ #include "catalog/heap.h" #include "catalog/index.h" #include "catalog/indexing.h" +#include "catalog/pg_index.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" #include "executor/executor.h" @@ -40,9 +41,9 @@ #include "parser/parse_func.h" #include "storage/lmgr.h" #include "storage/smgr.h" +#include "storage/bufpage.h" #include "utils/builtins.h" #include "utils/catcache.h" -#include "utils/mcxt.h" #include "utils/relcache.h" #include "utils/syscache.h" #include "utils/tqual.h" diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c index 9b5389df46..2d28b6423b 100644 --- a/src/backend/catalog/pg_operator.c +++ b/src/backend/catalog/pg_operator.c @@ -19,8 +19,10 @@ #include "access/heapam.h" #include "catalog/catname.h" #include "catalog/pg_operator.h" +#include "parser/parse_type.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" +#include "parser/parse_func.h" #include "fmgr.h" #include "miscadmin.h" #include "parser/parse_oper.h" diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c index 5b02953149..70f4219fe8 100644 --- a/src/backend/catalog/pg_proc.c +++ b/src/backend/catalog/pg_proc.c @@ -30,6 +30,7 @@ #include "utils/lsyscache.h" #include "utils/sets.h" #include "utils/syscache.h" +#include "parser/parse_type.h" #ifndef HAVE_MEMMOVE #include <regex/utils.h> diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index 53d010f162..77eb945071 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -41,7 +41,6 @@ #include <commands/command.h> #include <utils/builtins.h> #include <utils/excid.h> -#include <utils/mcxt.h> #include <catalog/pg_proc.h> #include <catalog/pg_class.h> #include <optimizer/internal.h> diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c index 497553b9ad..47a34a3f44 100644 --- a/src/backend/commands/command.c +++ b/src/backend/commands/command.c @@ -36,7 +36,6 @@ #include "utils/acl.h" #include "utils/array.h" #include "utils/builtins.h" -#include "utils/mcxt.h" #include "utils/portal.h" #include "utils/relcache.h" #include "utils/temprel.h" diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c index 4ab1444f8a..55bcffa1e4 100644 --- a/src/backend/commands/define.c +++ b/src/backend/commands/define.c @@ -50,9 +50,9 @@ #include <fmgr.h> /* for fmgr */ #include <utils/builtins.h> /* prototype for textin() */ #include <commands/defrem.h> -#include <optimizer/xfunc.h> #include <tcop/dest.h> #include <catalog/pg_shadow.h> +#include <optimizer/cost.h> static char *defGetString(DefElem *def); static int defGetTypeLength(DefElem *def); diff --git a/src/backend/commands/rename.c b/src/backend/commands/rename.c index 30d2db5409..98855b12d8 100644 --- a/src/backend/commands/rename.c +++ b/src/backend/commands/rename.c @@ -30,7 +30,6 @@ #include <commands/command.h> #include <storage/bufmgr.h> #include <utils/excid.h> -#include <utils/mcxt.h> #include <catalog/pg_proc.h> #include <catalog/pg_class.h> #include <optimizer/internal.h> diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index cc3d27599c..a710888d7f 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -23,8 +23,8 @@ #include "nodes/memnodes.h" #include "nodes/parsenodes.h" #include "storage/lmgr.h" +#include "storage/bufpage.h" #include "storage/bufmgr.h" -#include "utils/mcxt.h" #include "utils/inval.h" #include "utils/builtins.h" #include "utils/syscache.h" diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index fbf48ec928..897b7c6610 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -44,7 +44,6 @@ #include "storage/lmgr.h" #include "utils/builtins.h" #include "utils/inval.h" -#include "utils/mcxt.h" #include "utils/portal.h" #include "utils/relcache.h" #include "utils/syscache.h" diff --git a/src/backend/executor/_deadcode/nodeTee.c b/src/backend/executor/_deadcode/nodeTee.c index fc0e81cb99..ee8060b128 100644 --- a/src/backend/executor/_deadcode/nodeTee.c +++ b/src/backend/executor/_deadcode/nodeTee.c @@ -23,9 +23,7 @@ #include <sys/file.h> #include "postgres.h" -#include "utils/palloc.h" #include "utils/relcache.h" -#include "utils/mcxt.h" #include "storage/bufmgr.h" #include "storage/smgr.h" #include "optimizer/internal.h" diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c index cba7c1cc61..84c8168b10 100644 --- a/src/backend/executor/execAmi.c +++ b/src/backend/executor/execAmi.c @@ -30,7 +30,6 @@ #include "executor/executor.h" #include "storage/smgr.h" -#include "utils/mcxt.h" #include "executor/nodeSeqscan.h" #include "executor/nodeIndexscan.h" #include "executor/nodeSort.h" diff --git a/src/backend/executor/execJunk.c b/src/backend/executor/execJunk.c index b74b51cb04..12bc7ce3e2 100644 --- a/src/backend/executor/execJunk.c +++ b/src/backend/executor/execJunk.c @@ -16,7 +16,6 @@ #include "postgres.h" -#include "utils/palloc.h" #include "access/heapam.h" #include "executor/executor.h" #include "nodes/relation.h" diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 4491d7cf87..829fe1d1b3 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -39,7 +39,6 @@ #include "executor/execdebug.h" #include "executor/nodeIndexscan.h" #include "utils/builtins.h" -#include "utils/palloc.h" #include "utils/acl.h" #include "utils/syscache.h" #include "utils/tqual.h" @@ -54,6 +53,7 @@ #include "access/xact.h" #include "catalog/heap.h" #include "commands/trigger.h" +#include "access/transam.h" void ExecCheckPerms(CmdType operation, int resultRelation, List *rangeTable, Query *parseTree); diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c index 5f6787b7cb..4ff5d4bbe8 100644 --- a/src/backend/executor/execQual.c +++ b/src/backend/executor/execQual.c @@ -49,7 +49,6 @@ #include "utils/builtins.h" #include "utils/fcache.h" #include "utils/fcache2.h" -#include "utils/mcxt.h" #include "utils/memutils.h" diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index e3e4402f09..fca383b7f3 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -128,7 +128,6 @@ #include "catalog/pg_type.h" #include "parser/parse_type.h" #include "storage/bufmgr.h" -#include "utils/palloc.h" #include "utils/lsyscache.h" static TupleTableSlot *NodeGetResultTupleSlot(Plan *node); diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index c76bc3f616..0dfc88aca7 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -55,7 +55,7 @@ #include "optimizer/clauses.h" #include "parser/parsetree.h" #include "utils/lsyscache.h" -#include "utils/mcxt.h" +#include "catalog/pg_index.h" static void ExecGetIndexKeyInfo(Form_pg_index indexTuple, int *numAttsOutP, AttrNumber **attsOutP, FuncIndexInfoPtr fInfoP); diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index 0b5c1d56b3..e5f0b08259 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -28,8 +28,6 @@ #include "fmgr.h" #include "utils/fcache.h" #include "utils/datum.h" -#include "utils/elog.h" -#include "utils/palloc.h" #include "utils/syscache.h" #include "catalog/pg_language.h" #include "access/heapam.h" diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index a47a9ad549..44a14391b4 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -27,7 +27,6 @@ #include "executor/executor.h" #include "executor/nodeAgg.h" #include "storage/bufmgr.h" -#include "utils/palloc.h" #include "utils/syscache.h" #include "optimizer/clauses.h" diff --git a/src/backend/executor/nodeAppend.c b/src/backend/executor/nodeAppend.c index 14c345983e..6afd0758ce 100644 --- a/src/backend/executor/nodeAppend.c +++ b/src/backend/executor/nodeAppend.c @@ -61,8 +61,6 @@ #include "executor/execdebug.h" #include "executor/nodeAppend.h" #include "executor/nodeIndexscan.h" -#include "utils/palloc.h" -#include "utils/mcxt.h" #include "parser/parsetree.h" /* for rt_store() macro */ static bool exec_append_initialize_next(Append *node); diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index a3e8264e40..8e3046a122 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -40,8 +40,6 @@ #include "access/skey.h" #include "access/heapam.h" #include "access/genam.h" -#include "utils/palloc.h" -#include "utils/mcxt.h" #include "catalog/index.h" #include "storage/bufmgr.h" #include "storage/lmgr.h" diff --git a/src/backend/executor/nodeSort.c b/src/backend/executor/nodeSort.c index cd8f1078fd..59fbfd23f3 100644 --- a/src/backend/executor/nodeSort.c +++ b/src/backend/executor/nodeSort.c @@ -18,7 +18,6 @@ #include "executor/execdebug.h" #include "executor/nodeSort.h" #include "access/heapam.h" -#include "utils/palloc.h" #include "utils/psort.h" #include "catalog/catalog.h" #include "catalog/heap.h" diff --git a/src/backend/lib/stringinfo.c b/src/backend/lib/stringinfo.c index 0b63ec8131..2247357e9b 100644 --- a/src/backend/lib/stringinfo.c +++ b/src/backend/lib/stringinfo.c @@ -18,7 +18,6 @@ #include "postgres.h" #include "lib/stringinfo.h" -#include "utils/mcxt.h" #ifdef NOT_USED /* diff --git a/src/backend/libpq/be-dumpdata.c b/src/backend/libpq/be-dumpdata.c index 80be3e82c1..d1fb1045b2 100644 --- a/src/backend/libpq/be-dumpdata.c +++ b/src/backend/libpq/be-dumpdata.c @@ -38,7 +38,6 @@ #include <storage/buf.h> #include <utils/memutils.h> #include <fmgr.h> -#include <utils/mcxt.h> #include <utils/exc.h> #include <utils/syscache.h> #include <catalog/pg_type.h> diff --git a/src/backend/libpq/be-fsstubs.c b/src/backend/libpq/be-fsstubs.c index 0918817c24..d10bb18c4c 100644 --- a/src/backend/libpq/be-fsstubs.c +++ b/src/backend/libpq/be-fsstubs.c @@ -43,7 +43,6 @@ #include <nodes/nodes.h> #include <utils/memutils.h> #include <lib/fstack.h> -#include <utils/mcxt.h> #include <catalog/pg_shadow.h> /* for superuser() */ #include <storage/fd.h> /* for O_ */ #include <storage/large_object.h> diff --git a/src/backend/libpq/crypt.c b/src/backend/libpq/crypt.c index 8c96861366..df0c0ac016 100644 --- a/src/backend/libpq/crypt.c +++ b/src/backend/libpq/crypt.c @@ -24,7 +24,6 @@ #include "utils/nabstime.h" #include "storage/fd.h" #include "libpq/crypt.h" -#include "utils/mcxt.h" #ifdef HAVE_CRYPT_H #include <crypt.h> diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 900a6e016d..a26a4be574 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -25,8 +25,6 @@ #include "utils/syscache.h" #include "utils/builtins.h" /* for namecpy */ -#include "utils/elog.h" -#include "utils/palloc.h" #include "catalog/pg_type.h" #include "storage/lmgr.h" #include "optimizer/planmain.h" diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 7d0843243a..49e00e819a 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -23,7 +23,6 @@ #include "utils/builtins.h" /* for namestrcmp() */ #include "utils/datum.h" -#include "utils/elog.h" #include "storage/itemptr.h" static bool equali(List *a, List *b); diff --git a/src/backend/nodes/freefuncs.c b/src/backend/nodes/freefuncs.c index c901075592..2661b34c40 100644 --- a/src/backend/nodes/freefuncs.c +++ b/src/backend/nodes/freefuncs.c @@ -25,8 +25,6 @@ #include "utils/syscache.h" #include "utils/builtins.h" /* for namecpy */ -#include "utils/elog.h" -#include "utils/palloc.h" #include "catalog/pg_type.h" #include "storage/lmgr.h" #include "optimizer/planmain.h" diff --git a/src/backend/nodes/list.c b/src/backend/nodes/list.c index a36e897911..8d5cc0caaa 100644 --- a/src/backend/nodes/list.c +++ b/src/backend/nodes/list.c @@ -26,9 +26,6 @@ #include "nodes/pg_list.h" #include "nodes/parsenodes.h" #include "utils/builtins.h" /* for namecpy */ -#include "utils/elog.h" -#include "utils/palloc.h" -#include "utils/mcxt.h" /* * makeList diff --git a/src/backend/nodes/nodes.c b/src/backend/nodes/nodes.c index 11be3a4e6a..c4f5f9ce45 100644 --- a/src/backend/nodes/nodes.c +++ b/src/backend/nodes/nodes.c @@ -17,10 +17,7 @@ */ #include <string.h> #include "postgres.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "nodes/nodes.h" -#include "utils/mcxt.h" /* * newNode - diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 3eb6916fb8..9738640e24 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -27,9 +27,7 @@ #include "utils/syscache.h" #include "utils/lsyscache.h" #include "fmgr.h" -#include "utils/elog.h" #include "utils/datum.h" -#include "utils/palloc.h" #include "nodes/nodes.h" #include "nodes/execnodes.h" diff --git a/src/backend/nodes/read.c b/src/backend/nodes/read.c index df984f4cf5..3872da5fc7 100644 --- a/src/backend/nodes/read.c +++ b/src/backend/nodes/read.c @@ -22,7 +22,6 @@ #include "postgres.h" #include "nodes/pg_list.h" #include "nodes/readfuncs.h" -#include "utils/elog.h" /* * stringToNode - diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index a64902d3aa..b37e56f3f3 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -32,8 +32,6 @@ #include "access/htup.h" #include "fmgr.h" #include "utils/builtins.h" -#include "utils/elog.h" -#include "utils/palloc.h" #include "utils/lsyscache.h" #include "utils/syscache.h" diff --git a/src/backend/optimizer/geqo/geqo_copy.c b/src/backend/optimizer/geqo/geqo_copy.c index 32cde161ab..43a633b9a7 100644 --- a/src/backend/optimizer/geqo/geqo_copy.c +++ b/src/backend/optimizer/geqo/geqo_copy.c @@ -37,10 +37,6 @@ #include "nodes/pg_list.h" #include "nodes/relation.h" #include "nodes/primnodes.h" - -#include "utils/palloc.h" -#include "utils/elog.h" - #include "optimizer/internal.h" #include "optimizer/paths.h" #include "optimizer/pathnode.h" diff --git a/src/backend/optimizer/geqo/geqo_cx.c b/src/backend/optimizer/geqo/geqo_cx.c index c7e46e46c9..0b4a0fa5b0 100644 --- a/src/backend/optimizer/geqo/geqo_cx.c +++ b/src/backend/optimizer/geqo/geqo_cx.c @@ -40,8 +40,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c index ac68f32b06..001dd8de28 100644 --- a/src/backend/optimizer/geqo/geqo_erx.c +++ b/src/backend/optimizer/geqo/geqo_erx.c @@ -37,8 +37,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" @@ -51,7 +49,6 @@ #include "optimizer/geqo_recombination.h" #include "optimizer/geqo_random.h" -#include "utils/mcxt.h" static int gimme_edge(Gene gene1, Gene gene2, Edge *edge_table); static void remove_gene(Gene gene, Edge edge, Edge *edge_table); diff --git a/src/backend/optimizer/geqo/geqo_eval.c b/src/backend/optimizer/geqo/geqo_eval.c index 71aead9107..ccee03b646 100644 --- a/src/backend/optimizer/geqo/geqo_eval.c +++ b/src/backend/optimizer/geqo/geqo_eval.c @@ -34,8 +34,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "utils/portal.h" #include "optimizer/internal.h" diff --git a/src/backend/optimizer/geqo/geqo_main.c b/src/backend/optimizer/geqo/geqo_main.c index 0b6feeb6b6..9b10a91952 100644 --- a/src/backend/optimizer/geqo/geqo_main.c +++ b/src/backend/optimizer/geqo/geqo_main.c @@ -28,8 +28,6 @@ #include "nodes/plannodes.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" diff --git a/src/backend/optimizer/geqo/geqo_misc.c b/src/backend/optimizer/geqo/geqo_misc.c index badd6bf9c7..6429e827e8 100644 --- a/src/backend/optimizer/geqo/geqo_misc.c +++ b/src/backend/optimizer/geqo/geqo_misc.c @@ -27,8 +27,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" diff --git a/src/backend/optimizer/geqo/geqo_mutation.c b/src/backend/optimizer/geqo/geqo_mutation.c index 2861ef8308..82083d934f 100644 --- a/src/backend/optimizer/geqo/geqo_mutation.c +++ b/src/backend/optimizer/geqo/geqo_mutation.c @@ -37,8 +37,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" diff --git a/src/backend/optimizer/geqo/geqo_ox1.c b/src/backend/optimizer/geqo/geqo_ox1.c index c870559ac3..e8e55a4529 100644 --- a/src/backend/optimizer/geqo/geqo_ox1.c +++ b/src/backend/optimizer/geqo/geqo_ox1.c @@ -39,8 +39,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" diff --git a/src/backend/optimizer/geqo/geqo_ox2.c b/src/backend/optimizer/geqo/geqo_ox2.c index 4827cbf147..a54ad4871d 100644 --- a/src/backend/optimizer/geqo/geqo_ox2.c +++ b/src/backend/optimizer/geqo/geqo_ox2.c @@ -39,8 +39,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" diff --git a/src/backend/optimizer/geqo/geqo_params.c b/src/backend/optimizer/geqo/geqo_params.c index 34f55ab2b2..37dbe8a1ed 100644 --- a/src/backend/optimizer/geqo/geqo_params.c +++ b/src/backend/optimizer/geqo/geqo_params.c @@ -31,8 +31,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" @@ -45,7 +43,6 @@ #include "storage/fd.h" -#include "utils/mcxt.h" /* * Parameter values read from the config file (or defaulted) are stored here diff --git a/src/backend/optimizer/geqo/geqo_pmx.c b/src/backend/optimizer/geqo/geqo_pmx.c index db8ddb988b..d1564cfaee 100644 --- a/src/backend/optimizer/geqo/geqo_pmx.c +++ b/src/backend/optimizer/geqo/geqo_pmx.c @@ -39,8 +39,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" @@ -53,7 +51,6 @@ #include "optimizer/geqo_recombination.h" #include "optimizer/geqo_random.h" -#include "utils/mcxt.h" /* pmx * diff --git a/src/backend/optimizer/geqo/geqo_pool.c b/src/backend/optimizer/geqo/geqo_pool.c index f7000e4025..080cdb4674 100644 --- a/src/backend/optimizer/geqo/geqo_pool.c +++ b/src/backend/optimizer/geqo/geqo_pool.c @@ -26,8 +26,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" @@ -41,7 +39,6 @@ #include "optimizer/geqo_copy.h" #include "optimizer/geqo_recombination.h" -#include "utils/mcxt.h" static int compare(const void *arg1, const void *arg2); diff --git a/src/backend/optimizer/geqo/geqo_px.c b/src/backend/optimizer/geqo/geqo_px.c index 7e00cac5ef..fbd2ff7803 100644 --- a/src/backend/optimizer/geqo/geqo_px.c +++ b/src/backend/optimizer/geqo/geqo_px.c @@ -39,8 +39,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" diff --git a/src/backend/optimizer/geqo/geqo_recombination.c b/src/backend/optimizer/geqo/geqo_recombination.c index 7a75df9ac5..3ef2fbf050 100644 --- a/src/backend/optimizer/geqo/geqo_recombination.c +++ b/src/backend/optimizer/geqo/geqo_recombination.c @@ -24,8 +24,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" @@ -38,7 +36,6 @@ #include "optimizer/geqo_recombination.h" #include "optimizer/geqo_random.h" -#include "utils/mcxt.h" /* * init_tour diff --git a/src/backend/optimizer/geqo/geqo_selection.c b/src/backend/optimizer/geqo/geqo_selection.c index 33e73f6346..885926cedf 100644 --- a/src/backend/optimizer/geqo/geqo_selection.c +++ b/src/backend/optimizer/geqo/geqo_selection.c @@ -41,8 +41,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/paths.h" diff --git a/src/backend/optimizer/geqo/minspantree.c b/src/backend/optimizer/geqo/minspantree.c index 1998696e2a..f1e7b73145 100644 --- a/src/backend/optimizer/geqo/minspantree.c +++ b/src/backend/optimizer/geqo/minspantree.c @@ -20,7 +20,6 @@ #include "nodes/relation.h" #include "nodes/primnodes.h" -#include "utils/palloc.h" #include "optimizer/cost.h" diff --git a/src/backend/optimizer/path/_deadcode/predmig.c b/src/backend/optimizer/path/_deadcode/predmig.c index 8c0eebea87..692af2ca21 100644 --- a/src/backend/optimizer/path/_deadcode/predmig.c +++ b/src/backend/optimizer/path/_deadcode/predmig.c @@ -39,9 +39,6 @@ #include "nodes/nodes.h" #include "nodes/primnodes.h" #include "nodes/relation.h" -#include "utils/palloc.h" -#include "utils/elog.h" -#include "optimizer/xfunc.h" #include "optimizer/pathnode.h" #include "optimizer/internal.h" #include "optimizer/cost.h" diff --git a/src/backend/optimizer/path/_deadcode/xfunc.c b/src/backend/optimizer/path/_deadcode/xfunc.c index 349dda21c5..f99a78f29e 100644 --- a/src/backend/optimizer/path/_deadcode/xfunc.c +++ b/src/backend/optimizer/path/_deadcode/xfunc.c @@ -36,7 +36,6 @@ #include "optimizer/keys.h" #include "optimizer/pathnode.h" #include "optimizer/tlist.h" /* for get_expr */ -#include "optimizer/xfunc.h" #include "storage/buf_internals.h" /* for NBuffers */ #include "tcop/dest.h" #include "utils/syscache.h" diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 823e8d55c0..d846216e2c 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -25,7 +25,6 @@ #include "optimizer/paths.h" #include "optimizer/pathnode.h" #include "optimizer/clauses.h" -#include "optimizer/xfunc.h" #include "optimizer/cost.h" #include "commands/creatinh.h" diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 45e5a292fd..5bf1600b4f 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -37,7 +37,6 @@ #include "optimizer/paths.h" #include "optimizer/plancat.h" #include "optimizer/pathnode.h" -#include "optimizer/xfunc.h" #include "parser/parsetree.h" /* for getrelid() */ #include "parser/parse_expr.h" /* for exprType() */ #include "parser/parse_oper.h" /* for oprid() and oper() */ diff --git a/src/backend/optimizer/path/orindxpath.c b/src/backend/optimizer/path/orindxpath.c index c7389f06e7..1bcbc82c30 100644 --- a/src/backend/optimizer/path/orindxpath.c +++ b/src/backend/optimizer/path/orindxpath.c @@ -26,7 +26,6 @@ #include "optimizer/paths.h" #include "optimizer/cost.h" #include "optimizer/plancat.h" -#include "optimizer/xfunc.h" #include "parser/parsetree.h" diff --git a/src/backend/optimizer/path/prune.c b/src/backend/optimizer/path/prune.c index 3ff8035ee8..d5be641458 100644 --- a/src/backend/optimizer/path/prune.c +++ b/src/backend/optimizer/path/prune.c @@ -21,7 +21,6 @@ #include "optimizer/paths.h" #include "optimizer/pathnode.h" -#include "utils/elog.h" static List *merge_rel_with_same_relids(RelOptInfo *rel, Relids unjoined_relids); diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index cff0bfddd0..e64db90848 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -28,7 +28,6 @@ #include "nodes/makefuncs.h" #include "utils/lsyscache.h" -#include "utils/palloc.h" #include "utils/builtins.h" #include "optimizer/restrictinfo.h" @@ -37,7 +36,6 @@ #include "optimizer/planmain.h" #include "optimizer/tlist.h" #include "optimizer/planner.h" -#include "optimizer/xfunc.h" #include "optimizer/internal.h" diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index 2c559207ee..40bfaa7cf1 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -26,7 +26,6 @@ #include "catalog/pg_type.h" #include "utils/lsyscache.h" -#include "utils/palloc.h" #include "optimizer/internal.h" #include "optimizer/planmain.h" diff --git a/src/backend/optimizer/plan/planmain.c b/src/backend/optimizer/plan/planmain.c index df71b31ffc..bdc8cabdf2 100644 --- a/src/backend/optimizer/plan/planmain.c +++ b/src/backend/optimizer/plan/planmain.c @@ -31,14 +31,10 @@ #include "optimizer/keys.h" #include "optimizer/tlist.h" #include "optimizer/var.h" -#include "optimizer/xfunc.h" #include "optimizer/cost.h" #include "tcop/dest.h" -#include "utils/elog.h" -#include "utils/palloc.h" #include "nodes/memnodes.h" -#include "utils/mcxt.h" #include "utils/lsyscache.h" static Plan *subplanner(Query *root, List *flat_tlist, List *qual); diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index c4aeea1f28..0c568550ec 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -24,7 +24,6 @@ #include "catalog/pg_type.h" #include "parser/parse_expr.h" -#include "utils/elog.h" #include "utils/lsyscache.h" #include "access/heapam.h" diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index 3ca060b5ac..f229d4642b 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -20,7 +20,6 @@ #include "nodes/primnodes.h" #include "nodes/relation.h" -#include "utils/elog.h" #include "nodes/nodeFuncs.h" #include "nodes/makefuncs.h" diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c index cc2baebddf..5ed257e659 100644 --- a/src/backend/optimizer/prep/preptlist.c +++ b/src/backend/optimizer/prep/preptlist.c @@ -25,7 +25,6 @@ #include "utils/builtins.h" #include "utils/syscache.h" #include "utils/lsyscache.h" -#include "utils/palloc.h" #include "parser/parse_type.h" #include "parser/parsetree.h" /* for getrelid() */ diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 446c759751..283a43c25d 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -25,7 +25,6 @@ #include "parser/parsetree.h" #include "parser/parse_clause.h" -#include "utils/elog.h" #include "utils/lsyscache.h" #include "optimizer/internal.h" diff --git a/src/backend/optimizer/util/keys.c b/src/backend/optimizer/util/keys.c index e0362bd2bb..9fd350bd3f 100644 --- a/src/backend/optimizer/util/keys.c +++ b/src/backend/optimizer/util/keys.c @@ -15,7 +15,6 @@ #include "nodes/pg_list.h" #include "nodes/nodes.h" #include "nodes/relation.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/keys.h" diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 59d55f967b..a53b7e4f57 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -16,7 +16,6 @@ #include "postgres.h" #include "nodes/relation.h" -#include "utils/elog.h" #include "optimizer/internal.h" #include "optimizer/pathnode.h" @@ -24,7 +23,6 @@ #include "optimizer/plancat.h" #include "optimizer/cost.h" #include "optimizer/keys.h" -#include "optimizer/xfunc.h" #include "optimizer/ordering.h" #include "parser/parsetree.h" /* for getrelid() */ diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c index 55bf58c973..0837a6d199 100644 --- a/src/backend/optimizer/util/tlist.c +++ b/src/backend/optimizer/util/tlist.c @@ -17,7 +17,6 @@ #include "nodes/primnodes.h" #include "nodes/pg_list.h" #include "nodes/nodeFuncs.h" -#include "utils/elog.h" #include "utils/lsyscache.h" #include "optimizer/internal.h" diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index f265579ee4..969bd04f94 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -31,7 +31,6 @@ #include "parse.h" #include "utils/builtins.h" -#include "utils/mcxt.h" static Query *transformStmt(ParseState *pstate, Node *stmt); static Query *transformDeleteStmt(ParseState *pstate, DeleteStmt *stmt); diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index ab61c904de..8ff81c69be 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -42,14 +42,13 @@ #include "parser/gramparse.h" #include "parser/parse_type.h" #include "utils/acl.h" -#include "utils/palloc.h" #include "catalog/catname.h" -#include "utils/elog.h" #include "access/xact.h" #include "storage/lmgr.h" #include "utils/numeric.h" #include "parser/analyze.h" #include "catalog/pg_type.h" +#include "storage/bufpage.h" #ifdef MULTIBYTE #include "mb/pg_wchar.h" diff --git a/src/backend/parser/keywords.c b/src/backend/parser/keywords.c index 74e4b1c28a..d3508ce042 100644 --- a/src/backend/parser/keywords.c +++ b/src/backend/parser/keywords.c @@ -19,7 +19,6 @@ #include "nodes/pg_list.h" #include "parse.h" #include "parser/keywords.h" -#include "utils/elog.h" /* * List of (keyword-name, keyword-token-value) pairs. diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index 4b6d785c29..5e643b06fb 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -27,7 +27,7 @@ #include "parser/parse_target.h" #include "parser/parse_coerce.h" #include "nodes/print.h" - +#include "nodes/relation.h" #include "parse.h" diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c index fb11f69115..70cc0104e7 100644 --- a/src/backend/parser/parse_oper.c +++ b/src/backend/parser/parse_oper.c @@ -26,6 +26,7 @@ #include "parser/parse_coerce.h" #include "storage/bufmgr.h" #include "utils/syscache.h" +#include "parser/parse_func.h" static Oid *oper_select_candidate(int nargs, Oid *input_typeids, CandidateList candidates); diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index a99219d017..54f36a6067 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -24,6 +24,7 @@ #include "utils/acl.h" #include "utils/builtins.h" #include "utils/lsyscache.h" +#include "parser/parse_type.h" static void checkTargetTypes(ParseState *pstate, char *target_colname, char *refname, char *colname); diff --git a/src/backend/parser/scansup.c b/src/backend/parser/scansup.c index 961fc9364f..d4f86054f3 100644 --- a/src/backend/parser/scansup.c +++ b/src/backend/parser/scansup.c @@ -21,7 +21,6 @@ #include "postgres.h" #include "miscadmin.h" #include "parser/scansup.h" -#include "utils/elog.h" /* ---------------- * scanstr diff --git a/src/backend/port/dynloader/bsdi.c b/src/backend/port/dynloader/bsdi.c index fd1fbd73b8..88e8c0e0f8 100644 --- a/src/backend/port/dynloader/bsdi.c +++ b/src/backend/port/dynloader/bsdi.c @@ -19,7 +19,6 @@ #include <dld.h> #include "postgres.h" #include "dynloader.h" -#include "utils/elog.h" #include "fmgr.h" extern char *pg_pathname; diff --git a/src/backend/port/dynloader/linux.c b/src/backend/port/dynloader/linux.c index 9c18dadeeb..8dc70c330b 100644 --- a/src/backend/port/dynloader/linux.c +++ b/src/backend/port/dynloader/linux.c @@ -22,7 +22,6 @@ #include <dld.h> #endif #include "dynloader.h" -#include "utils/elog.h" #include "fmgr.h" #ifdef NOT_USED diff --git a/src/backend/port/dynloader/ultrix4.c b/src/backend/port/dynloader/ultrix4.c index 78a406c387..c1978cfebd 100644 --- a/src/backend/port/dynloader/ultrix4.c +++ b/src/backend/port/dynloader/ultrix4.c @@ -20,7 +20,6 @@ #include "postgres.h" #include "fmgr.h" #include "port-protos.h" -#include "utils/elog.h" extern char *pg_pathname; diff --git a/src/backend/port/random.c b/src/backend/port/random.c index bd1f3b0618..abc90845a8 100644 --- a/src/backend/port/random.c +++ b/src/backend/port/random.c @@ -4,9 +4,6 @@ #include <math.h> /* for pow() prototype */ #include <errno.h> -#include "config.h" -#include "rusagestub.h" - long random() { diff --git a/src/backend/port/srandom.c b/src/backend/port/srandom.c index 3daffaf990..0fb2430ecb 100644 --- a/src/backend/port/srandom.c +++ b/src/backend/port/srandom.c @@ -4,9 +4,6 @@ #include <math.h> /* for pow() prototype */ #include <errno.h> -#include "config.h" -#include "rusagestub.h" - void srandom(unsigned int seed) { diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 33917f09b8..6f143edbe3 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -89,9 +89,7 @@ #include "tcop/tcopprot.h" #include "commands/async.h" #include "nodes/nodes.h" -#include "utils/mcxt.h" #include "storage/proc.h" -#include "utils/elog.h" #ifndef HAVE_GETHOSTNAME #include "port-protos.h" /* For gethostname() */ #endif diff --git a/src/backend/rewrite/locks.c b/src/backend/rewrite/locks.c index af17455cac..f1065b9548 100644 --- a/src/backend/rewrite/locks.c +++ b/src/backend/rewrite/locks.c @@ -11,7 +11,6 @@ *------------------------------------------------------------------------- */ #include "postgres.h" /* for oid defs */ -#include "utils/elog.h" /* for elog */ #include "nodes/pg_list.h" /* lisp support package */ #include "nodes/parsenodes.h" #include "nodes/primnodes.h" /* Var node def */ diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c index 330539ccad..49f029ecdc 100644 --- a/src/backend/rewrite/rewriteDefine.c +++ b/src/backend/rewrite/rewriteDefine.c @@ -20,7 +20,7 @@ #include "access/heapam.h" /* access methods like amopenr */ #include "catalog/pg_rewrite.h" #include "nodes/parsenodes.h" -#include "nodes/pg_list.h" /* for Lisp support */ +#include "nodes/pg_list.h" #include "parser/parse_relation.h" #include "rewrite/locks.h" #include "rewrite/rewriteDefine.h" @@ -28,9 +28,9 @@ #include "rewrite/rewriteSupport.h" #include "tcop/tcopprot.h" #include "utils/builtins.h" -#include "utils/lsyscache.h" /* for get_typlen */ -#include "utils/rel.h" /* for Relation stuff */ - +#include "utils/lsyscache.h" +#include "utils/rel.h" +#include "storage/bufpage.h" Oid LastOidProcessed = InvalidOid; diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c index 09658f7087..956f3da4e5 100644 --- a/src/backend/rewrite/rewriteHandler.c +++ b/src/backend/rewrite/rewriteHandler.c @@ -13,13 +13,11 @@ #include <string.h> #include "postgres.h" #include "miscadmin.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "utils/rel.h" #include "nodes/pg_list.h" #include "nodes/primnodes.h" #include "nodes/relation.h" - +#include "parser/parse_type.h" #include "parser/parsetree.h" /* for parsetree manipulation */ #include "parser/parse_relation.h" #include "nodes/parsenodes.h" diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c index 5e982f7a67..df5cbc86bc 100644 --- a/src/backend/rewrite/rewriteManip.c +++ b/src/backend/rewrite/rewriteManip.c @@ -13,7 +13,6 @@ #include <string.h> #include "postgres.h" #include "nodes/pg_list.h" -#include "utils/elog.h" #include "nodes/nodes.h" #include "nodes/relation.h" #include "nodes/primnodes.h" diff --git a/src/backend/rewrite/rewriteSupport.c b/src/backend/rewrite/rewriteSupport.c index e8fb5e75f1..9c56a2bf31 100644 --- a/src/backend/rewrite/rewriteSupport.c +++ b/src/backend/rewrite/rewriteSupport.c @@ -25,7 +25,6 @@ #include "storage/bufmgr.h" #include "utils/builtins.h" /* for textout */ #include "utils/catcache.h" /* for CacheContext */ -#include "utils/mcxt.h" /* MemoryContext stuff */ #include "utils/rel.h" /* for Relation, RelationData ... */ #include "utils/syscache.h" /* for SearchSysCache */ diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index d6e9745f70..627bdc3cfd 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -64,7 +64,6 @@ #include "miscadmin.h" #include "utils/builtins.h" #include "utils/hsearch.h" -#include "utils/palloc.h" #include "utils/memutils.h" #include "utils/relcache.h" #include "executor/execdebug.h" /* for NDirectFileRead */ diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 6cde6e56fd..eb717b0f65 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -49,10 +49,7 @@ #include "postgres.h" #include "miscadmin.h" /* for DataDir */ -#include "utils/palloc.h" #include "storage/fd.h" -#include "utils/elog.h" -#include "utils/mcxt.h" /* * Problem: Postgres does a system(ld...) to do dynamic loading. diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c index b5a8887f4a..f0e49fdc70 100644 --- a/src/backend/storage/ipc/shmem.c +++ b/src/backend/storage/ipc/shmem.c @@ -69,6 +69,7 @@ #include "utils/memutils.h" #include "access/xact.h" #include "utils/tqual.h" +#include "access/transam.h" /* shared memory global variables */ diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/sinvaladt.c index 478674e288..ad3297b748 100644 --- a/src/backend/storage/ipc/sinvaladt.c +++ b/src/backend/storage/ipc/sinvaladt.c @@ -22,7 +22,6 @@ #include "storage/sinvaladt.h" #include "storage/lmgr.h" #include "utils/memutils.h" -#include "utils/palloc.h" #include "utils/trace.h" /* ---------------- diff --git a/src/backend/storage/lmgr/lmgr.c b/src/backend/storage/lmgr/lmgr.c index e9f32359e2..4791fdaedf 100644 --- a/src/backend/storage/lmgr/lmgr.c +++ b/src/backend/storage/lmgr/lmgr.c @@ -35,8 +35,6 @@ #include "storage/multilev.h" #include "storage/lmgr.h" -#include "utils/palloc.h" -#include "utils/mcxt.h" #include "utils/rel.h" #include "catalog/catname.h" diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index fc57d3de07..ebe4687641 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -44,7 +44,6 @@ #include "storage/lock.h" #include "utils/hsearch.h" #include "utils/memutils.h" -#include "utils/palloc.h" #include "access/xact.h" #include "access/transam.h" #include "utils/trace.h" diff --git a/src/backend/storage/page/bufpage.c b/src/backend/storage/page/bufpage.c index e6fae0e939..b777c7c474 100644 --- a/src/backend/storage/page/bufpage.c +++ b/src/backend/storage/page/bufpage.c @@ -20,7 +20,6 @@ #include "storage/item.h" #include "storage/buf.h" #include "storage/bufmgr.h" -#include "utils/palloc.h" #include "utils/memutils.h" #include "storage/bufpage.h" diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c index 7b93b48f03..3dfea97e0e 100644 --- a/src/backend/storage/smgr/md.c +++ b/src/backend/storage/smgr/md.c @@ -24,7 +24,6 @@ #include "storage/block.h" #include "storage/fd.h" #include "storage/smgr.h" /* where the declarations go */ -#include "utils/mcxt.h" #include "utils/rel.h" #undef DIAGNOSTIC diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c index af9e00b09d..e2b3de58ad 100644 --- a/src/backend/storage/smgr/smgr.c +++ b/src/backend/storage/smgr/smgr.c @@ -21,8 +21,6 @@ #include "storage/block.h" #include "storage/smgr.h" #include "utils/rel.h" -#include "utils/palloc.h" -#include "utils/mcxt.h" static void smgrshutdown(int dummy); diff --git a/src/backend/storage/smgr/smgrtype.c b/src/backend/storage/smgr/smgrtype.c index de04178905..e2dd99fb53 100644 --- a/src/backend/storage/smgr/smgrtype.c +++ b/src/backend/storage/smgr/smgrtype.c @@ -15,9 +15,7 @@ #include "postgres.h" #include "utils/builtins.h" /* where the declarations go */ -#include "utils/palloc.h" #include "storage/smgr.h" -#include "utils/mcxt.h" typedef struct smgrid { diff --git a/src/backend/tcop/dest.c b/src/backend/tcop/dest.c index 06e8d6e698..bc48405e13 100644 --- a/src/backend/tcop/dest.c +++ b/src/backend/tcop/dest.c @@ -42,14 +42,12 @@ #include "libpq/pqformat.h" #include "access/printtup.h" #include "utils/portal.h" -#include "utils/palloc.h" #include "executor/executor.h" #include "tcop/dest.h" #include "catalog/pg_type.h" -#include "utils/mcxt.h" #include "commands/async.h" diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c index 7ae00579aa..822fcd15a3 100644 --- a/src/backend/tcop/fastpath.c +++ b/src/backend/tcop/fastpath.c @@ -63,7 +63,6 @@ #include "tcop/tcopdebug.h" -#include "utils/palloc.h" #include "fmgr.h" #include "utils/builtins.h" /* for oideq */ #include "tcop/fastpath.h" diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index a761f272cf..6732477669 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -69,7 +69,6 @@ #include "tcop/tcopdebug.h" #include "tcop/tcopprot.h" /* where declarations for this file go */ #include "tcop/utility.h" -#include "utils/mcxt.h" #include "utils/rel.h" #include "utils/ps_status.h" #include "utils/temprel.h" @@ -81,10 +80,6 @@ #endif #ifdef NOT_USED -#include "optimizer/xfunc.h" -#endif - -#ifdef NOT_USED #include "nodes/plannodes.h" #endif @@ -1525,7 +1520,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.119 $ $Date: 1999/07/02 18:09:27 $\n"); + puts("$Revision: 1.120 $ $Date: 1999/07/15 15:19:59 $\n"); } /* ---------------- diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index de129a9715..b10baf92c7 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -17,9 +17,7 @@ #include "tcop/tcopdebug.h" -#include "utils/palloc.h" #include "nodes/nodes.h" -#include "utils/mcxt.h" #include "miscadmin.h" #include "utils/portal.h" diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 24b14ec399..82a00ee405 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -40,7 +40,6 @@ #include "../backend/parser/parse.h" #include "utils/builtins.h" #include "utils/acl.h" -#include "utils/palloc.h" #include "rewrite/rewriteRemove.h" #include "rewrite/rewriteDefine.h" #include "tcop/tcopdebug.h" diff --git a/src/backend/tioga/tgRecipe.h b/src/backend/tioga/tgRecipe.h index 1e1357d609..01b58d9535 100644 --- a/src/backend/tioga/tgRecipe.h +++ b/src/backend/tioga/tgRecipe.h @@ -19,7 +19,6 @@ #include "libpq/libpq.h" #ifndef TIOGA_FRONTEND #include "libpq/libpq-be.h" -#include "utils/elog.h" #include "utils/geo-decls.h" #else #include "libpq-fe.h" diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index 5e9a19abc1..0f9dd1c247 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -27,7 +27,6 @@ #include "storage/fd.h" #include "fmgr.h" #include "utils/array.h" -#include "utils/elog.h" #include "libpq/libpq-fs.h" #include "libpq/be-fsstubs.h" diff --git a/src/backend/utils/adt/arrayutils.c b/src/backend/utils/adt/arrayutils.c index a049e6b41f..dec001eb68 100644 --- a/src/backend/utils/adt/arrayutils.c +++ b/src/backend/utils/adt/arrayutils.c @@ -16,8 +16,6 @@ #include "postgres.h" -#include "utils/array.h" - int GetOffset(int n, int *dim, int *lb, int *indx) { diff --git a/src/backend/utils/adt/bool.c b/src/backend/utils/adt/bool.c index 51932c19ca..79f464215a 100644 --- a/src/backend/utils/adt/bool.c +++ b/src/backend/utils/adt/bool.c @@ -16,8 +16,6 @@ #include "postgres.h" #include "utils/builtins.h" /* where the declarations go */ -#include "utils/palloc.h" -#include "utils/mcxt.h" /***************************************************************************** * USER I/O ROUTINES * diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c index d6010565e8..8f25d129b3 100644 --- a/src/backend/utils/adt/cash.c +++ b/src/backend/utils/adt/cash.c @@ -22,7 +22,6 @@ #include "miscadmin.h" #include "utils/builtins.h" #include "utils/cash.h" -#include "utils/mcxt.h" static const char *num_word(Cash value); diff --git a/src/backend/utils/adt/char.c b/src/backend/utils/adt/char.c index e36952fa8a..c20f1869a3 100644 --- a/src/backend/utils/adt/char.c +++ b/src/backend/utils/adt/char.c @@ -15,9 +15,7 @@ #include <stdio.h> /* for sprintf() */ #include <string.h> #include "postgres.h" -#include "utils/palloc.h" #include "utils/builtins.h" /* where the declarations go */ -#include "utils/mcxt.h" /***************************************************************************** * USER I/O ROUTINES * diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index ddbec792d9..2c80cd9e9b 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -40,9 +40,7 @@ #endif #include "access/xact.h" #include "utils/builtins.h" /* where function declarations go */ -#include "utils/palloc.h" #include "utils/dt.h" -#include "utils/mcxt.h" #define INVALID_RELTIME_STR "Undefined RelTime" #define INVALID_RELTIME_STR_LEN (sizeof(INVALID_RELTIME_STR)-1) diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index dc3a6465a0..55dd18d16e 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -24,7 +24,6 @@ #include "utils/nabstime.h" #include "utils/datetime.h" #include "access/xact.h" -#include "utils/mcxt.h" static int date2tm(DateADT dateVal, int *tzp, struct tm * tm, double *fsec, char **tzn); diff --git a/src/backend/utils/adt/datum.c b/src/backend/utils/adt/datum.c index 30d8a367cd..e2f66a8804 100644 --- a/src/backend/utils/adt/datum.c +++ b/src/backend/utils/adt/datum.c @@ -31,8 +31,6 @@ #include "postgres.h" #include "utils/datum.h" #include "catalog/pg_type.h" -#include "utils/palloc.h" -#include "utils/mcxt.h" /*------------------------------------------------------------------------- * datumGetSize diff --git a/src/backend/utils/adt/dt.c b/src/backend/utils/adt/dt.c index 3f89094e02..31ebd7a828 100644 --- a/src/backend/utils/adt/dt.c +++ b/src/backend/utils/adt/dt.c @@ -30,7 +30,6 @@ #include <sys/timeb.h> #endif #include "utils/builtins.h" -#include "utils/mcxt.h" static int DecodeDate(char *str, int fmask, int *tmask, struct tm * tm); static int DecodeNumber(int flen, char *field, diff --git a/src/backend/utils/adt/filename.c b/src/backend/utils/adt/filename.c index 58b82cece0..3e37395101 100644 --- a/src/backend/utils/adt/filename.c +++ b/src/backend/utils/adt/filename.c @@ -21,7 +21,6 @@ #include "postgres.h" #include <miscadmin.h> #include "utils/builtins.h" /* where function declarations go */ -#include "utils/mcxt.h" char * filename_in(char *file) diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 0c2b2b11d4..14402854a8 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -61,8 +61,6 @@ #endif #include "fmgr.h" #include "utils/builtins.h" /* for ftod() prototype */ -#include "utils/palloc.h" -#include "utils/mcxt.h" #ifndef NAN #define NAN (0.0/0.0) diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index 436d0b60ae..7e775bfa1e 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -22,8 +22,6 @@ #include "postgres.h" #include "utils/geo_decls.h" -#include "utils/palloc.h" -#include "utils/mcxt.h" #ifndef PI #define PI 3.1415926536 diff --git a/src/backend/utils/adt/geo_selfuncs.c b/src/backend/utils/adt/geo_selfuncs.c index f33b31a0df..2eb2608b8f 100644 --- a/src/backend/utils/adt/geo_selfuncs.c +++ b/src/backend/utils/adt/geo_selfuncs.c @@ -18,9 +18,7 @@ #include "access/attnum.h" #include "utils/geo_decls.h" /* where function declarations go */ -#include "utils/palloc.h" #include "utils/builtins.h" -#include "utils/mcxt.h" float64 areasel(Oid opid, diff --git a/src/backend/utils/adt/int.c b/src/backend/utils/adt/int.c index aa895b3645..8b5a16175a 100644 --- a/src/backend/utils/adt/int.c +++ b/src/backend/utils/adt/int.c @@ -37,7 +37,6 @@ #include "postgres.h" #include "fmgr.h" #include "utils/builtins.h" /* where the declarations go */ -#include "utils/mcxt.h" #ifndef SHRT_MAX #define SHRT_MAX (0x7FFF) diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c index d8170dcd2e..6b2be8a5a0 100644 --- a/src/backend/utils/adt/int8.c +++ b/src/backend/utils/adt/int8.c @@ -15,9 +15,7 @@ #include <limits.h> #include "postgres.h" -#include "utils/palloc.h" #include "utils/int8.h" -#include "utils/mcxt.h" #define MAXINT8LEN 25 diff --git a/src/backend/utils/adt/like.c b/src/backend/utils/adt/like.c index 7586b63769..09925bb830 100644 --- a/src/backend/utils/adt/like.c +++ b/src/backend/utils/adt/like.c @@ -19,10 +19,8 @@ */ #include <string.h> #include "postgres.h" /* postgres system include file */ -#include "utils/palloc.h" #include "utils/builtins.h" /* where the function declarations go */ #include "mb/pg_wchar.h" -#include "utils/mcxt.h" static int like(pg_wchar * text, pg_wchar * p); @@ -112,7 +110,7 @@ textnlike(struct varlena * s, struct varlena * p) } -/* $Revision: 1.26 $ +/* $Revision: 1.27 $ ** "like.c" A first attempt at a LIKE operator for Postgres95. ** ** Originally written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986. diff --git a/src/backend/utils/adt/mac.c b/src/backend/utils/adt/mac.c index 28f51e6a00..671e0e295a 100644 --- a/src/backend/utils/adt/mac.c +++ b/src/backend/utils/adt/mac.c @@ -8,10 +8,8 @@ #include <string.h> #include <postgres.h> -#include <utils/palloc.h> #include <utils/builtins.h> #include <utils/inet.h> -#include "utils/mcxt.h" manufacturer manufacturers[] = { {0x00, 0x00, 0x0C, "Cisco"}, diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index e77804e865..6a224d6201 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -25,7 +25,6 @@ #endif #include "utils/builtins.h" #include "access/xact.h" -#include "utils/mcxt.h" static AbsoluteTime tm2abstime(struct tm * tm, int tz); diff --git a/src/backend/utils/adt/name.c b/src/backend/utils/adt/name.c index 4e3a98db56..17310486a3 100644 --- a/src/backend/utils/adt/name.c +++ b/src/backend/utils/adt/name.c @@ -18,8 +18,6 @@ #include <string.h> #include "postgres.h" #include "utils/builtins.h" /* where the declarations go */ -#include "utils/palloc.h" /* where the declarations go */ -#include "utils/mcxt.h" /***************************************************************************** * USER I/O ROUTINES (none) * diff --git a/src/backend/utils/adt/network.c b/src/backend/utils/adt/network.c index c542d81cb3..9eba14fe12 100644 --- a/src/backend/utils/adt/network.c +++ b/src/backend/utils/adt/network.c @@ -18,10 +18,8 @@ #include <arpa/inet.h> #include <postgres.h> -#include <utils/palloc.h> #include <utils/builtins.h> #include <utils/inet.h> -#include "utils/mcxt.h" static int v4bitncmp(unsigned int a1, unsigned int a2, int bits); diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index d1bf36e9fe..30c904664f 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -21,9 +21,7 @@ #include "postgres.h" #include "utils/builtins.h" -#include "utils/palloc.h" #include "utils/numeric.h" -#include "utils/mcxt.h" /* ---------- * Uncomment the following to enable compilation of dump_numeric() diff --git a/src/backend/utils/adt/oid.c b/src/backend/utils/adt/oid.c index ae21ac8f77..a0778efb20 100644 --- a/src/backend/utils/adt/oid.c +++ b/src/backend/utils/adt/oid.c @@ -17,7 +17,6 @@ #include "postgres.h" #include "utils/builtins.h" /* where function declarations go */ -#include "utils/mcxt.h" /***************************************************************************** * USER I/O ROUTINES * diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c index d23ca7b60a..00d5c24f2e 100644 --- a/src/backend/utils/adt/oracle_compat.c +++ b/src/backend/utils/adt/oracle_compat.c @@ -8,7 +8,6 @@ #include <ctype.h> #include "postgres.h" -#include "utils/mcxt.h" text *lower(text *string); text *upper(text *string); diff --git a/src/backend/utils/adt/regexp.c b/src/backend/utils/adt/regexp.c index 605c81102f..eb3d2ec237 100644 --- a/src/backend/utils/adt/regexp.c +++ b/src/backend/utils/adt/regexp.c @@ -33,7 +33,6 @@ #include <regex/regex.h> #include "utils/builtins.h" /* where the function declarations go */ -#include "utils/mcxt.h" #if defined(DISABLE_XOPEN_NLS) #undef _XOPEN_SOURCE diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c index 17266f61d2..27ac5b31a9 100644 --- a/src/backend/utils/adt/regproc.c +++ b/src/backend/utils/adt/regproc.c @@ -20,7 +20,6 @@ #include "access/relscan.h" #include "storage/bufmgr.h" #include "fmgr.h" -#include "utils/palloc.h" #include "utils/syscache.h" #include "catalog/catname.h" diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 688ea42873..c349bdd984 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -44,7 +44,6 @@ #include "executor/spi.h" #include "commands/trigger.h" -#include "utils/elog.h" #include "utils/builtins.h" #include "nodes/nodes.h" #include "optimizer/clauses.h" diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 1b77d98fcf..b62d2f8555 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -25,7 +25,6 @@ #include "fmgr.h" #include "utils/builtins.h" /* for textout() prototype and where the * declarations go */ -#include "utils/palloc.h" #include "catalog/catname.h" #include "utils/syscache.h" diff --git a/src/backend/utils/adt/tid.c b/src/backend/utils/adt/tid.c index 802cac1ad3..e70c8b53ed 100644 --- a/src/backend/utils/adt/tid.c +++ b/src/backend/utils/adt/tid.c @@ -19,9 +19,7 @@ #include "postgres.h" #include "storage/bufpage.h" -#include "utils/palloc.h" #include "utils/builtins.h" /* where function declarations go */ -#include "utils/mcxt.h" #define LDELIM '(' #define RDELIM ')' diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 6e1da178da..3c67ab854e 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -6,7 +6,6 @@ #include "miscadmin.h" #include "utils/builtins.h" #include "access/xact.h" -#include "utils/mcxt.h" time_t timestamp_in(const char *timestamp_str) diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c index e79cb964dc..5e7d9d5390 100644 --- a/src/backend/utils/adt/varchar.c +++ b/src/backend/utils/adt/varchar.c @@ -18,10 +18,11 @@ #include "utils/array.h" #include "utils/builtins.h" #include "catalog/pg_type.h" +#include "storage/bufpage.h" +#include "utils/memutils.h" #ifdef CYR_RECODE char *convertstr(char *, int, int); - #endif #include "mb/pg_wchar.h" diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index d2cb2be239..705ee72987 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -15,9 +15,7 @@ #include <string.h> #include "postgres.h" -#include "utils/palloc.h" #include "utils/builtins.h" /* where function declarations go */ -#include "utils/mcxt.h" #include "mb/pg_wchar.h" diff --git a/src/backend/utils/adt/version.c b/src/backend/utils/adt/version.c index b13037b9e9..6897a87ece 100644 --- a/src/backend/utils/adt/version.c +++ b/src/backend/utils/adt/version.c @@ -15,7 +15,6 @@ #include "postgres.h" #include "version.h" -#include "utils/mcxt.h" text *version(void); diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c index d7494930e3..ec21d0b169 100644 --- a/src/backend/utils/cache/catcache.c +++ b/src/backend/utils/cache/catcache.c @@ -19,9 +19,6 @@ #include "utils/builtins.h" #include "utils/portal.h" #include "utils/catcache.h" -#include "utils/elog.h" -#include "utils/palloc.h" -#include "utils/mcxt.h" #include "utils/rel.h" #include "storage/bufpage.h" #include "access/valid.h" diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c index f3df89f82c..e18ff5084b 100644 --- a/src/backend/utils/cache/lsyscache.c +++ b/src/backend/utils/cache/lsyscache.c @@ -21,8 +21,6 @@ #include "utils/lsyscache.h" #include "access/tupmacs.h" #include "utils/rel.h" -#include "utils/palloc.h" -#include "utils/elog.h" #include "access/attnum.h" #include "access/heapam.h" diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 8165cf0f5c..1520c22216 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -73,7 +73,6 @@ #include "utils/builtins.h" #include "utils/catcache.h" #include "utils/hsearch.h" -#include "utils/mcxt.h" #include "utils/memutils.h" #include "utils/rel.h" #include "utils/relcache.h" diff --git a/src/backend/utils/cache/temprel.c b/src/backend/utils/cache/temprel.c index d2c67acbde..c180d5493a 100644 --- a/src/backend/utils/cache/temprel.c +++ b/src/backend/utils/cache/temprel.c @@ -28,7 +28,6 @@ #include "postgres.h" #include "miscadmin.h" #include "nodes/pg_list.h" -#include "utils/mcxt.h" #include "utils/temprel.h" #include "access/xact.h" #include "access/htup.h" diff --git a/src/backend/utils/error/excid.c b/src/backend/utils/error/excid.c index c7b8a4c69d..bbf29aff3a 100644 --- a/src/backend/utils/error/excid.c +++ b/src/backend/utils/error/excid.c @@ -14,8 +14,6 @@ #include "postgres.h" -#include "utils/excid.h" - /***************************************************************************** * Generic Recoverable Exceptions * *****************************************************************************/ diff --git a/src/backend/utils/fmgr/dfmgr.c b/src/backend/utils/fmgr/dfmgr.c index e5d76dab19..79bc9f8f6e 100644 --- a/src/backend/utils/fmgr/dfmgr.c +++ b/src/backend/utils/fmgr/dfmgr.c @@ -21,7 +21,6 @@ #include "config.h" /* for MAXPATHLEN */ #include "fmgr.h" /* generated by Gen_fmgrtab.sh */ #include "utils/dynamic_loader.h" -#include "utils/elog.h" #include "utils/builtins.h" #include "access/heapam.h" #include "nodes/pg_list.h" diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c index 30fe54ffc5..b22ebbf57f 100644 --- a/src/backend/utils/fmgr/fmgr.c +++ b/src/backend/utils/fmgr/fmgr.c @@ -28,7 +28,6 @@ #include "nodes/params.h" #include "utils/builtins.h" -#include "utils/elog.h" #include "nodes/parsenodes.h" #include "commands/trigger.h" diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c index 95d2282e7a..e5d4202627 100644 --- a/src/backend/utils/hash/dynahash.c +++ b/src/backend/utils/hash/dynahash.c @@ -46,9 +46,7 @@ #include "utils/dynahash.h" #include "utils/hsearch.h" #ifndef FRONTEND -#include "utils/mcxt.h" #endif /* !FRONTEND */ -#include "utils/palloc.h" #include "utils/memutils.h" /* diff --git a/src/backend/utils/init/enbl.c b/src/backend/utils/init/enbl.c index 894b276e07..3473e3ee63 100644 --- a/src/backend/utils/init/enbl.c +++ b/src/backend/utils/init/enbl.c @@ -12,7 +12,6 @@ *------------------------------------------------------------------------- */ #include "postgres.h" -#include "utils/module.h" /* where the declarations go */ /* * BypassEnable diff --git a/src/backend/utils/init/globals.c b/src/backend/utils/init/globals.c index 68c5b623fb..973dc21347 100644 --- a/src/backend/utils/init/globals.c +++ b/src/backend/utils/init/globals.c @@ -31,7 +31,6 @@ #include "storage/sinval.h" #include "storage/sinvaladt.h" #include "storage/lmgr.h" -#include "utils/elog.h" #include "libpq/pqcomm.h" #include "catalog/catname.h" diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c index 4f7faa7df9..7a9c015718 100644 --- a/src/backend/utils/init/miscinit.c +++ b/src/backend/utils/init/miscinit.c @@ -25,8 +25,6 @@ #include "utils/portal.h" /* for EnablePortalManager, etc. */ #include "utils/exc.h" /* for EnableExceptionHandling, etc. */ -#include "utils/mcxt.h" /* for EnableMemoryContext, etc. */ -#include "utils/elog.h" #include "utils/builtins.h" #include "miscadmin.h" /* where the declarations go */ diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 784fd465ad..a86d4f268a 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -60,9 +60,6 @@ #include "utils/exc.h" /* for EnableExceptionHandling, etc. */ #include "fmgr.h" /* for EnableDynamicFunctionManager, etc. */ -#include "utils/elog.h" -#include "utils/palloc.h" -#include "utils/mcxt.h" /* for EnableMemoryContext, etc. */ #include "utils/inval.h" #include "catalog/catname.h" diff --git a/src/backend/utils/misc/database.c b/src/backend/utils/misc/database.c index fc50ed6068..be39338107 100644 --- a/src/backend/utils/misc/database.c +++ b/src/backend/utils/misc/database.c @@ -20,6 +20,7 @@ #include "postgres.h" #include "access/heapam.h" +#include "access/transam.h" #include "access/xact.h" #include "catalog/catname.h" #include "catalog/pg_database.h" diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c index 0449499dd0..e5b1c04da4 100644 --- a/src/backend/utils/mmgr/mcxt.c +++ b/src/backend/utils/mmgr/mcxt.c @@ -22,10 +22,7 @@ #include "nodes/memnodes.h" #include "nodes/nodes.h" -#include "utils/mcxt.h" -#include "utils/elog.h" -#include "utils/palloc.h" #undef MemoryContextAlloc #undef MemoryContextFree diff --git a/src/backend/utils/mmgr/palloc.c b/src/backend/utils/mmgr/palloc.c index 02fae4e42f..b2ab0fc409 100644 --- a/src/backend/utils/mmgr/palloc.c +++ b/src/backend/utils/mmgr/palloc.c @@ -16,9 +16,6 @@ #include "postgres.h" -#include "utils/mcxt.h" -#include "utils/elog.h" -#include "utils/palloc.h" #include "nodes/memnodes.h" diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c index d7c61e775c..cf179221e1 100644 --- a/src/backend/utils/mmgr/portalmem.c +++ b/src/backend/utils/mmgr/portalmem.c @@ -81,7 +81,6 @@ #include "lib/hasht.h" #include "utils/module.h" #include "utils/excid.h" /* for Unimplemented */ -#include "utils/mcxt.h" #include "utils/hsearch.h" #include "nodes/memnodes.h" diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c index bb5f8c6c67..928d748d35 100644 --- a/src/backend/utils/time/tqual.c +++ b/src/backend/utils/time/tqual.c @@ -20,8 +20,6 @@ #include "access/xact.h" #include "storage/bufmgr.h" #include "access/transam.h" -#include "utils/elog.h" -#include "utils/palloc.h" #include "utils/tqual.h" extern bool PostgresIsInitialized; diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index c9948b873a..fc144bd442 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -67,6 +67,8 @@ #include "catalog/pg_language.h" #include "catalog/pg_index.h" #include "catalog/pg_trigger.h" +#include "access/attnum.h" + #include "libpq-fe.h" #ifndef HAVE_STRDUP #include "strdup.h" diff --git a/src/include/access/gist.h b/src/include/access/gist.h index 383877e9ad..b1c31b2c66 100644 --- a/src/include/access/gist.h +++ b/src/include/access/gist.h @@ -16,12 +16,6 @@ #include <access/itup.h> #include <access/relscan.h> #include <access/sdir.h> -#include <storage/page.h> -#include <storage/block.h> -#include <utils/rel.h> -#include <storage/off.h> - -#include <fmgr.h> /* ** You can have as many strategies as you please in GiSTs, as diff --git a/src/include/access/gistscan.h b/src/include/access/gistscan.h index 4be3b676ca..d86036e9e1 100644 --- a/src/include/access/gistscan.h +++ b/src/include/access/gistscan.h @@ -12,9 +12,6 @@ #ifndef GISTSCAN_H #include <access/relscan.h> -#include <storage/off.h> -#include <storage/block.h> -#include <utils/rel.h> extern IndexScanDesc gistbeginscan(Relation r, bool fromEnd, uint16 nkeys, ScanKey key); diff --git a/src/include/access/giststrat.h b/src/include/access/giststrat.h index 20ad45863f..77fc90b162 100644 --- a/src/include/access/giststrat.h +++ b/src/include/access/giststrat.h @@ -12,7 +12,6 @@ #ifndef GISTSTRAT_H #define GISTSTRAT_H -#include <access/strat.h> #include <utils/rel.h> extern StrategyNumber RelationGetGISTStrategy(Relation r, diff --git a/src/include/access/hash.h b/src/include/access/hash.h index dbb5adc685..97a128903f 100644 --- a/src/include/access/hash.h +++ b/src/include/access/hash.h @@ -18,7 +18,6 @@ #include <access/sdir.h> #include <access/funcindex.h> -#include <storage/bufpage.h> #include <access/relscan.h> #include <access/itup.h> #include <utils/int8.h> diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 4231a29033..4381d0f049 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -13,13 +13,13 @@ #ifndef HEAPAM_H #define HEAPAM_H +#include <time.h> #include "access/tupmacs.h" #include "access/htup.h" #include "access/relscan.h" #include "storage/block.h" #include "utils/rel.h" #include "utils/tqual.h" -#include <time.h> /* ---------------------------------------------------------------- * heap access method statistics diff --git a/src/include/access/hio.h b/src/include/access/hio.h index 244d5f0209..483e7b36b8 100644 --- a/src/include/access/hio.h +++ b/src/include/access/hio.h @@ -14,8 +14,6 @@ #define HIO_H #include <access/htup.h> -#include <utils/rel.h> - extern void RelationPutHeapTuple(Relation relation, Buffer buffer, HeapTuple tuple); diff --git a/src/include/access/htup.h b/src/include/access/htup.h index 5b2f442e73..3a8feed054 100644 --- a/src/include/access/htup.h +++ b/src/include/access/htup.h @@ -1,4 +1,4 @@ -/*------------------------------------------------------------------------- + /*------------------------------------------------------------------------- * * htup.h * POSTGRES heap tuple definitions. @@ -13,10 +13,7 @@ #ifndef HTUP_H #define HTUP_H -#include <utils/nabstime.h> #include <storage/bufpage.h> -#include <storage/itemptr.h> -#include <utils/memutils.h> #define MinHeapTupleBitmapSize 32 /* 8 * 4 */ diff --git a/src/include/access/istrat.h b/src/include/access/istrat.h index 9c39802f30..2e9bbd4f95 100644 --- a/src/include/access/istrat.h +++ b/src/include/access/istrat.h @@ -14,7 +14,6 @@ #define ISTRAT_H #include <utils/rel.h> -#include <access/strat.h> /* * StrategyNumberIsValid diff --git a/src/include/access/itup.h b/src/include/access/itup.h index d4a71951e7..f6c081df75 100644 --- a/src/include/access/itup.h +++ b/src/include/access/itup.h @@ -17,7 +17,6 @@ #include <access/tupmacs.h> #include <access/tupdesc.h> #include <storage/itemptr.h> -#include <utils/memutils.h> #define MaxIndexAttributeNumber 7 diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 2e39da2e6f..15e7f58fe1 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -15,13 +15,8 @@ #include <access/sdir.h> #include <access/relscan.h> -#include <storage/itemid.h> -#include <storage/page.h> #include <access/funcindex.h> #include <access/itup.h> -#include <storage/bufmgr.h> /* don't remove, required by - * BT_READ/BT_WRITE */ -#include <storage/itemptr.h> /* * BTPageOpaqueData -- At the end of every page, we store a pointer diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h index f1282cf9d3..f2423f8be7 100644 --- a/src/include/access/relscan.h +++ b/src/include/access/relscan.h @@ -13,9 +13,6 @@ #ifndef RELSCAN_H #define RELSCAN_H -#include <storage/buf.h> -#include <utils/rel.h> -#include <access/htup.h> #include <utils/tqual.h> typedef ItemPointerData MarkData; diff --git a/src/include/access/rtree.h b/src/include/access/rtree.h index 9a49cc812a..c02b336da8 100644 --- a/src/include/access/rtree.h +++ b/src/include/access/rtree.h @@ -17,10 +17,6 @@ #include <access/itup.h> #include <access/relscan.h> #include <access/sdir.h> -#include <access/skey.h> -#include <access/strat.h> -#include <storage/block.h> -#include <storage/off.h> /* see rtstrat.c for what all this is about */ #define RTNStrategies 8 diff --git a/src/include/access/rtstrat.h b/src/include/access/rtstrat.h index 6653e5cf6e..0823184056 100644 --- a/src/include/access/rtstrat.h +++ b/src/include/access/rtstrat.h @@ -14,7 +14,6 @@ #define RTSTRAT_H #include <utils/rel.h> -#include <access/attnum.h> extern RegProcedure RTMapOperator(Relation r, AttrNumber attnum, RegProcedure proc); diff --git a/src/include/access/tupmacs.h b/src/include/access/tupmacs.h index 3af16dccb1..977a6a05a7 100644 --- a/src/include/access/tupmacs.h +++ b/src/include/access/tupmacs.h @@ -13,6 +13,8 @@ #ifndef TUPMACS_H #define TUPMACS_H +#include "utils/memutils.h" + /* * check to see if the ATT'th bit of an array of 8-bit bytes is set. */ diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 0735f7274e..f72b2a8265 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -13,8 +13,8 @@ #ifndef XACT_H #define XACT_H -#include <access/transam.h> #include <utils/nabstime.h> +#include <access/transam.h> /* ---------------- * transaction state structure diff --git a/src/include/catalog/index.h b/src/include/catalog/index.h index 9b8e08daf9..e8d08d4140 100644 --- a/src/include/catalog/index.h +++ b/src/include/catalog/index.h @@ -14,9 +14,7 @@ #define INDEX_H #include <nodes/execnodes.h> -#include <nodes/parsenodes.h> #include <access/itup.h> -#include <access/funcindex.h> extern Form_pg_am AccessMethodObjectIdGetForm(Oid accessMethodObjectId); diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h index c8dc8200f6..00223fbed6 100644 --- a/src/include/catalog/indexing.h +++ b/src/include/catalog/indexing.h @@ -15,7 +15,6 @@ #define INDEXING_H #include <access/htup.h> -#include <utils/rel.h> /* * Some definitions for indices on pg_attribute diff --git a/src/include/commands/dbcommands.h b/src/include/commands/dbcommands.h index e72ccf1d81..2743c302fb 100644 --- a/src/include/commands/dbcommands.h +++ b/src/include/commands/dbcommands.h @@ -13,7 +13,9 @@ #ifndef DBCOMMANDS_H #define DBCOMMANDS_H +#include <signal.h> #include "tcop/dest.h" + /* * Originally from tmp/daemon.h. The functions declared in daemon.h does not * exist; hence removed. -- AY 7/29/94 diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h index 89e13188ea..9b7fff0b24 100644 --- a/src/include/commands/trigger.h +++ b/src/include/commands/trigger.h @@ -9,11 +9,8 @@ #ifndef TRIGGER_H #define TRIGGER_H -#include "access/tupdesc.h" -#include "access/htup.h" #include "nodes/parsenodes.h" #include "nodes/execnodes.h" -#include "utils/rel.h" typedef uint32 TriggerEvent; diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h index 8d28924ec3..1dc57afb4a 100644 --- a/src/include/commands/vacuum.h +++ b/src/include/commands/vacuum.h @@ -18,9 +18,7 @@ #include "catalog/pg_index.h" #include "catalog/pg_attribute.h" #include "nodes/pg_list.h" -#include "storage/block.h" #include "storage/itemptr.h" -#include "storage/off.h" typedef struct VAttListData diff --git a/src/include/executor/execFlatten.h b/src/include/executor/execFlatten.h index 52edd7c877..1483aae581 100644 --- a/src/include/executor/execFlatten.h +++ b/src/include/executor/execFlatten.h @@ -15,7 +15,6 @@ #include "nodes/relation.h" #include "nodes/execnodes.h" -#include "nodes/parsenodes.h" extern Datum ExecEvalIter(Iter *iterNode, ExprContext *econtext, bool *resultIsNull, bool *iterIsDone); diff --git a/src/include/executor/execdebug.h b/src/include/executor/execdebug.h index 4676c6a91f..eb2fe1f00e 100644 --- a/src/include/executor/execdebug.h +++ b/src/include/executor/execdebug.h @@ -13,6 +13,8 @@ #ifndef EXECDEBUG_H #define EXECDEBUG_H +#include <nodes/print.h> + /* ---------------------------------------------------------------- * debugging defines. * diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 325402d24a..dc76149aae 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -13,9 +13,6 @@ #ifndef EXECUTOR_H #define EXECUTOR_H -#include <catalog/pg_index.h> -#include <storage/bufmgr.h> -#include <access/itup.h> #include <stdio.h> #include <executor/execdesc.h> diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h index 0fd7449d34..5d6615b84d 100644 --- a/src/include/executor/functions.h +++ b/src/include/executor/functions.h @@ -13,9 +13,7 @@ #ifndef FUNCTIONS_H #define FUNCTIONS_H -#include "access/tupdesc.h" #include "nodes/parsenodes.h" -#include "nodes/primnodes.h" #include "utils/syscache.h" extern Datum ProjectAttribute(TupleDesc TD, TargetEntry *tlist, diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h index 62fc5d328b..6899b0c4cc 100644 --- a/src/include/executor/hashjoin.h +++ b/src/include/executor/hashjoin.h @@ -14,8 +14,6 @@ #define HASHJOIN_H #include "access/htup.h" -#include "storage/fd.h" -#include "utils/mcxt.h" /* ---------------------------------------------------------------- * hash-join hash table structures diff --git a/src/include/executor/nodeAgg.h b/src/include/executor/nodeAgg.h index 5c9d5c31ae..4661e6111c 100644 --- a/src/include/executor/nodeAgg.h +++ b/src/include/executor/nodeAgg.h @@ -13,8 +13,6 @@ #ifndef NODEAGG_H #define NODEAGG_H -#include "executor/tuptable.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" extern TupleTableSlot *ExecAgg(Agg *node); diff --git a/src/include/executor/nodeAppend.h b/src/include/executor/nodeAppend.h index 44d869fdbc..ad3d6fa4b0 100644 --- a/src/include/executor/nodeAppend.h +++ b/src/include/executor/nodeAppend.h @@ -13,8 +13,6 @@ #ifndef NODEAPPEND_H #define NODEAPPEND_H -#include "executor/tuptable.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" extern bool ExecInitAppend(Append *node, EState *estate, Plan *parent); diff --git a/src/include/executor/nodeGroup.h b/src/include/executor/nodeGroup.h index 672601d11c..b1af1943f8 100644 --- a/src/include/executor/nodeGroup.h +++ b/src/include/executor/nodeGroup.h @@ -13,8 +13,6 @@ #ifndef NODEGROUP_H #define NODEGROUP_H -#include "executor/tuptable.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" extern TupleTableSlot *ExecGroup(Group *node); diff --git a/src/include/executor/nodeHash.h b/src/include/executor/nodeHash.h index b247deb502..154c049ff4 100644 --- a/src/include/executor/nodeHash.h +++ b/src/include/executor/nodeHash.h @@ -13,12 +13,7 @@ #ifndef NODEHASH_H #define NODEHASH_H -#include "executor/hashjoin.h" -#include "executor/tuptable.h" -#include "nodes/execnodes.h" -#include "nodes/pg_list.h" #include "nodes/plannodes.h" -#include "utils/syscache.h" extern TupleTableSlot *ExecHash(Hash *node); extern bool ExecInitHash(Hash *node, EState *estate, Plan *parent); diff --git a/src/include/executor/nodeHashjoin.h b/src/include/executor/nodeHashjoin.h index 4169a77497..ede5508b53 100644 --- a/src/include/executor/nodeHashjoin.h +++ b/src/include/executor/nodeHashjoin.h @@ -14,8 +14,6 @@ #define NODEHASHJOIN_H #include "nodes/plannodes.h" -#include "nodes/execnodes.h" -#include "utils/syscache.h" extern TupleTableSlot *ExecHashJoin(HashJoin *node); extern bool ExecInitHashJoin(HashJoin *node, EState *estate, Plan *parent); diff --git a/src/include/executor/nodeIndexscan.h b/src/include/executor/nodeIndexscan.h index 0aad6fdcd1..a75b48fd83 100644 --- a/src/include/executor/nodeIndexscan.h +++ b/src/include/executor/nodeIndexscan.h @@ -13,8 +13,6 @@ #ifndef NODEINDEXSCAN_H #define NODEINDEXSCAN_H -#include "executor/tuptable.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" extern TupleTableSlot *ExecIndexScan(IndexScan *node); diff --git a/src/include/executor/nodeMaterial.h b/src/include/executor/nodeMaterial.h index d6d49bdc31..de32dd77b8 100644 --- a/src/include/executor/nodeMaterial.h +++ b/src/include/executor/nodeMaterial.h @@ -13,8 +13,6 @@ #ifndef NODEMATERIAL_H #define NODEMATERIAL_H -#include "executor/tuptable.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" extern TupleTableSlot *ExecMaterial(Material *node); diff --git a/src/include/executor/nodeMergejoin.h b/src/include/executor/nodeMergejoin.h index 6a0b4a6524..97bd143e22 100644 --- a/src/include/executor/nodeMergejoin.h +++ b/src/include/executor/nodeMergejoin.h @@ -13,8 +13,6 @@ #ifndef NODEMERGEJOIN_H #define NODEMERGEJOIN_H -#include "executor/tuptable.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" extern TupleTableSlot *ExecMergeJoin(MergeJoin *node); diff --git a/src/include/executor/nodeNestloop.h b/src/include/executor/nodeNestloop.h index 3dd41b1f1c..c60ae03e98 100644 --- a/src/include/executor/nodeNestloop.h +++ b/src/include/executor/nodeNestloop.h @@ -13,8 +13,6 @@ #ifndef NODENESTLOOP_H #define NODENESTLOOP_H -#include "executor/tuptable.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" extern TupleTableSlot *ExecNestLoop(NestLoop *node, Plan *parent); diff --git a/src/include/executor/nodeResult.h b/src/include/executor/nodeResult.h index 02b4173eff..3726dff34e 100644 --- a/src/include/executor/nodeResult.h +++ b/src/include/executor/nodeResult.h @@ -13,8 +13,6 @@ #ifndef NODERESULT_H #define NODERESULT_H -#include "executor/tuptable.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" extern TupleTableSlot *ExecResult(Result *node); diff --git a/src/include/executor/nodeSeqscan.h b/src/include/executor/nodeSeqscan.h index ae478d2718..d504109b73 100644 --- a/src/include/executor/nodeSeqscan.h +++ b/src/include/executor/nodeSeqscan.h @@ -13,8 +13,6 @@ #ifndef NODESEQSCAN_H #define NODESEQSCAN_H -#include "executor/tuptable.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" extern TupleTableSlot *ExecSeqScan(SeqScan *node); diff --git a/src/include/executor/nodeSort.h b/src/include/executor/nodeSort.h index b3a342fc0e..8b1c012e36 100644 --- a/src/include/executor/nodeSort.h +++ b/src/include/executor/nodeSort.h @@ -13,8 +13,6 @@ #ifndef NODESORT_H #define NODESORT_H -#include "executor/tuptable.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" extern TupleTableSlot *ExecSort(Sort *node); diff --git a/src/include/executor/nodeSubplan.h b/src/include/executor/nodeSubplan.h index b74fbc00af..98251c2487 100644 --- a/src/include/executor/nodeSubplan.h +++ b/src/include/executor/nodeSubplan.h @@ -7,8 +7,6 @@ #ifndef NODESUBPLAN_H #define NODESUBPLAN_H -#include "executor/tuptable.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" extern Datum ExecSubPlan(SubPlan *node, List *pvar, ExprContext *econtext); diff --git a/src/include/executor/nodeUnique.h b/src/include/executor/nodeUnique.h index 61d053c412..9afcd9007c 100644 --- a/src/include/executor/nodeUnique.h +++ b/src/include/executor/nodeUnique.h @@ -13,8 +13,6 @@ #ifndef NODEUNIQUE_H #define NODEUNIQUE_H -#include "executor/tuptable.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" extern TupleTableSlot *ExecUnique(Unique *node); diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h index ea9bda89b8..80af87f16a 100644 --- a/src/include/executor/spi.h +++ b/src/include/executor/spi.h @@ -10,6 +10,11 @@ #include <string.h> #include "postgres.h" + +/* + * These are not needed by this file, but used by other programs + * using SPI + */ #include "nodes/primnodes.h" #include "nodes/relation.h" #include "nodes/execnodes.h" @@ -23,10 +28,7 @@ #include "nodes/params.h" #include "utils/fcache.h" #include "utils/datum.h" -#include "utils/elog.h" -#include "utils/palloc.h" #include "utils/syscache.h" -#include "utils/mcxt.h" #include "utils/portal.h" #include "utils/builtins.h" #include "catalog/pg_language.h" diff --git a/src/include/executor/spi_priv.h b/src/include/executor/spi_priv.h index ab23066ed6..e9a7b8a90c 100644 --- a/src/include/executor/spi_priv.h +++ b/src/include/executor/spi_priv.h @@ -11,8 +11,6 @@ #define SPI_PRIV_H #include "executor/spi.h" -#include "catalog/pg_type.h" -#include "access/printtup.h" typedef struct { diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h index 9d8be6c2e6..b66320fa7a 100644 --- a/src/include/executor/tuptable.h +++ b/src/include/executor/tuptable.h @@ -17,8 +17,6 @@ #ifndef TUPTABLE_H #define TUPTABLE_H -#include <storage/buf.h> -#include <access/tupdesc.h> #include <access/htup.h> /* ---------------- diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index 834e51858e..89b5b40231 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -17,7 +17,6 @@ #include <stdio.h> #include <sys/types.h> -#include "libpq/pqcomm.h" #include "libpq/hba.h" diff --git a/src/include/libpq/libpq.h b/src/include/libpq/libpq.h index 449e2f8b13..414fa8aff0 100644 --- a/src/include/libpq/libpq.h +++ b/src/include/libpq/libpq.h @@ -19,7 +19,7 @@ #include "libpq/libpq-be.h" #include "tcop/dest.h" - +#include "utils/exc.h" /* ---------------- * PQArgBlock diff --git a/src/include/libpq/pqformat.h b/src/include/libpq/pqformat.h index 92f4a3afaf..a448177d41 100644 --- a/src/include/libpq/pqformat.h +++ b/src/include/libpq/pqformat.h @@ -12,7 +12,6 @@ #ifndef PQFORMAT_H #define PQFORMAT_H -#include "postgres.h" #include "lib/stringinfo.h" #define pq_beginmessage(buf) initStringInfo(buf) diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index fb49ee6e2a..4bb8739017 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -13,7 +13,6 @@ #ifndef EXECNODES_H #define EXECNODES_H -#include <nodes/memnodes.h> #include <nodes/primnodes.h> #include <executor/hashjoin.h> #include <access/relscan.h> diff --git a/src/include/nodes/makefuncs.h b/src/include/nodes/makefuncs.h index 927db1566b..faa2bae7b2 100644 --- a/src/include/nodes/makefuncs.h +++ b/src/include/nodes/makefuncs.h @@ -13,9 +13,7 @@ #ifndef MAKEFUNC_H #define MAKEFUNC_H -#include <nodes/primnodes.h> #include <nodes/parsenodes.h> -#include <utils/fcache.h> extern Oper *makeOper(Oid opno, Oid opid, diff --git a/src/include/nodes/nodeFuncs.h b/src/include/nodes/nodeFuncs.h index 1f35fa2e25..f48e65f1b7 100644 --- a/src/include/nodes/nodeFuncs.h +++ b/src/include/nodes/nodeFuncs.h @@ -13,7 +13,6 @@ #ifndef NODEFUNCS_H #define NODEFUNCS_H -#include <nodes/nodes.h> #include <nodes/primnodes.h> extern bool single_node(Node *node); diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index 3673685b6d..360dc4628f 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -262,13 +262,7 @@ typedef struct Node */ extern Node *newNode(Size size, NodeTag tag); -/* - * nodes/{outfuncs.c,print.c} - */ -#define nodeDisplay pprint - extern char *nodeToString(void *obj); -extern void print(void *obj); /* * nodes/{readfuncs.c,read.c} diff --git a/src/include/nodes/print.h b/src/include/nodes/print.h index 2462e5bf1d..d4b0aa056a 100644 --- a/src/include/nodes/print.h +++ b/src/include/nodes/print.h @@ -13,11 +13,13 @@ #ifndef PRINT_H #define PRINT_H -#include "nodes/nodes.h" -#include "nodes/plannodes.h" #include "nodes/parsenodes.h" -#include "nodes/relation.h" -#include "executor/tuptable.h" +#include "nodes/plannodes.h" + +/* + * nodes/{outfuncs.c,print.c} + */ +#define nodeDisplay pprint extern void print(void *obj); extern void pprint(void *obj); diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index dba5fb998e..3a1363cafa 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -14,7 +14,6 @@ #define RELATION_H #include <nodes/parsenodes.h> -#include <nodes/primnodes.h> /* * Relids diff --git a/src/include/optimizer/xfunc.h b/src/include/optimizer/_deadcode/xfunc.h index 709a050268..7e973696e4 100644 --- a/src/include/optimizer/xfunc.h +++ b/src/include/optimizer/_deadcode/xfunc.h @@ -33,12 +33,6 @@ extern int XfuncMode; /* defined in tcop/postgres.c */ -/* defaults for function attributes used for expensive function calculations */ -#define BYTE_PCT 100 -#define PERBYTE_CPU 0 -#define PERCALL_CPU 0 -#define OUTIN_RATIO 100 - /* default width assumed for variable length attributes */ #define VARLEN_DEFAULT 128; diff --git a/src/include/optimizer/clauses.h b/src/include/optimizer/clauses.h index 7a36d5c493..a7390237dd 100644 --- a/src/include/optimizer/clauses.h +++ b/src/include/optimizer/clauses.h @@ -13,7 +13,6 @@ #ifndef CLAUSES_H #define CLAUSES_H -#include <nodes/primnodes.h> #include <nodes/relation.h> extern Expr *make_clause(int type, Node *oper, List *args); diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h index 9a29421755..5a4df745fe 100644 --- a/src/include/optimizer/cost.h +++ b/src/include/optimizer/cost.h @@ -13,11 +13,14 @@ #ifndef COST_H #define COST_H -#include "nodes/nodes.h" -#include "nodes/parsenodes.h" -#include "nodes/pg_list.h" #include "nodes/relation.h" +/* defaults for function attributes used for expensive function calculations */ +#define BYTE_PCT 100 +#define PERBYTE_CPU 0 +#define PERCALL_CPU 0 +#define OUTIN_RATIO 100 + /* * prototypes for costsize.c * routines to compute costs and sizes diff --git a/src/include/optimizer/geqo.h b/src/include/optimizer/geqo.h index 6445954c80..126149f08b 100644 --- a/src/include/optimizer/geqo.h +++ b/src/include/optimizer/geqo.h @@ -21,8 +21,6 @@ #ifndef GEQO_H #define GEQO_H -#include "nodes/nodes.h" -#include "nodes/parsenodes.h" #include "nodes/relation.h" #include "optimizer/geqo_gene.h" diff --git a/src/include/optimizer/geqo_gene.h b/src/include/optimizer/geqo_gene.h index f032667811..ae83712599 100644 --- a/src/include/optimizer/geqo_gene.h +++ b/src/include/optimizer/geqo_gene.h @@ -23,8 +23,6 @@ #define GEQO_GENE_H #include "nodes/nodes.h" -#include "nodes/relation.h" -#include "optimizer/geqo_gene.h" /* we presume that int instead of Relid is o.k. for Gene; so don't change it! */ diff --git a/src/include/optimizer/geqo_misc.h b/src/include/optimizer/geqo_misc.h index 19cedca16c..2f49257264 100644 --- a/src/include/optimizer/geqo_misc.h +++ b/src/include/optimizer/geqo_misc.h @@ -23,9 +23,8 @@ #include <stdio.h> -#include "nodes/parsenodes.h" -#include "optimizer/geqo_gene.h" #include "optimizer/geqo_recombination.h" +#include "nodes/relation.h" extern void print_pool(FILE *fp, Pool *pool, int start, int stop); extern void print_gen(FILE *fp, Pool *pool, int generation); diff --git a/src/include/optimizer/geqo_pool.h b/src/include/optimizer/geqo_pool.h index 052a2ee2d6..67bd5557c3 100644 --- a/src/include/optimizer/geqo_pool.h +++ b/src/include/optimizer/geqo_pool.h @@ -23,6 +23,7 @@ #define GEQO_POOL_H #include "optimizer/geqo_gene.h" +#include "nodes/parsenodes.h" extern Pool *alloc_pool(int pool_size, int string_length); extern void free_pool(Pool *pool); diff --git a/src/include/optimizer/internal.h b/src/include/optimizer/internal.h index f32c17c74a..0f17be9320 100644 --- a/src/include/optimizer/internal.h +++ b/src/include/optimizer/internal.h @@ -13,6 +13,8 @@ #ifndef INTERNAL_H #define INTERNAL_H +#include "catalog/pg_index.h" + /* * ---------- SHARED MACROS * diff --git a/src/include/optimizer/joininfo.h b/src/include/optimizer/joininfo.h index f72f46d342..49cab11d14 100644 --- a/src/include/optimizer/joininfo.h +++ b/src/include/optimizer/joininfo.h @@ -13,9 +13,7 @@ #ifndef JOININFO_H #define JOININFO_H -#include "nodes/nodes.h" #include "nodes/relation.h" -#include "nodes/primnodes.h" extern JoinInfo *joininfo_member(List *join_relids, List *joininfo_list); extern JoinInfo *find_joininfo_node(RelOptInfo *this_rel, List *join_relids); diff --git a/src/include/optimizer/keys.h b/src/include/optimizer/keys.h index e3a90b7c4e..5b729bbdad 100644 --- a/src/include/optimizer/keys.h +++ b/src/include/optimizer/keys.h @@ -13,7 +13,6 @@ #ifndef KEYS_H #define KEYS_H -#include "nodes/nodes.h" #include "nodes/relation.h" extern bool match_indexkey_operand(int indexkey, Var *operand, RelOptInfo *rel); diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h index f4263b0f77..1672996655 100644 --- a/src/include/optimizer/pathnode.h +++ b/src/include/optimizer/pathnode.h @@ -13,9 +13,7 @@ #ifndef PATHNODE_H #define PATHNODE_H -#include "nodes/nodes.h" #include "nodes/relation.h" -#include "nodes/parsenodes.h" /* * prototypes for pathnode.c diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index 22847af209..367238efe0 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -14,8 +14,6 @@ #ifndef PATHS_H #define PATHS_H -#include "nodes/nodes.h" -#include "nodes/parsenodes.h" #include "nodes/relation.h" /* diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h index 52852f6298..493cf0f5ee 100644 --- a/src/include/optimizer/planmain.h +++ b/src/include/optimizer/planmain.h @@ -13,9 +13,7 @@ #ifndef PLANMAIN_H #define PLANMAIN_H -#include "nodes/nodes.h" #include "nodes/plannodes.h" -#include "nodes/parsenodes.h" #include "nodes/relation.h" /* diff --git a/src/include/optimizer/planner.h b/src/include/optimizer/planner.h index c40b65df86..c54d57dd4d 100644 --- a/src/include/optimizer/planner.h +++ b/src/include/optimizer/planner.h @@ -18,7 +18,6 @@ #include "nodes/parsenodes.h" #include "nodes/plannodes.h" -#include "parser/parse_node.h" extern Plan *planner(Query *parse); extern Plan *union_planner(Query *parse); diff --git a/src/include/optimizer/restrictinfo.h b/src/include/optimizer/restrictinfo.h index e20a6f7f73..594e6afb8e 100644 --- a/src/include/optimizer/restrictinfo.h +++ b/src/include/optimizer/restrictinfo.h @@ -13,7 +13,6 @@ #ifndef RESTRICTINFO_H #define RESTRICTINFO_H -#include "nodes/pg_list.h" #include "nodes/relation.h" extern bool valid_or_clause(RestrictInfo *restrictinfo); diff --git a/src/include/optimizer/subselect.h b/src/include/optimizer/subselect.h index 5e9e16e51d..d4970e4848 100644 --- a/src/include/optimizer/subselect.h +++ b/src/include/optimizer/subselect.h @@ -7,7 +7,6 @@ #ifndef SUBSELECT_H #define SUBSELECT_H -#include "nodes/pg_list.h" #include "nodes/plannodes.h" extern int PlannerQueryLevel; /* level of current query */ diff --git a/src/include/optimizer/tlist.h b/src/include/optimizer/tlist.h index dc6b86b45a..116b8539e7 100644 --- a/src/include/optimizer/tlist.h +++ b/src/include/optimizer/tlist.h @@ -13,8 +13,6 @@ #ifndef TLIST_H #define TLIST_H -#include "nodes/nodes.h" -#include "nodes/parsenodes.h" #include "nodes/relation.h" extern TargetEntry *tlistentry_member(Var *var, List *targetlist); diff --git a/src/include/optimizer/var.h b/src/include/optimizer/var.h index 3651ee4b03..9b2ed05330 100644 --- a/src/include/optimizer/var.h +++ b/src/include/optimizer/var.h @@ -13,7 +13,6 @@ #ifndef VAR_H #define VAR_H -#include "nodes/nodes.h" #include "nodes/primnodes.h" extern List *pull_varnos(Node *me); diff --git a/src/include/parser/parse_agg.h b/src/include/parser/parse_agg.h index ecd0db5dcf..cee0635b7d 100644 --- a/src/include/parser/parse_agg.h +++ b/src/include/parser/parse_agg.h @@ -13,9 +13,6 @@ #ifndef PARSE_AGG_H #define PARSE_AGG_H -#include <nodes/nodes.h> -#include <nodes/parsenodes.h> -#include <nodes/primnodes.h> #include <parser/parse_node.h> extern void AddAggToParseState(ParseState *pstate, Aggref *aggref); diff --git a/src/include/parser/parse_clause.h b/src/include/parser/parse_clause.h index d9a21839e3..3ec7c3f2c7 100644 --- a/src/include/parser/parse_clause.h +++ b/src/include/parser/parse_clause.h @@ -13,10 +13,6 @@ #ifndef PARSE_CLAUSE_H #define PARSE_CLAUSE_H -#include <nodes/pg_list.h> -#include <nodes/nodes.h> -#include <nodes/parsenodes.h> -#include <nodes/primnodes.h> #include <parser/parse_node.h> extern void makeRangeTable(ParseState *pstate, char *relname, List *frmList, Node **qual); diff --git a/src/include/parser/parse_coerce.h b/src/include/parser/parse_coerce.h index 456345394c..addbe5b3fe 100644 --- a/src/include/parser/parse_coerce.h +++ b/src/include/parser/parse_coerce.h @@ -13,8 +13,8 @@ #ifndef PARSE_COERCE_H #define PARSE_COERCE_H -#include "nodes/pg_list.h" #include "parser/parse_node.h" +#include "catalog/pg_type.h" typedef enum CATEGORY { diff --git a/src/include/parser/parse_expr.h b/src/include/parser/parse_expr.h index 8751445aef..878e3cb25c 100644 --- a/src/include/parser/parse_expr.h +++ b/src/include/parser/parse_expr.h @@ -13,10 +13,8 @@ #ifndef PARSE_EXPR_H #define PARSE_EXPR_H -#include <nodes/nodes.h> -#include <nodes/parsenodes.h> -#include <nodes/primnodes.h> #include <parser/parse_node.h> +#include "parser/parse_type.h" extern Node *transformExpr(ParseState *pstate, Node *expr, int precedence); extern Oid exprType(Node *expr); diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h index 8f7c835988..a0b94e9c45 100644 --- a/src/include/parser/parse_func.h +++ b/src/include/parser/parse_func.h @@ -13,11 +13,6 @@ #ifndef PARSER_FUNC_H #define PARSER_FUNC_H -#include <nodes/nodes.h> -#include <nodes/pg_list.h> -#include <nodes/parsenodes.h> -#include <nodes/primnodes.h> -#include <parser/parse_func.h> #include <parser/parse_node.h> diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h index a4dc98176e..e072794241 100644 --- a/src/include/parser/parse_node.h +++ b/src/include/parser/parse_node.h @@ -12,11 +12,7 @@ #ifndef PARSE_NODE_H #define PARSE_NODE_H -#include <nodes/nodes.h> -#include <nodes/pg_list.h> -#include <nodes/primnodes.h> #include <nodes/parsenodes.h> -#include <parser/parse_type.h> #include <utils/rel.h> /* state information used during parse analysis */ diff --git a/src/include/parser/parse_oper.h b/src/include/parser/parse_oper.h index 678150701a..f9d6c70221 100644 --- a/src/include/parser/parse_oper.h +++ b/src/include/parser/parse_oper.h @@ -13,8 +13,7 @@ #ifndef PARSE_OPER_H #define PARSE_OPER_H -#include <parser/parse_func.h> -#include <parser/parse_node.h> +#include "access/htup.h" typedef HeapTuple Operator; diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h index 3b97700024..60b88fd3df 100644 --- a/src/include/parser/parse_relation.h +++ b/src/include/parser/parse_relation.h @@ -13,12 +13,7 @@ #ifndef PARSE_QUERY_H #define PARSE_RANGE_H -#include <nodes/nodes.h> -#include <nodes/parsenodes.h> -#include <nodes/pg_list.h> -#include <nodes/primnodes.h> #include <parser/parse_node.h> -#include <utils/rel.h> extern RangeTblEntry *refnameRangeTableEntry(ParseState *pstate, char *refname); extern int refnameRangeTablePosn(ParseState *pstate, diff --git a/src/include/parser/parse_target.h b/src/include/parser/parse_target.h index cc7f023250..415af90ef5 100644 --- a/src/include/parser/parse_target.h +++ b/src/include/parser/parse_target.h @@ -13,10 +13,6 @@ #ifndef PARSE_TARGET_H #define PARSE_TARGET_H -#include <nodes/pg_list.h> -#include <nodes/nodes.h> -#include <nodes/parsenodes.h> -#include <nodes/primnodes.h> #include <parser/parse_node.h> #define EXPR_COLUMN_FIRST 1 diff --git a/src/include/parser/parsetree.h b/src/include/parser/parsetree.h index eee2b9ea03..e863aab896 100644 --- a/src/include/parser/parsetree.h +++ b/src/include/parser/parsetree.h @@ -14,6 +14,9 @@ #ifndef PARSETREE_H #define PARSETREE_H /* include once only */ +#include "nodes/parsenodes.h" +#include "nodes/pg_list.h" + /* ---------------- * need pg_list.h for definitions of CAR(), etc. macros * ---------------- diff --git a/src/include/postgres.h b/src/include/postgres.h index 2cf0d44be1..cc04a327d4 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -40,8 +40,9 @@ #include "config.h" #endif #include "c.h" -#include "utils/elog.h" #include "utils/palloc.h" +#include "utils/mcxt.h" +#include "utils/elog.h" /* ---------------------------------------------------------------- * Section 1: simple type definitions diff --git a/src/include/rewrite/locks.h b/src/include/rewrite/locks.h index f07f47bf1b..8add8a6592 100644 --- a/src/include/rewrite/locks.h +++ b/src/include/rewrite/locks.h @@ -13,7 +13,6 @@ #ifndef LOCKS_H #define LOCKS_H -#include "nodes/nodes.h" #include "nodes/parsenodes.h" #include "rewrite/prs2lock.h" diff --git a/src/include/rewrite/rewriteHandler.h b/src/include/rewrite/rewriteHandler.h index 8e2ecc7a12..9182c71599 100644 --- a/src/include/rewrite/rewriteHandler.h +++ b/src/include/rewrite/rewriteHandler.h @@ -13,7 +13,6 @@ #ifndef REWRITEHANDLER_H #define REWRITEHANDLER_H -#include "nodes/nodes.h" #include "nodes/parsenodes.h" struct _rewrite_meta_knowledge diff --git a/src/include/rewrite/rewriteManip.h b/src/include/rewrite/rewriteManip.h index bbb6290c44..fa2e179546 100644 --- a/src/include/rewrite/rewriteManip.h +++ b/src/include/rewrite/rewriteManip.h @@ -13,8 +13,6 @@ #ifndef REWRITEMANIP_H #define REWRITEMANIP_H -#include "nodes/nodes.h" -#include "nodes/parsenodes.h" #include "rewrite/rewriteHandler.h" /* RewriteManip.c */ diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index aa2f533ab1..ad1a1ef1b9 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -54,17 +54,6 @@ typedef bits16 BufferLock; */ #define BufferDescriptorGetBuffer(bdesc) ((bdesc)->buf_id + 1) -/* - * BufferIsPinned - * True iff the buffer is pinned (and therefore valid) - * - * Note: - * Smenatics are identical to BufferIsValid - * XXX - need to remove either one eventually. - */ -#define BufferIsPinned BufferIsValid - - extern int ShowPinTrace; /* @@ -101,6 +90,17 @@ extern int ShowPinTrace; ) \ ) +/* + * BufferIsPinned + * True iff the buffer is pinned (and therefore valid) + * + * Note: + * Smenatics are identical to BufferIsValid + * XXX - need to remove either one eventually. + */ +#define BufferIsPinned BufferIsValid + + #define IncrBufferRefCount(buffer) \ ( \ BufferIsLocal(buffer) ? \ diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h index 0ae94daa9a..d05479d825 100644 --- a/src/include/storage/bufpage.h +++ b/src/include/storage/bufpage.h @@ -18,6 +18,7 @@ #include <storage/item.h> #include <storage/buf.h> #include <storage/page.h> +#include <storage/bufmgr.h> /* * a postgres disk page is an abstraction layered on top of a postgres diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h index 9eb66127ec..e135d4ebb3 100644 --- a/src/include/storage/lmgr.h +++ b/src/include/storage/lmgr.h @@ -15,7 +15,6 @@ #include <storage/lock.h> #include <utils/rel.h> -#include <catalog/catname.h> #define AccessShareLock 1 /* SELECT */ #define RowShareLock 2 /* SELECT FOR UPDATE */ diff --git a/src/include/storage/off.h b/src/include/storage/off.h index 4d5cc5ac91..1938e983c5 100644 --- a/src/include/storage/off.h +++ b/src/include/storage/off.h @@ -13,6 +13,7 @@ #ifndef OFF_H #define OFF_H +#include "storage/itemid.h" /* * OffsetNumber: * diff --git a/src/include/storage/pos.h b/src/include/storage/pos.h index 9d74431b56..07b9d94413 100644 --- a/src/include/storage/pos.h +++ b/src/include/storage/pos.h @@ -13,6 +13,8 @@ #ifndef POS_H #define POS_H +#include "storage/off.h" + /* * a 'position' used to be <pagenumber, offset> in postgres. this has * been changed to just <offset> as the notion of having multiple pages diff --git a/src/include/tcop/dest.h b/src/include/tcop/dest.h index 2548ca6264..830fb6042d 100644 --- a/src/include/tcop/dest.h +++ b/src/include/tcop/dest.h @@ -52,7 +52,6 @@ #define DEST_H #include <access/htup.h> -#include <access/tupdesc.h> /* ---------------- * CommandDest is a simplistic means of identifying the desired diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index fbcfc13865..40191186b8 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -24,6 +24,7 @@ #include <nodes/parsenodes.h> #include <utils/array.h> +#include "utils/memutils.h" /* * AclId system identifier for the user, group, etc. diff --git a/src/include/utils/array.h b/src/include/utils/array.h index 936e980c31..9a8cfdc6eb 100644 --- a/src/include/utils/array.h +++ b/src/include/utils/array.h @@ -23,6 +23,7 @@ #define ARRAY_H #include <stdio.h> +#include "utils/memutils.h" typedef struct { @@ -97,11 +98,7 @@ typedef struct *------------------------------------------------------------------------ */ -/* #if defined(irix5) */ -/* #define RETURN_NULL {*isNull = true; return(0); }*/ - /* #else *//* irix5 */ #define RETURN_NULL {*isNull = true; return(0); } - /* #endif *//* irix5 */ #define NAME_LEN 30 #define MAX_BUFF_SIZE BLCKSZ diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index d2250dab16..1afc40ace1 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -28,9 +28,7 @@ #include <utils/datetime.h> #include <utils/nabstime.h> #include <utils/int8.h> -#include <utils/cash.h> #include <utils/inet.h> -#include <utils/rel.h> #include <utils/numeric.h> /* diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h index ab50ab2226..e8ae590ae2 100644 --- a/src/include/utils/catcache.h +++ b/src/include/utils/catcache.h @@ -17,9 +17,6 @@ #include <access/htup.h> #include <lib/dllist.h> -#include <nodes/memnodes.h> -#include <utils/rel.h> -#include <utils/mcxt.h> /* * struct catctup: tuples in the cache. diff --git a/src/include/utils/dt.h b/src/include/utils/dt.h index e59e92a94a..78d6f7a6dc 100644 --- a/src/include/utils/dt.h +++ b/src/include/utils/dt.h @@ -17,6 +17,7 @@ #include <time.h> #include <math.h> +#include <limits.h> /* * DateTime represents absolute time. diff --git a/src/include/utils/dynamic_loader.h b/src/include/utils/dynamic_loader.h index 0395e54918..f5cdf67b8f 100644 --- a/src/include/utils/dynamic_loader.h +++ b/src/include/utils/dynamic_loader.h @@ -16,6 +16,7 @@ #include <sys/types.h> #include <sys/param.h> /* For MAXPATHLEN */ +/* we need this include because port files use them */ #include <postgres.h> #ifdef MIN diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h index 79f4f581da..f925a91d30 100644 --- a/src/include/utils/inval.h +++ b/src/include/utils/inval.h @@ -14,7 +14,6 @@ #define INVAL_H #include <access/htup.h> -#include <utils/rel.h> extern void InitLocalInvalidateData(void); diff --git a/src/include/utils/lselect.h b/src/include/utils/lselect.h index 7f5f85c914..db0d2b5e55 100644 --- a/src/include/utils/lselect.h +++ b/src/include/utils/lselect.h @@ -15,9 +15,6 @@ #include <stdio.h> -#include "access/skey.h" -#include "access/tupdesc.h" -#include "access/htup.h" #include "utils/syscache.h" struct leftist diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index dc782bcf8d..423198aa25 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -13,7 +13,6 @@ #ifndef LSYSCACHE_H #define LSYSCACHE_H -#include <access/attnum.h> #include <access/htup.h> extern bool op_class(Oid oprno, int32 opclass, Oid amopid); diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h index fef9e74824..8f07affe34 100644 --- a/src/include/utils/memutils.h +++ b/src/include/utils/memutils.h @@ -30,7 +30,6 @@ * This is not needed by this include file, but by almost every file * that includes this file. */ -#include "utils/mcxt.h" /* ---------------- * Alignment macros: align a length or address appropriately for a given type. diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h index b26ddf525d..66b04ad687 100644 --- a/src/include/utils/portal.h +++ b/src/include/utils/portal.h @@ -26,9 +26,7 @@ #define PORTAL_H #include <executor/execdesc.h> -#include <lib/fstack.h> #include <nodes/memnodes.h> -#include <utils/memutils.h> typedef struct PortalBlockData { diff --git a/src/include/utils/psort.h b/src/include/utils/psort.h index e5bdf489a9..f75f798e86 100644 --- a/src/include/utils/psort.h +++ b/src/include/utils/psort.h @@ -66,7 +66,6 @@ typedef struct Psortstate } Psortstate; #ifdef EBUG -#include "utils/elog.h" #include "storage/buf.h" #include "storage/bufmgr.h" diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h index 2c6226fc56..e7c9bde122 100644 --- a/src/include/utils/syscache.h +++ b/src/include/utils/syscache.h @@ -13,10 +13,7 @@ #ifndef SYSCACHE_H #define SYSCACHE_H -#include <access/attnum.h> #include <access/htup.h> -#include <storage/buf.h> -#include <utils/rel.h> /* #define CACHEDEBUG *//* turns DEBUG elogs on */ diff --git a/src/include/utils/temprel.h b/src/include/utils/temprel.h index 95991972e5..f1a91f1c8d 100644 --- a/src/include/utils/temprel.h +++ b/src/include/utils/temprel.h @@ -14,7 +14,6 @@ #define TEMPREL_H #include "access/htup.h" -#include "access/attnum.h" void create_temp_relation(char *relname, HeapTuple pg_class_tuple); void remove_all_temp_relations(void); diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h index dc306612a9..38cc5bde8b 100644 --- a/src/include/utils/tqual.h +++ b/src/include/utils/tqual.h @@ -15,6 +15,7 @@ #define TQUAL_H #include <access/htup.h> +#include <access/xact.h> typedef struct SnapshotData { diff --git a/src/interfaces/ecpg/preproc/keywords.c b/src/interfaces/ecpg/preproc/keywords.c index db96174cf0..948db6fdc7 100644 --- a/src/interfaces/ecpg/preproc/keywords.c +++ b/src/interfaces/ecpg/preproc/keywords.c @@ -20,7 +20,6 @@ #include "type.h" #include "preproc.h" #include "parser/keywords.h" -#include "utils/elog.h" /* * List of (keyword-name, keyword-token-value) pairs. diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index 7f244c7685..ff1f9907f9 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -8,6 +8,8 @@ #include "access/htup.h" #include "catalog/catname.h" #include "utils/numeric.h" +#include "utils/memutils.h" +#include "storage/bufpage.h" #include "extern.h" diff --git a/src/man/create_language.l b/src/man/create_language.l index b18432d741..62a972b490 100644 --- a/src/man/create_language.l +++ b/src/man/create_language.l @@ -70,7 +70,6 @@ Following is a template for a PL handler written in 'C': #include "executor/spi.h" #include "commands/trigger.h" -#include "utils/elog.h" #include "fmgr.h" /* for FmgrValues struct */ #include "access/heapam.h" #include "utils/syscache.h" diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c index c9634d6e95..1dc20b2a79 100644 --- a/src/pl/plpgsql/src/pl_comp.c +++ b/src/pl/plpgsql/src/pl_comp.c @@ -48,7 +48,6 @@ #include "executor/spi.h" #include "commands/trigger.h" -#include "utils/elog.h" #include "utils/builtins.h" #include "fmgr.h" #include "access/heapam.h" diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index e19fb8d193..3dd237cf07 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -50,7 +50,6 @@ #include "executor/spi.h" #include "executor/spi_priv.h" #include "commands/trigger.h" -#include "utils/elog.h" #include "utils/builtins.h" #include "fmgr.h" #include "access/heapam.h" diff --git a/src/pl/plpgsql/src/pl_handler.c b/src/pl/plpgsql/src/pl_handler.c index 1e5ef1246e..3899a5b8fb 100644 --- a/src/pl/plpgsql/src/pl_handler.c +++ b/src/pl/plpgsql/src/pl_handler.c @@ -47,7 +47,6 @@ #include "executor/spi.h" #include "commands/trigger.h" -#include "utils/elog.h" #include "utils/builtins.h" #include "fmgr.h" #include "access/heapam.h" diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index b9357ab5d0..ab7d768a52 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -47,7 +47,6 @@ #include "executor/spi.h" #include "commands/trigger.h" -#include "utils/elog.h" #include "utils/builtins.h" #include "fmgr.h" #include "access/heapam.h" diff --git a/src/tools/pginclude/pgdefine b/src/tools/pginclude/pgdefine new file mode 100755 index 0000000000..3411c35856 --- /dev/null +++ b/src/tools/pginclude/pgdefine @@ -0,0 +1,13 @@ +: +trap "rm -f /tmp/$$" 0 1 2 3 15 +for FILE +do + cat "$FILE" | grep "^#define" >/tmp/$$ + cat /tmp/$$ | sed -n 's/^#define[ ][ ]*\([a-zA-Z0-9_]*\)[ ][ ]*[^ ].*$/(void)\1;/p' + cat /tmp/$$ | sed -n 's/^#define[ ][ ]*\([a-zA-Z0-9_]*([^)]*)\).*$/(=void)\1;/p' | + sed 's/([a-zA-Z0-9_ ][a-zA-Z0-9_ ]*)/(0)/g' | + sed 's/([a-zA-Z0-9_ ]*,/(0,/g' | + sed 's/,[a-zA-Z0-9_ ]*,/,0,/g' | + sed 's/,[a-zA-Z0-9_ ]*)/,0)/g' | + sed 's/(=void)/(void)/g' +done diff --git a/src/tools/pginclude/pginclude b/src/tools/pginclude/pginclude new file mode 100755 index 0000000000..afaa6add79 --- /dev/null +++ b/src/tools/pginclude/pginclude @@ -0,0 +1,20 @@ +: +trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a" 0 1 2 3 15 +find . \( -name CVS -a -prune \) -o -name '*.[ch]' -type f -print | while read FILE +do + sed 's/->[a-zA-Z0-9_\.]*//g' "$FILE" >/tmp/$$a + echo "#include \"postgres.h\"" >/tmp/$$.c + echo "#include \"/tmp/$$a\"" >>/tmp/$$.c + echo "void main() {" >>/tmp/$$.c + pgdefine "$FILE" >>/tmp/$$.c + echo "}" >>/tmp/$$.c + cc -Werror -Wall -I/pg/include -I/pg/backend -c /tmp/$$.c -o /tmp/$$.o >/tmp/$$ 2>&1 + if [ "$?" -ne 0 ] + then echo "$FILE" + if [ "$1" = "-v" ] + then cat /tmp/$$ + nl /tmp/$$.c + echo + fi + fi +done diff --git a/src/tools/pginclude/pgnoinclude b/src/tools/pginclude/pgnoinclude new file mode 100755 index 0000000000..41c3159165 --- /dev/null +++ b/src/tools/pginclude/pgnoinclude @@ -0,0 +1,28 @@ +: +trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a /tmp/$$b" 0 1 2 3 15 +find . \( -name CVS -a -prune \) -o -type f -print | while read FILE +do + cat "$FILE" | grep -v "^#if" | grep -v "^#else" | + grep -v "^#endif" | sed 's/->[a-zA-Z0-9_\.]*//g' >/tmp/$$a + cat /tmp/$$a | grep "^#include" | + sed 's/#include[ ]*[<"]\([^>"]*\).*$/\1/g' | + while read INCLUDE + do + [ -s /usr/include/$INCLUDE ] && continue + cat /tmp/$$a | + grep -v '^#include[ ]*[<"]'"$INCLUDE"'[>"]' >/tmp/$$b + echo "#include \"postgres.h\"" >/tmp/$$.c + echo "#include \"/tmp/$$b\"" >>/tmp/$$.c + echo "void main() {" >>/tmp/$$.c + pgdefine "$FILE" >>/tmp/$$.c + echo "}" >>/tmp/$$.c + cc -Werror -Wall -I/pg/include -I/pg/backend -c /tmp/$$.c -o /tmp/$$.o >/tmp/$$ 2>&1 + if [ "$?" -eq 0 ] + then echo "$FILE $INCLUDE" + if [ "$1" = "-v" ] + then cat /tmp/$$ + cat /tmp/$$.c + fi + fi + done +done diff --git a/src/tutorial/complex.c b/src/tutorial/complex.c index 4931744821..b44bbc067d 100644 --- a/src/tutorial/complex.c +++ b/src/tutorial/complex.c @@ -8,7 +8,6 @@ /* do not include libpq-fe.h for backend-loaded functions*/ /* #include "libpq-fe.h" */ #include "postgres.h" -#include "utils/mcxt.h" typedef struct Complex { diff --git a/src/tutorial/funcs.c b/src/tutorial/funcs.c index bb0efacb64..8da815c2fe 100644 --- a/src/tutorial/funcs.c +++ b/src/tutorial/funcs.c @@ -9,7 +9,6 @@ #include <string.h> #include <stdio.h> #include "postgres.h" /* for variable length type */ -#include "utils/palloc.h" /* for palloc */ #include "executor/executor.h" /* for GetAttributeByName() */ #include "utils/geo_decls.h" /* for point type */ |