Improve our #include situation by moving pointer types away from the
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 19 Jun 2008 00:46:06 +0000 (00:46 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 19 Jun 2008 00:46:06 +0000 (00:46 +0000)
corresponding struct definitions.  This allows other headers to avoid including
certain highly-loaded headers such as rel.h and relscan.h, instead using just
relcache.h, heapam.h or genam.h, which are more lightweight and thus cause less
unnecessary dependencies.

113 files changed:
contrib/btree_gist/btree_numeric.c
contrib/btree_gist/btree_utils_num.h
contrib/btree_gist/btree_utils_var.c
contrib/pgrowlocks/pgrowlocks.c
contrib/pgstattuple/pgstattuple.c
src/backend/access/gin/ginbtree.c
src/backend/access/gin/gindatapage.c
src/backend/access/gin/ginentrypage.c
src/backend/access/gin/ginget.c
src/backend/access/gin/ginscan.c
src/backend/access/gist/gistget.c
src/backend/access/gist/gistscan.c
src/backend/access/gist/gistsplit.c
src/backend/access/gist/gistutil.c
src/backend/access/gist/gistxlog.c
src/backend/access/hash/hash.c
src/backend/access/hash/hashinsert.c
src/backend/access/hash/hashovfl.c
src/backend/access/hash/hashscan.c
src/backend/access/hash/hashsearch.c
src/backend/access/hash/hashutil.c
src/backend/access/heap/heapam.c
src/backend/access/heap/pruneheap.c
src/backend/access/heap/rewriteheap.c
src/backend/access/heap/tuptoaster.c
src/backend/access/index/genam.c
src/backend/access/index/indexam.c
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtutils.c
src/backend/access/transam/xlogutils.c
src/backend/catalog/aclchk.c
src/backend/catalog/catalog.c
src/backend/catalog/index.c
src/backend/catalog/namespace.c
src/backend/catalog/pg_aggregate.c
src/backend/catalog/pg_constraint.c
src/backend/catalog/pg_conversion.c
src/backend/catalog/pg_depend.c
src/backend/catalog/pg_enum.c
src/backend/catalog/pg_largeobject.c
src/backend/catalog/pg_namespace.c
src/backend/catalog/pg_operator.c
src/backend/catalog/pg_type.c
src/backend/commands/cluster.c
src/backend/commands/comment.c
src/backend/commands/conversioncmds.c
src/backend/commands/functioncmds.c
src/backend/commands/lockcmds.c
src/backend/commands/opclasscmds.c
src/backend/commands/operatorcmds.c
src/backend/commands/proclang.c
src/backend/commands/tablecmds.c
src/backend/commands/tablespace.c
src/backend/commands/tsearchcmds.c
src/backend/commands/view.c
src/backend/executor/nodeBitmapHeapscan.c
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeSeqscan.c
src/backend/nodes/print.c
src/backend/optimizer/plan/planagg.c
src/backend/optimizer/prep/preptlist.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/plancat.c
src/backend/parser/analyze.c
src/backend/parser/parse_clause.c
src/backend/postmaster/pgstat.c
src/backend/rewrite/rewriteDefine.c
src/backend/rewrite/rewriteRemove.c
src/backend/rewrite/rewriteSupport.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/large_object/inv_api.c
src/backend/utils/adt/dbsize.c
src/backend/utils/adt/regproc.c
src/backend/utils/adt/tid.c
src/backend/utils/cache/catcache.c
src/backend/utils/cache/inval.c
src/backend/utils/cache/syscache.c
src/backend/utils/cache/typcache.c
src/backend/utils/resowner/resowner.c
src/backend/utils/sort/tuplesort.c
src/include/access/genam.h
src/include/access/gin.h
src/include/access/gist.h
src/include/access/gist_private.h
src/include/access/hash.h
src/include/access/heapam.h
src/include/access/hio.h
src/include/access/nbtree.h
src/include/access/relscan.h
src/include/access/rewriteheap.h
src/include/access/tuptoaster.h
src/include/access/xlogutils.h
src/include/catalog/catalog.h
src/include/catalog/indexing.h
src/include/commands/cluster.h
src/include/commands/tablecmds.h
src/include/commands/vacuum.h
src/include/nodes/execnodes.h
src/include/nodes/print.h
src/include/optimizer/plancat.h
src/include/parser/parse_node.h
src/include/pgstat.h
src/include/rewrite/rewriteDefine.h
src/include/rewrite/rewriteHandler.h
src/include/storage/buf_internals.h
src/include/storage/bufmgr.h
src/include/utils/catcache.h
src/include/utils/inval.h
src/include/utils/rel.h
src/include/utils/relcache.h
src/include/utils/tuplesort.h

index 9ea096edcb1f2b8bd43468909c76c2620f9f3663..866dd08f6203b4aaa3eeae03fe0e7d58dd84b2e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $PostgreSQL:
+ * $PostgreSQL$ 
  */
 #include "btree_gist.h"
 
@@ -9,6 +9,7 @@
 #include "btree_utils_var.h"
 #include "utils/builtins.h"
 #include "utils/numeric.h"
+#include "utils/rel.h"
 
 /*
 ** Bytea ops
index 372518af6e392162013c606b0e7a9a6f1e0c30d5..9df73cec69a4b82760f58a5d2f8bcf01b8ad9d10 100644 (file)
@@ -1,10 +1,11 @@
 /*
- * $PostgreSQL:
+ * $PostgreSQL$ 
  */
 #ifndef __BTREE_UTILS_NUM_H__
 #define __BTREE_UTILS_NUM_H__
 
 #include "btree_gist.h"
+#include "utils/rel.h"
 
 #include <math.h>
 #include <float.h>
index e4058e8e8d4d7ba68cc28d863b24b3ef00680a61..1bb061c3ffec42a54626d52006f57f66b22c3e04 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $PostgreSQL:
+ * $PostgreSQL$ 
  */
 #include "btree_gist.h"
 
@@ -10,6 +10,7 @@
 #include "btree_utils_var.h"
 #include "utils/pg_locale.h"
 #include "utils/builtins.h"
+#include "utils/rel.h"
 
 PG_FUNCTION_INFO_V1(gbt_var_decompress);
 Datum          gbt_var_decompress(PG_FUNCTION_ARGS);
index 5633c2469315d5b03c287dbf78edfb3f22723739..01c64c408b063882ff06ff58a6d1a00956e88c84 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "access/heapam.h"
 #include "access/multixact.h"
+#include "access/relscan.h"
 #include "access/xact.h"
 #include "catalog/namespace.h"
 #include "funcapi.h"
index 08e1f0c9b7de859eb824ea3928a2548c3f22ee30..cce2676a330ae376035f7dc094694d78c436b6cf 100644 (file)
@@ -26,9 +26,8 @@
 
 #include "access/gist_private.h"
 #include "access/hash.h"
-#include "access/heapam.h"
-#include "access/htup.h"
 #include "access/nbtree.h"
+#include "access/relscan.h"
 #include "catalog/namespace.h"
 #include "funcapi.h"
 #include "miscadmin.h"
index 910f9b6a759776fb29804401ea9cad0518bd4d15..a3ac34b84b6d95da337b7bc629a8b72f40463c33 100644 (file)
@@ -17,6 +17,7 @@
 #include "access/gin.h"
 #include "miscadmin.h"
 #include "storage/bufmgr.h"
+#include "utils/rel.h"
 
 /*
  * Locks buffer by needed method for search.
index 38316331e6b33ee387be39a006477a2ed36e83d3..7b63ecb434633782bb10e286b702fd6c9bc17387 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/gin.h"
 #include "storage/bufmgr.h"
+#include "utils/rel.h"
 
 int
 compareItemPointers(ItemPointer a, ItemPointer b)
index 5ee5024a94082e4ef444a0378224cea6d3a478c2..931041b8882b318b4da968bcb87630d380701f77 100644 (file)
@@ -17,6 +17,7 @@
 #include "access/gin.h"
 #include "access/tuptoaster.h"
 #include "storage/bufmgr.h"
+#include "utils/rel.h"
 
 /*
  * forms tuple for entry tree. On leaf page, Index tuple has
index 37b85bef8deee7c6aa995066e72b4d008e88b91d..2d62a573a72258191bb017fe23e0a4277f121f18 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/gin.h"
+#include "access/relscan.h"
 #include "catalog/index.h"
 #include "miscadmin.h"
 #include "storage/bufmgr.h"
index f4f1c4dad318cdedb1935fc54525f7d90086c332..a82e840a947326660c70e7a92f8835b967485488 100644 (file)
 
 #include "postgres.h"
 
-#include "access/genam.h"
 #include "access/gin.h"
+#include "access/relscan.h"
 #include "pgstat.h"
 #include "storage/bufmgr.h"
 #include "utils/memutils.h"
+#include "utils/rel.h"
 
 
 Datum
index 5ace610311b7ee877d711218545ae847439c0e2c..dbbebd7d63d1cc534c09117d87724b0655024e4b 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/gist_private.h"
+#include "access/relscan.h"
 #include "executor/execdebug.h"
 #include "miscadmin.h"
 #include "pgstat.h"
index dfd7ca6eec982e22877f08ea5393f0c6a6b5e2e5..948f479e153bf84971bd3be4c4cea39c9a04d9ec 100644 (file)
@@ -17,6 +17,7 @@
 #include "access/genam.h"
 #include "access/gist_private.h"
 #include "access/gistscan.h"
+#include "access/relscan.h"
 #include "storage/bufmgr.h"
 #include "utils/memutils.h"
 
index afbc15c13fc5ff39bc535c8ac36c7c2d99d97f5a..56d0f66e0c3f30dd2626866c42e2f6c8f615d4d3 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "access/gist_private.h"
+#include "utils/rel.h"
 
 typedef struct
 {
index 54b5060e3755c421bdb55b2863e02456d644c6c9..f1c5bab3baaf41c57100354f2e5ab2193d9697ca 100644 (file)
@@ -18,6 +18,7 @@
 #include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/bufmgr.h"
+#include "utils/rel.h"
 
 /*
  * static *S used for temrorary storage (saves stack and palloc() call)
index b97ab2fb76310dd21388e6e292bb1a4d095736bf..7d35f2f3c186a178fd89ce2613da1e59c4b2546b 100644 (file)
@@ -18,6 +18,7 @@
 #include "miscadmin.h"
 #include "storage/bufmgr.h"
 #include "utils/memutils.h"
+#include "utils/rel.h"
 
 
 typedef struct
index f794e6d9ac7bd60fd310c4f7130efca1d122182b..6a5c0009dbb63be5740782a2ce3bb95a40859e92 100644 (file)
@@ -18,8 +18,8 @@
 
 #include "postgres.h"
 
-#include "access/genam.h"
 #include "access/hash.h"
+#include "access/relscan.h"
 #include "catalog/index.h"
 #include "commands/vacuum.h"
 #include "miscadmin.h"
index 677998022447b4cc878db214a8740ee40e43d895..3eb226a8a5473cd06cb22c15b0fc4ac5066db50a 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "access/hash.h"
 #include "storage/bufmgr.h"
+#include "utils/rel.h"
 
 
 static OffsetNumber _hash_pgaddtup(Relation rel, Buffer buf,
index c8c6f0c364ce842de355eaf7cbdf46b17be19973..cc10135d80fd160c803932f4f6fa96f75e6f6195 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "access/hash.h"
 #include "storage/bufmgr.h"
+#include "utils/rel.h"
 
 
 static Buffer _hash_getovflpage(Relation rel, Buffer metabuf);
index 2f0a3244a1e544fffec2771dbafad4bdcb34a30d..fe2966f61ff431cdd48e89a9b7805ff7b4e1487c 100644 (file)
@@ -16,7 +16,9 @@
 #include "postgres.h"
 
 #include "access/hash.h"
+#include "access/relscan.h"
 #include "utils/memutils.h"
+#include "utils/rel.h"
 #include "utils/resowner.h"
 
 
index 648408c06e9088e1fc0b41597987caf24bdd6e10..258526be739ebf826477eb681fd96096da424974 100644 (file)
 #include "postgres.h"
 
 #include "access/hash.h"
+#include "access/relscan.h"
 #include "pgstat.h"
 #include "storage/bufmgr.h"
+#include "utils/rel.h"
 
 
 /*
index 637d23fc63a829deca2913610d6eaa1a3eabbbad..41e2eef85caf74ef19f166da349af318e58c04ad 100644 (file)
@@ -14,9 +14,9 @@
  */
 #include "postgres.h"
 
-#include "access/genam.h"
 #include "access/hash.h"
 #include "access/reloptions.h"
+#include "access/relscan.h"
 #include "executor/execdebug.h"
 #include "storage/bufmgr.h"
 #include "utils/lsyscache.h"
index 205771ec69debb4d881b6e29b92f8a40220495a8..733e73c5d0e6490b4fabc44015f24570e9709320 100644 (file)
@@ -42,6 +42,7 @@
 #include "access/heapam.h"
 #include "access/hio.h"
 #include "access/multixact.h"
+#include "access/relscan.h"
 #include "access/sysattr.h"
 #include "access/transam.h"
 #include "access/tuptoaster.h"
index 62a2ba5059133a7f906be67554074ba384552873..840045e02f79f64c1fd5d991f7c50860b37c4a1a 100644 (file)
@@ -22,6 +22,7 @@
 #include "storage/bufmgr.h"
 #include "storage/off.h"
 #include "utils/inval.h"
+#include "utils/rel.h"
 #include "utils/tqual.h"
 
 
index 22cd90d1a683510c6186db3ea28fcf0e6129ae0a..29d6d25b44e2ceb24da2d19b3cdccf3e4565a9f7 100644 (file)
 #include "storage/bufmgr.h"
 #include "storage/smgr.h"
 #include "utils/memutils.h"
+#include "utils/rel.h"
 
 
 /*
index 0c880ad378f01e04b3825b8bd51a77b37e38e79d..19159848a3e1b496a90f55271bc2f0eb4e0959d6 100644 (file)
@@ -37,6 +37,7 @@
 #include "catalog/catalog.h"
 #include "utils/fmgroids.h"
 #include "utils/pg_lzcompress.h"
+#include "utils/rel.h"
 #include "utils/typcache.h"
 #include "utils/tqual.h"
 
index 124d1f16290b7ef63465868a9b7e13f80fbb15dc..9fb6f80742eab613d8deea5b84de9058b8d84257 100644 (file)
 
 #include "postgres.h"
 
-#include "access/genam.h"
-#include "access/heapam.h"
+#include "access/relscan.h"
 #include "access/transam.h"
 #include "miscadmin.h"
 #include "pgstat.h"
 #include "storage/bufmgr.h"
+#include "utils/rel.h"
 #include "utils/tqual.h"
 
 
index 2bf97039e6c747938e78ebca9cff22f295cbaabe..13c4726fc9d290de504b52da8e261012d0609924 100644 (file)
@@ -62,8 +62,7 @@
 
 #include "postgres.h"
 
-#include "access/genam.h"
-#include "access/heapam.h"
+#include "access/relscan.h"
 #include "access/transam.h"
 #include "pgstat.h"
 #include "storage/bufmgr.h"
index 21768f0a2dc3e7e529c12873afdc70f6ab2cc390..f0b1f85f617e1a56e3e81b6d7d519302e728cb18 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "access/genam.h"
 #include "access/nbtree.h"
+#include "access/relscan.h"
 #include "catalog/index.h"
 #include "commands/vacuum.h"
 #include "miscadmin.h"
index 176190847088f10ab4c1b97d20a2aa67bfb540cb..8c4f422c2f1b5854b4e52e21664b801b9bfc6492 100644 (file)
 
 #include "access/genam.h"
 #include "access/nbtree.h"
+#include "access/relscan.h"
 #include "pgstat.h"
 #include "storage/bufmgr.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 
 
 static bool _bt_readpage(IndexScanDesc scan, ScanDirection dir,
index 64c2cff205bc1ae3249807c2f6a16cf722fa6859..3accb0194322ed013e286ba9c54b0de27c95a41a 100644 (file)
@@ -68,6 +68,7 @@
 #include "access/nbtree.h"
 #include "miscadmin.h"
 #include "storage/smgr.h"
+#include "utils/rel.h"
 #include "utils/tuplesort.h"
 
 
index 0419b68c7e783b69fc7b9e693e7638d5443cac68..48260e2327551712f4d1a5dd890598bd7eb0f773 100644 (file)
@@ -20,6 +20,7 @@
 #include "access/genam.h"
 #include "access/nbtree.h"
 #include "access/reloptions.h"
+#include "access/relscan.h"
 #include "executor/execdebug.h"
 #include "miscadmin.h"
 #include "storage/bufmgr.h"
index 27f1501fb1b050ad33b70f993d0091674058a8c3..801323c481e220ab6f6fa422d8dd2b9f67662d4d 100644 (file)
@@ -21,6 +21,7 @@
 #include "storage/bufmgr.h"
 #include "storage/smgr.h"
 #include "utils/hsearch.h"
+#include "utils/rel.h"
 
 
 /*
index dc6ddece7bd86770a772931c24b061a8b56a2340..15f5af0b9671d1348b1e1a1c925931c883aeb7b0 100644 (file)
@@ -43,6 +43,7 @@
 #include "utils/acl.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
 
index cc34dd96d0cdab58cf54ae972a18ce644c84ebe5..927e45077c04ef0d0bb9d7ca99dc2805d9e5c6c7 100644 (file)
@@ -38,7 +38,7 @@
 #include "miscadmin.h"
 #include "storage/fd.h"
 #include "utils/fmgroids.h"
-#include "utils/relcache.h"
+#include "utils/rel.h"
 #include "utils/tqual.h"
 
 
index 629c58d89b8c9620bfcb1566e40d0cf7e6b27f4e..49b371d3ad0255e6c6a74f54cb4dc9bfb0c7bbdb 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/relscan.h"
 #include "access/sysattr.h"
 #include "access/transam.h"
 #include "access/xact.h"
index 2fa63d08bd0331a4dfc411a7cbb348f78f811e8a..08fa2debc6dd59052c7222663780db6f68c01847 100644 (file)
@@ -46,6 +46,7 @@
 #include "utils/inval.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 
 
index 1a6c8502066c9e2a0c47a6433991ea9c88d6320b..c5a6f52f86ce41bcb8fc9a339c373c50d7ffb5a3 100644 (file)
@@ -30,6 +30,7 @@
 #include "utils/acl.h"
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 
 
index 4d631f261a692205f00cea69eb5e0d1328c06d51..7b5be3c62fe708b7b56ff377d736810950a5e802 100644 (file)
@@ -26,6 +26,7 @@
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
 
index 2efc2eee76f7a6d5efd26036042d223280a60f2e..136239842c5c3bc82c1ebc683fa1060e948e2f62 100644 (file)
@@ -27,6 +27,7 @@
 #include "utils/acl.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
 
index 775d6f18bb6e7aefcbc127bbed4541018598f0e8..8262720f806713f5737023aa3ab443f6f8c1d819 100644 (file)
@@ -23,6 +23,7 @@
 #include "miscadmin.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/tqual.h"
 
 
index 24a1e8e65363f033835155becbdfd57186944bd9..ff87b053a749217b741c4f3a466b8f86a695e31e 100644 (file)
@@ -20,6 +20,7 @@
 #include "catalog/pg_enum.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
+#include "utils/rel.h"
 #include "utils/tqual.h"
 
 static int     oid_cmp(const void *p1, const void *p2);
index 90ffc3b34a1f0f7f64557c1c9ecb80309663c377..3bb7acb883749640ec295cb7015f07f9065a15f4 100644 (file)
@@ -20,6 +20,7 @@
 #include "catalog/pg_largeobject.h"
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
+#include "utils/rel.h"
 #include "utils/tqual.h"
 
 
index 1f8033da6f52e556f4a59a26d18b22bf96c0e653..489692a349a8009961260a8c636a4a441124a6d8 100644 (file)
@@ -19,6 +19,7 @@
 #include "catalog/indexing.h"
 #include "catalog/pg_namespace.h"
 #include "utils/builtins.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 
 
index 9218c45e8f836e58ba97ab83215e287ea3f65088..f1bca005a1d502a8236a8ed3cfd91c36b7c4dda8 100644 (file)
@@ -31,6 +31,7 @@
 #include "utils/acl.h"
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 
 
index cde8cc383502367c697fe2e30e9fdf66ca9eab81..7c41aa961edbc251704164779186ec1e2d0a14b2 100644 (file)
@@ -29,6 +29,7 @@
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 
 
index 50bb54228457a1f80e80a40fac5fcefd8558fc2a..df75c48dcea5eb711269632853d4934656fd0d96 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "access/genam.h"
 #include "access/heapam.h"
+#include "access/relscan.h"
 #include "access/rewriteheap.h"
 #include "access/transam.h"
 #include "access/xact.h"
index 6d3efcca2def03ee1670ede796d15f066b0eff57..b1c0f0a8c59fd3ed61d823f423b3bd5eee37294f 100644 (file)
@@ -51,6 +51,7 @@
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
 
index 14f819761a51d6cef73070ab0e525172639b4634..2ab0759b4dcad62dc712517f837ea1b850fc8754 100644 (file)
@@ -27,6 +27,7 @@
 #include "utils/acl.h"
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 
 static void AlterConversionOwner_internal(Relation rel, Oid conversionOid,
index 639c5a6dedf2afdf5b59d880fd5ef2624d3442da..4cb17fc4bfb61b2792af635e5e330c6217b3f4a8 100644 (file)
@@ -55,6 +55,7 @@
 #include "utils/fmgroids.h"
 #include "utils/guc.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
 
index dfabb9fb3201236c564ac6f53c17f1d1cfb56b96..b93bcbeb3cb8e68c737b983d8c1b6660f4bef876 100644 (file)
@@ -20,6 +20,7 @@
 #include "miscadmin.h"
 #include "utils/acl.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 
 
 /*
index dcd40e6f57c269b05b2ad0d6507f6ab7d448381a..733b0269afa418cb2c7fc92bdb4306cbd532e07b 100644 (file)
@@ -39,6 +39,7 @@
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
 
index ff07c9f5c87ca4a29298a3de1c04123dd61d30bc..eda7101b6fbdded88ce2fa9c76e3d886f7a690ff 100644 (file)
@@ -45,6 +45,7 @@
 #include "parser/parse_type.h"
 #include "utils/acl.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 
 
index cb027825b0b6a57591fd387d7ac1b26d99732f48..1dbe8a7a76900c8463aef48f460bc7f7a4de1981 100644 (file)
@@ -34,6 +34,7 @@
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
 
index a9934ea8769b666aa82ccb83efa8030170a3b52d..1257397f356ec074f9b33b43d1a3400f95f95dd7 100644 (file)
@@ -17,6 +17,7 @@
 #include "access/genam.h"
 #include "access/heapam.h"
 #include "access/reloptions.h"
+#include "access/relscan.h"
 #include "access/sysattr.h"
 #include "access/xact.h"
 #include "catalog/catalog.h"
index ffc5883236d4e9643f3df740fb80f3455c9c3c6d..fd459fc0c1ad307492dde8e07a2df8773f1c922c 100644 (file)
@@ -66,6 +66,7 @@
 #include "utils/guc.h"
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
+#include "utils/rel.h"
 #include "utils/tqual.h"
 
 
index 407a7334c27cef9ee20ccc4d806e5a3a4cc1dedb..47e113a74f071776bd68bff03fa4eaece28992c5 100644 (file)
@@ -43,6 +43,7 @@
 #include "utils/catcache.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
 
index e09ea26c9e98123468df252e9ae6779cf8411d82..d08dcbb64365fc11cdfcaaf2a0a93143503ed553 100644 (file)
@@ -31,6 +31,7 @@
 #include "rewrite/rewriteSupport.h"
 #include "utils/acl.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 
 
 static void checkViewTupleDesc(TupleDesc newdesc, TupleDesc olddesc);
index 2c107141cd6d3c2a76c08a433474c56cf921c6ab..daa12dd3827eebe4fa9b26e4104605457ee4883a 100644 (file)
@@ -36,6 +36,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/relscan.h"
 #include "executor/execdebug.h"
 #include "executor/nodeBitmapHeapscan.h"
 #include "pgstat.h"
index 48464bc827d3de65467a325e86185e9014977c0a..c6fcc015b2165aa6e1e019ce7d4a30102938932c 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "access/genam.h"
 #include "access/nbtree.h"
+#include "access/relscan.h"
 #include "executor/execdebug.h"
 #include "executor/nodeIndexscan.h"
 #include "nodes/nodeFuncs.h"
index 605c38326fae6b7517159d99aef78214942a7c27..bcbcbdc4578f832fbca93864d123c483eb41ef6c 100644 (file)
@@ -25,6 +25,7 @@
 #include "postgres.h"
 
 #include "access/heapam.h"
+#include "access/relscan.h"
 #include "executor/execdebug.h"
 #include "executor/nodeSeqscan.h"
 
index 79c84b201b699802030d61bc928d972cba2af316..5c35a5b68756c6a2433e261628bc26d34ef6325f 100644 (file)
@@ -25,6 +25,7 @@
 #include "optimizer/clauses.h"
 #include "parser/parsetree.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 
 
 /*
index fc62b99a2e1b8ed1ca26cc27293304596aeacf2e..56a5a58791acec1112256f7dfa177e64d7a8774b 100644 (file)
@@ -15,6 +15,7 @@
 #include "postgres.h"
 
 #include "catalog/pg_aggregate.h"
+#include "catalog/pg_am.h"
 #include "catalog/pg_type.h"
 #include "nodes/makefuncs.h"
 #include "optimizer/clauses.h"
index 42549b294833ec9c80cc3341337d7460d73525ea..f402f92255b610e5cb91e4534ae6c166c57fa3b8 100644 (file)
@@ -34,6 +34,7 @@
 #include "parser/analyze.h"
 #include "parser/parsetree.h"
 #include "parser/parse_coerce.h"
+#include "utils/rel.h"
 
 
 static List *expand_targetlist(List *tlist, int command_type,
index aa8815fe34a401f6af4caa3453d574aad6280e56..3521653325ecdc3a9e15d286341dd890621136bb 100644 (file)
@@ -44,6 +44,7 @@
 #include "parser/parse_expr.h"
 #include "parser/parsetree.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 
 
 static Plan *recurse_set_operations(Node *setOp, PlannerInfo *root,
index 475c313775d0aab956d39f0b1af2f171d81beb6e..1a4f09e372dd27b78f8e32779042f291d35adf03 100644 (file)
@@ -36,7 +36,7 @@
 #include "storage/bufmgr.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
-#include "utils/relcache.h"
+#include "utils/rel.h"
 #include "utils/snapmgr.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
index 4d5bd304b76e600671d16b2c83451176d1ad765f..340fc860433ebe277d304db111b142c3ba094b40 100644 (file)
@@ -36,6 +36,7 @@
 #include "parser/parse_relation.h"
 #include "parser/parse_target.h"
 #include "parser/parsetree.h"
+#include "utils/rel.h"
 
 
 typedef struct
index e293d687716493e42df7fb9f34087ef2ccfab43c..31f3ac43458063ccc01512de4962139656fe85b4 100644 (file)
@@ -34,6 +34,7 @@
 #include "rewrite/rewriteManip.h"
 #include "utils/guc.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 
 
 #define ORDER_CLAUSE 0
index 11cbf31da63f3e4f7304dca9c7b417c81e81ab0e..f178fe31d3c0102fa9aa7d6782bc21cc45fa76f6 100644 (file)
@@ -59,6 +59,7 @@
 #include "utils/guc.h"
 #include "utils/memutils.h"
 #include "utils/ps_status.h"
+#include "utils/rel.h"
 #include "utils/tqual.h"
 
 
index 7468df7c203fad1376489c9d9a220639d4f16002..c93d70c250ce3978692d8a702164235bf3b9f633 100644 (file)
@@ -31,6 +31,7 @@
 #include "utils/builtins.h"
 #include "utils/inval.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
 
index 3b256717c0be234a5ff1ddf135af52a9eb21d6df..a83a0603259bcf77655509c3c95e7f082527ace5 100644 (file)
@@ -26,6 +26,7 @@
 #include "utils/acl.h"
 #include "utils/fmgroids.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
 
index 1c5986bb4cc2f64cbeb0e95e119593539ba3bb72..4d4825d4a51bfa5cb7dae86de14ea39bdf847768 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/heapam.h"
 #include "catalog/indexing.h"
+#include "catalog/pg_class.h"
 #include "rewrite/rewriteSupport.h"
 #include "utils/inval.h"
 #include "utils/syscache.h"
index 406de7206594ce0eed9d928b00bbef144bd8ae9c..9666fc49a1d830d1046346500f6c3a6cf1086d18 100644 (file)
@@ -40,6 +40,7 @@
 #include "storage/ipc.h"
 #include "storage/proc.h"
 #include "storage/smgr.h"
+#include "utils/rel.h"
 #include "utils/resowner.h"
 #include "pgstat.h"
 
index 2a4b0547760ed2a178235f007be71ad2fa89043b..867dd65a4e5e156723349307d3a294792d9cca56 100644 (file)
@@ -41,6 +41,7 @@
 #include "libpq/libpq-fs.h"
 #include "storage/large_object.h"
 #include "utils/fmgroids.h"
+#include "utils/rel.h"
 #include "utils/resowner.h"
 #include "utils/snapmgr.h"
 #include "utils/tqual.h"
index a7ba4117601660acb5cc47323f3453b684c42e3e..e9330cdf24dbfc74e2664bec08b64293433d88de 100644 (file)
@@ -24,8 +24,8 @@
 #include "storage/fd.h"
 #include "utils/acl.h"
 #include "utils/builtins.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
-#include "utils/relcache.h"
 
 
 /* Return physical size of directory contents, or 0 if dir doesn't exist */
index 7e52e79dde631862194c8ee334a5845e5ab370a6..37905882a594d679293deadf9b490d5e7c23d423 100644 (file)
@@ -25,6 +25,7 @@
 #include "access/heapam.h"
 #include "catalog/indexing.h"
 #include "catalog/namespace.h"
+#include "catalog/pg_class.h"
 #include "catalog/pg_operator.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_ts_config.h"
index 1ab73a66fc47fa5ccf81c7f0cb4c9d66c7f40367..40dcbd7e4295a373447ee781ad43d787cec18d2f 100644 (file)
@@ -29,6 +29,7 @@
 #include "parser/parsetree.h"
 #include "utils/acl.h"
 #include "utils/builtins.h"
+#include "utils/rel.h"
 #include "utils/tqual.h"
 
 
index 7affec2d099169ecf90e4e456ff936c605d078e0..ded8020196a950055cd7d7424274825e39649abb 100644 (file)
@@ -17,6 +17,7 @@
 #include "access/genam.h"
 #include "access/hash.h"
 #include "access/heapam.h"
+#include "access/relscan.h"
 #include "access/sysattr.h"
 #include "access/valid.h"
 #include "catalog/pg_operator.h"
@@ -28,7 +29,7 @@
 #include "utils/builtins.h"
 #include "utils/fmgroids.h"
 #include "utils/memutils.h"
-#include "utils/relcache.h"
+#include "utils/rel.h"
 #include "utils/resowner.h"
 #include "utils/syscache.h"
 #include "utils/tqual.h"
index 78f3268e21a1e6839c2fec32e9ad38f0a136a089..4c9ca1bce633f2f0e9a2695ede9a197ce7c117c1 100644 (file)
@@ -94,7 +94,7 @@
 #include "storage/smgr.h"
 #include "utils/inval.h"
 #include "utils/memutils.h"
-#include "utils/relcache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 
 
index adb4d6b80a5c6f630d56a0526462e000a83433cd..019a010453ab0c59d27e51fded01c42f794f29bb 100644 (file)
@@ -46,6 +46,7 @@
 #include "catalog/pg_ts_parser.h"
 #include "catalog/pg_ts_template.h"
 #include "catalog/pg_type.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 
 
index c8fa4dc8de4c85c277d49676d7bf01068cffb9ea..d8f991e64145afbb7a5b4bf21050e3c93bc77794 100644 (file)
@@ -49,6 +49,7 @@
 #include "commands/defrem.h"
 #include "utils/builtins.h"
 #include "utils/lsyscache.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 #include "utils/typcache.h"
 
index b68014d76c2584d2c58db2d4a118b4ba42ce548c..7ea4f160bd2696bf7258ab8401ec582a45fd11f2 100644 (file)
@@ -24,8 +24,8 @@
 #include "storage/bufmgr.h"
 #include "storage/proc.h"
 #include "utils/memutils.h"
+#include "utils/rel.h"
 #include "utils/resowner.h"
-#include "utils/relcache.h"
 
 
 /*
index a0a6bd7a5066f3e45c3cc6b16ce1b117a2e6c661..3dda4bac3aed6f4a7b08d17bb10558feb2695d6f 100644 (file)
 #include "utils/lsyscache.h"
 #include "utils/memutils.h"
 #include "utils/pg_rusage.h"
+#include "utils/rel.h"
 #include "utils/syscache.h"
 #include "utils/tuplesort.h"
 
index 39a5d3719e89f0d93688ea655afbc11f9d35f987..a2219d6fda11ba7fd6214fa337b94666b05a18c4 100644 (file)
 #ifndef GENAM_H
 #define GENAM_H
 
-#include "access/relscan.h"
 #include "access/sdir.h"
+#include "access/skey.h"
 #include "nodes/tidbitmap.h"
 #include "storage/buf.h"
 #include "storage/lock.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
+#include "utils/snapshot.h"
 
 /*
  * Struct for statistics returned by ambuild
@@ -73,21 +74,21 @@ typedef struct IndexBulkDeleteResult
 /* Typedef for callback function to determine if a tuple is bulk-deletable */
 typedef bool (*IndexBulkDeleteCallback) (ItemPointer itemptr, void *state);
 
-/* Struct for heap-or-index scans of system tables */
-typedef struct SysScanDescData
-{
-       Relation        heap_rel;               /* catalog being scanned */
-       Relation        irel;                   /* NULL if doing heap scan */
-       HeapScanDesc scan;                      /* only valid in heap-scan case */
-       IndexScanDesc iscan;            /* only valid in index-scan case */
-} SysScanDescData;
-
-typedef SysScanDescData *SysScanDesc;
+/* struct definitions appear in relscan.h */
+typedef struct IndexScanDescData *IndexScanDesc;
+typedef struct SysScanDescData *SysScanDesc;
 
 
 /*
  * generalized index_ interface routines (in indexam.c)
  */
+
+/*
+ * IndexScanIsValid
+ *             True iff the index scan is valid.
+ */
+#define IndexScanIsValid(scan) PointerIsValid(scan)
+
 extern Relation index_open(Oid relationId, LOCKMODE lockmode);
 extern void index_close(Relation relation, LOCKMODE lockmode);
 
index f40f48e6d9fba5925a695d61dfa991d3cf4f4b79..1de07d1a60c9d9a9846ce781887743af0f4c8a54 100644 (file)
@@ -12,8 +12,8 @@
 #ifndef GIN_H
 #define GIN_H
 
+#include "access/genam.h"
 #include "access/itup.h"
-#include "access/relscan.h"
 #include "access/xlog.h"
 #include "fmgr.h"
 #include "nodes/tidbitmap.h"
index 106de89a061c9eb670c50557c3ca13d4da476ee9..fb6f764a93bb7e841abe48ca1de91d74ef6572cd 100644 (file)
@@ -18,8 +18,9 @@
 
 #include "access/xlog.h"
 #include "access/xlogdefs.h"
+#include "storage/block.h"
 #include "storage/bufpage.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 /*
  * amproc indexes for GiST indexes.
index d220751a5136571de6c97465ac1f1d0e4924ace8..463a190aee109817dd8435862e3f84d7c19f5f4c 100644 (file)
@@ -16,9 +16,7 @@
 
 #include "access/gist.h"
 #include "access/itup.h"
-#include "access/xlog.h"
-#include "access/xlogdefs.h"
-#include "fmgr.h"
+#include "storage/bufmgr.h"
 
 #define GIST_UNLOCK BUFFER_LOCK_UNLOCK
 #define GIST_SHARE     BUFFER_LOCK_SHARE
index c1169cba30ad314695854ba30d6711170abab010..ab0824d9095eb8683409bc63f029fa4b92aca395 100644 (file)
 #ifndef HASH_H
 #define HASH_H
 
+#include "access/genam.h"
 #include "access/itup.h"
-#include "access/relscan.h"
 #include "access/sdir.h"
 #include "access/xlog.h"
 #include "fmgr.h"
 #include "storage/lock.h"
+#include "utils/relcache.h"
 
 /*
  * Mapping from hash bucket number to physical block number of bucket's
index 0acb633439b7b2ac40242446438f2ff3416d10d0..832167d46aaae5806fe27f5222f9252bbfc36816 100644 (file)
 #define HEAPAM_H
 
 #include "access/htup.h"
-#include "access/relscan.h"
 #include "access/sdir.h"
+#include "access/skey.h"
 #include "access/xlog.h"
 #include "nodes/primnodes.h"
+#include "storage/bufpage.h"
 #include "storage/lock.h"
+#include "utils/relcache.h"
 #include "utils/snapshot.h"
 
 
@@ -50,6 +52,15 @@ extern Relation heap_openrv(const RangeVar *relation, LOCKMODE lockmode);
 
 #define heap_close(r,l)  relation_close(r,l)
 
+/* struct definition appears in relscan.h */
+typedef struct HeapScanDescData *HeapScanDesc;
+
+/*
+ * HeapScanIsValid
+ *             True iff the heap scan is valid.
+ */
+#define HeapScanIsValid(scan) PointerIsValid(scan)
+
 extern HeapScanDesc heap_beginscan(Relation relation, Snapshot snapshot,
                           int nkeys, ScanKey key);
 extern HeapScanDesc heap_beginscan_strat(Relation relation, Snapshot snapshot,
index 9e09a6ca188cf25264f5c5eb48a7fb06d783a6e8..7205fcbc502c88da6321fa5a70368cb45705d528 100644 (file)
@@ -15,7 +15,7 @@
 #define HIO_H
 
 #include "access/htup.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 #include "storage/buf.h"
 
 extern void RelationPutHeapTuple(Relation relation, Buffer buffer,
index 13399119db4df6be373bd91656727adda2b4e5ee..3eafe6285d41a8615726349af8fbb31a2a16a405 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef NBTREE_H
 #define NBTREE_H
 
+#include "access/genam.h"
 #include "access/itup.h"
-#include "access/relscan.h"
 #include "access/sdir.h"
 #include "access/xlog.h"
 #include "access/xlogutils.h"
index d13af937399cba29d7da7ab2004cbc5d32a50169..ac628911b7b9c82b192b70089494b17c813f5902 100644 (file)
 #ifndef RELSCAN_H
 #define RELSCAN_H
 
-#include "access/htup.h"
-#include "access/skey.h"
-#include "storage/bufpage.h"
-#include "utils/rel.h"
-#include "utils/snapshot.h"
+#include "access/genam.h"
+#include "access/heapam.h"
 
 
 typedef struct HeapScanDescData
@@ -54,8 +51,6 @@ typedef struct HeapScanDescData
        OffsetNumber rs_vistuples[MaxHeapTuplesPerPage];        /* their offsets */
 } HeapScanDescData;
 
-typedef HeapScanDescData *HeapScanDesc;
-
 /*
  * We use the same IndexScanDescData structure for both amgettuple-based
  * and amgetbitmap-based index scans.  Some fields are only relevant in
@@ -89,19 +84,13 @@ typedef struct IndexScanDescData
        TransactionId xs_prev_xmax; /* previous HOT chain member's XMAX, if any */
 } IndexScanDescData;
 
-typedef IndexScanDescData *IndexScanDesc;
-
-
-/*
- * HeapScanIsValid
- *             True iff the heap scan is valid.
- */
-#define HeapScanIsValid(scan) PointerIsValid(scan)
-
-/*
- * IndexScanIsValid
- *             True iff the index scan is valid.
- */
-#define IndexScanIsValid(scan) PointerIsValid(scan)
+/* Struct for heap-or-index scans of system tables */
+typedef struct SysScanDescData
+{
+       Relation        heap_rel;               /* catalog being scanned */
+       Relation        irel;                   /* NULL if doing heap scan */
+       HeapScanDesc scan;                      /* only valid in heap-scan case */
+       IndexScanDesc iscan;            /* only valid in index-scan case */
+} SysScanDescData;
 
 #endif   /* RELSCAN_H */
index 2d923ab1278dd20362119d7ffab24f36b3df94c4..14f6c18278df5757edff9be548e2aaf56846aa84 100644 (file)
@@ -14,7 +14,7 @@
 #define REWRITE_HEAP_H
 
 #include "access/htup.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 /* struct definition is private to rewriteheap.c */
 typedef struct RewriteStateData *RewriteState;
index 47b015fb4427a01334eb76e5397f67c076319da3..57e5c3c64dc977b56e0fb096acd20fbce2cb0e32 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "access/htup.h"
 #include "storage/bufpage.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 /*
  * This enables de-toasting of index entries.  Needed until VACUUM is
index 88e2b127cf3a81126255f68751dde949042922e2..dbcdb1b0345a679af1d9b3fe0dd6e013a6aafd34 100644 (file)
@@ -12,7 +12,9 @@
 #define XLOG_UTILS_H
 
 #include "storage/buf.h"
-#include "utils/rel.h"
+#include "storage/relfilenode.h"
+#include "storage/block.h"
+#include "utils/relcache.h"
 
 
 extern void XLogCheckInvalidPages(void);
index 1510ccc00f6731906b3952590f809dae26c6fe08..c493ca0ef113e3978235197d86a16983f5fa098c 100644 (file)
@@ -14,7 +14,9 @@
 #ifndef CATALOG_H
 #define CATALOG_H
 
-#include "utils/rel.h"
+#include "catalog/pg_class.h"
+#include "storage/relfilenode.h"
+#include "utils/relcache.h"
 
 
 extern char *relpath(RelFileNode rnode);
index 7dc52158852c249ca2d4ad21e7b2d1848a2607f2..881d4929d3ec1cd408a5902a9d4bbfb8b37132d2 100644 (file)
@@ -16,7 +16,7 @@
 #define INDEXING_H
 
 #include "access/htup.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 /*
  * The state object used by CatalogOpenIndexes and friends is actually the
index 94d9600b423b31137c25433b2e6b9e06276b7ca0..f6e8763643ec1a0e8bd5a6eb5f4cca01eaed431b 100644 (file)
@@ -14,7 +14,7 @@
 #define CLUSTER_H
 
 #include "nodes/parsenodes.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 
 extern void cluster(ClusterStmt *stmt, bool isTopLevel);
index 622e53183fbdd43b3767cf0108b367adcc4da7e8..5a43d27962a093c308e4070d4c09e3b8ccc72865 100644 (file)
@@ -15,7 +15,7 @@
 #define TABLECMDS_H
 
 #include "nodes/parsenodes.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 
 extern Oid     DefineRelation(CreateStmt *stmt, char relkind);
index d40ecacb00cab1e5e7876be2b1346ae9f3d162bc..05ba32cb830fa7e014ab69fb70e30bb4f74b6740 100644 (file)
@@ -20,7 +20,7 @@
 #include "nodes/parsenodes.h"
 #include "storage/buf.h"
 #include "storage/lock.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 
 /*----------
index df3f3b609d06cf65608a6f2cb4cd86b00e25ffa6..0f4e86bc37cb1999e29828143e0a5da898a3fe18 100644 (file)
 #ifndef EXECNODES_H
 #define EXECNODES_H
 
-#include "access/relscan.h"
+#include "access/genam.h"
+#include "access/heapam.h"
+#include "access/skey.h"
 #include "nodes/params.h"
-#include "nodes/plannodes.h"
-#include "nodes/tidbitmap.h"
+#include "nodes/plannodes.h"    
+#include "nodes/tidbitmap.h"    
 #include "utils/hsearch.h"
+#include "utils/rel.h"
+#include "utils/snapshot.h"
 #include "utils/tuplestore.h"
 
 
index 5db8cc00fdec2561481095cde26867270ed198fb..717ad3b8b59c5c295c0d6b1aec1b66d2d08abf9d 100644 (file)
@@ -15,7 +15,7 @@
 #define PRINT_H
 
 #include "nodes/parsenodes.h"
-#include "nodes/execnodes.h"
+#include "executor/tuptable.h"
 
 
 #define nodeDisplay(x)         pprint(x)
index bd23b2f1c25b3c297777a66c318ed4baf44ec92a..e006e99d2cdba087b75a3585f186663b19f65d30 100644 (file)
@@ -15,7 +15,7 @@
 #define PLANCAT_H
 
 #include "nodes/relation.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 /* Hook for plugins to get control in get_relation_info() */
 typedef void (*get_relation_info_hook_type) (PlannerInfo *root,
index 1b49005a8e3145b79b37dd8ce3a17c65742e777b..9aab580bd710c16e86ec7295c0349e98bd553dc9 100644 (file)
@@ -15,7 +15,7 @@
 #define PARSE_NODE_H
 
 #include "nodes/parsenodes.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 /*
  * State information used during parse analysis
index c82b62a1ccb63078baec2b74ec5cdcc8e0079f3c..a9f5501143a1108403bc54caec91787e3c1c522e 100644 (file)
@@ -14,7 +14,7 @@
 #include "libpq/pqcomm.h"
 #include "portability/instr_time.h"
 #include "utils/hsearch.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 #include "utils/timestamp.h"
 
 
index 93fe22a0892891c37b6d591459e46ca2bd9bbdee..26ad1694a3dd57d470e05f2b5c7e69570e851d21 100644 (file)
@@ -15,7 +15,7 @@
 #define REWRITEDEFINE_H
 
 #include "nodes/parsenodes.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 #define RULE_FIRES_ON_ORIGIN   'O'
 #define RULE_FIRES_ALWAYS              'A'
index 499115c8d2c207d32ade2a3dddf7e8e031a62327..2ebbeb93742b636b4a9b84448730aaddd0ee00d6 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef REWRITEHANDLER_H
 #define REWRITEHANDLER_H
 
-#include "utils/rel.h"
+#include "utils/relcache.h"
 #include "nodes/parsenodes.h"
 
 extern List *QueryRewrite(Query *parsetree);
index 356dbe695fde1ea9df804abb16c2a8a9045d98c7..37b8b28f4efa368ce374197f5510eb0a36fc4f0f 100644 (file)
@@ -20,7 +20,7 @@
 #include "storage/shmem.h"
 #include "storage/smgr.h"
 #include "storage/spin.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 
 /*
index c860f30b953cfd8055d05f1b31ef48b4f75d61aa..9d2dd83c6ff537dcae0ae4a5c9671a256f467cde 100644 (file)
 #ifndef BUFMGR_H
 #define BUFMGR_H
 
+#include "storage/block.h"
 #include "storage/buf.h"
 #include "storage/bufpage.h"
-#include "utils/rel.h"
+#include "storage/relfilenode.h"
+#include "utils/relcache.h"
 
 typedef void *Block;
 
index 1a1136b3cb1f464cba9ff3701f4b1977832be234..22865d940e3fd13c8ce1a3a6b98bcfb329c551fc 100644 (file)
@@ -23,7 +23,7 @@
 #include "access/htup.h"
 #include "access/skey.h"
 #include "lib/dllist.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 /*
  *             struct catctup:                 individual tuple in the cache.
index ce2d100bcf9435704cb13d89173ab4d4289950f0..86ea2442b1f7b9e379bbbd881cf608dc73707fc2 100644 (file)
@@ -15,7 +15,7 @@
 #define INVAL_H
 
 #include "access/htup.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
 
 
 typedef void (*CacheCallbackFunction) (Datum arg, Oid relid);
index 607ac654d2725667034916174572970b0fb2b8b5..f5fb98e30e57409627178643da7ea408b27da73c 100644 (file)
@@ -23,6 +23,7 @@
 #include "rewrite/prs2lock.h"
 #include "storage/block.h"
 #include "storage/relfilenode.h"
+#include "utils/relcache.h"
 
 
 /*
@@ -198,18 +199,6 @@ typedef struct RelationData
        struct PgStat_TableStatus *pgstat_info;         /* statistics collection area */
 } RelationData;
 
-typedef RelationData *Relation;
-
-
-/* ----------------
- *             RelationPtr is used in the executor to support index scans
- *             where we have to keep track of several index relations in an
- *             array.  -cim 9/10/89
- * ----------------
- */
-typedef Relation *RelationPtr;
-
-
 /*
  * StdRdOptions
  *             Standard contents of rd_options for heaps and generic indexes.
index 96c089d231e3657eb82c930adbf6eec4da2dd7af..2aedabacd5fafa5dcb76981906c2f086dab94c6c 100644 (file)
 #ifndef RELCACHE_H
 #define RELCACHE_H
 
-#include "utils/rel.h"
+#include "access/tupdesc.h"
+#include "nodes/bitmapset.h"
+#include "nodes/pg_list.h"
+
+
+typedef struct RelationData *Relation;
+
+/* ----------------
+ *             RelationPtr is used in the executor to support index scans
+ *             where we have to keep track of several index relations in an
+ *             array.  -cim 9/10/89
+ * ----------------
+ */
+typedef Relation *RelationPtr;
 
 /*
  * Routines to open (lookup) and close a relcache entry
index ce3261dc3550538bc0f6ed7c71223ac0c985facf..068618ababb4001d959540e72cae363005824567 100644 (file)
@@ -22,7 +22,8 @@
 
 #include "access/itup.h"
 #include "executor/tuptable.h"
-#include "utils/rel.h"
+#include "fmgr.h"
+#include "utils/relcache.h"
 
 
 /* Tuplesortstate is an opaque type whose details are not known outside