summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/genam.h27
-rw-r--r--src/include/access/gin.h4
-rw-r--r--src/include/access/gist.h5
-rw-r--r--src/include/access/gist_private.h6
-rw-r--r--src/include/access/hash.h5
-rw-r--r--src/include/access/heapam.h15
-rw-r--r--src/include/access/hio.h4
-rw-r--r--src/include/access/nbtree.h4
-rw-r--r--src/include/access/relscan.h33
-rw-r--r--src/include/access/rewriteheap.h4
-rw-r--r--src/include/access/tuptoaster.h4
-rw-r--r--src/include/access/xlogutils.h6
-rw-r--r--src/include/catalog/catalog.h6
-rw-r--r--src/include/catalog/indexing.h4
-rw-r--r--src/include/commands/cluster.h4
-rw-r--r--src/include/commands/tablecmds.h4
-rw-r--r--src/include/commands/vacuum.h4
-rw-r--r--src/include/nodes/execnodes.h12
-rw-r--r--src/include/nodes/print.h4
-rw-r--r--src/include/optimizer/plancat.h4
-rw-r--r--src/include/parser/parse_node.h4
-rw-r--r--src/include/pgstat.h4
-rw-r--r--src/include/rewrite/rewriteDefine.h4
-rw-r--r--src/include/rewrite/rewriteHandler.h4
-rw-r--r--src/include/storage/buf_internals.h4
-rw-r--r--src/include/storage/bufmgr.h6
-rw-r--r--src/include/utils/catcache.h4
-rw-r--r--src/include/utils/inval.h4
-rw-r--r--src/include/utils/rel.h15
-rw-r--r--src/include/utils/relcache.h17
-rw-r--r--src/include/utils/tuplesort.h5
31 files changed, 122 insertions, 108 deletions
diff --git a/src/include/access/genam.h b/src/include/access/genam.h
index c59c3b9d52..3667c7c843 100644
--- a/src/include/access/genam.h
+++ b/src/include/access/genam.h
@@ -7,19 +7,20 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/genam.h,v 1.73 2008/06/08 22:41:04 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/access/genam.h,v 1.74 2008/06/19 00:46:05 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
#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);
diff --git a/src/include/access/gin.h b/src/include/access/gin.h
index 99d3727896..d47d7ac2d6 100644
--- a/src/include/access/gin.h
+++ b/src/include/access/gin.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2006-2008, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/access/gin.h,v 1.21 2008/06/06 22:35:22 alvherre Exp $
+ * $PostgreSQL: pgsql/src/include/access/gin.h,v 1.22 2008/06/19 00:46:05 alvherre Exp $
*--------------------------------------------------------------------------
*/
@@ -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"
diff --git a/src/include/access/gist.h b/src/include/access/gist.h
index 807d5c95bd..acab76e9b3 100644
--- a/src/include/access/gist.h
+++ b/src/include/access/gist.h
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/gist.h,v 1.60 2008/05/12 00:00:53 alvherre Exp $
+ * $PostgreSQL: pgsql/src/include/access/gist.h,v 1.61 2008/06/19 00:46:05 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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.
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h
index 03d201779a..497ceb318e 100644
--- a/src/include/access/gist_private.h
+++ b/src/include/access/gist_private.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/gist_private.h,v 1.30 2008/06/12 09:12:31 heikki Exp $
+ * $PostgreSQL: pgsql/src/include/access/gist_private.h,v 1.31 2008/06/19 00:46:05 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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
diff --git a/src/include/access/hash.h b/src/include/access/hash.h
index a786117ee5..4d8cd79e9a 100644
--- a/src/include/access/hash.h
+++ b/src/include/access/hash.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/hash.h,v 1.87 2008/04/10 22:25:25 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/access/hash.h,v 1.88 2008/06/19 00:46:05 alvherre Exp $
*
* NOTES
* modeled after Margo Seltzer's hash implementation for unix.
@@ -17,12 +17,13 @@
#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
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index 17e4a735e9..c6b7d5dc11 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.136 2008/06/12 09:12:31 heikki Exp $
+ * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.137 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,11 +15,13 @@
#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,
diff --git a/src/include/access/hio.h b/src/include/access/hio.h
index 63d1f8e4a8..a089bddbf3 100644
--- a/src/include/access/hio.h
+++ b/src/include/access/hio.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/hio.h,v 1.35 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/hio.h,v 1.36 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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,
diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index 20c33b3774..9b0e8d0cf7 100644
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -7,15 +7,15 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.119 2008/06/06 22:35:22 alvherre Exp $
+ * $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.120 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
#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"
diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h
index b5ab8cff65..fe5cc31788 100644
--- a/src/include/access/relscan.h
+++ b/src/include/access/relscan.h
@@ -7,18 +7,15 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/relscan.h,v 1.65 2008/05/12 00:00:53 alvherre Exp $
+ * $PostgreSQL: pgsql/src/include/access/relscan.h,v 1.66 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
#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 */
diff --git a/src/include/access/rewriteheap.h b/src/include/access/rewriteheap.h
index 77441bfbb7..c34aab421f 100644
--- a/src/include/access/rewriteheap.h
+++ b/src/include/access/rewriteheap.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994-5, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/rewriteheap.h,v 1.4 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/rewriteheap.h,v 1.5 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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;
diff --git a/src/include/access/tuptoaster.h b/src/include/access/tuptoaster.h
index 4ecfe2742d..7d1ba7d2f8 100644
--- a/src/include/access/tuptoaster.h
+++ b/src/include/access/tuptoaster.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/access/tuptoaster.h,v 1.39 2008/05/12 00:00:53 alvherre Exp $
+ * $PostgreSQL: pgsql/src/include/access/tuptoaster.h,v 1.40 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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
diff --git a/src/include/access/xlogutils.h b/src/include/access/xlogutils.h
index b2d5c3be0f..f1585c032a 100644
--- a/src/include/access/xlogutils.h
+++ b/src/include/access/xlogutils.h
@@ -6,13 +6,15 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/xlogutils.h,v 1.24 2008/06/12 09:12:31 heikki Exp $
+ * $PostgreSQL: pgsql/src/include/access/xlogutils.h,v 1.25 2008/06/19 00:46:06 alvherre Exp $
*/
#ifndef XLOG_UTILS_H
#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);
diff --git a/src/include/catalog/catalog.h b/src/include/catalog/catalog.h
index 753926f14e..845ef035bd 100644
--- a/src/include/catalog/catalog.h
+++ b/src/include/catalog/catalog.h
@@ -7,14 +7,16 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/catalog.h,v 1.39 2008/04/12 23:14:21 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/catalog.h,v 1.40 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
#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);
diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h
index 19eb8371eb..18defe8ee7 100644
--- a/src/include/catalog/indexing.h
+++ b/src/include/catalog/indexing.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/indexing.h,v 1.102 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/indexing.h,v 1.103 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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
diff --git a/src/include/commands/cluster.h b/src/include/commands/cluster.h
index 4cdcd7f402..c620773523 100644
--- a/src/include/commands/cluster.h
+++ b/src/include/commands/cluster.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994-5, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/commands/cluster.h,v 1.34 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/commands/cluster.h,v 1.35 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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);
diff --git a/src/include/commands/tablecmds.h b/src/include/commands/tablecmds.h
index d9e1a56372..9e138ada8d 100644
--- a/src/include/commands/tablecmds.h
+++ b/src/include/commands/tablecmds.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/commands/tablecmds.h,v 1.40 2008/06/15 01:25:54 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/commands/tablecmds.h,v 1.41 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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);
diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h
index 6496fe7868..a3c76cfa30 100644
--- a/src/include/commands/vacuum.h
+++ b/src/include/commands/vacuum.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/commands/vacuum.h,v 1.77 2008/06/05 15:47:32 alvherre Exp $
+ * $PostgreSQL: pgsql/src/include/commands/vacuum.h,v 1.78 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,7 +20,7 @@
#include "nodes/parsenodes.h"
#include "storage/buf.h"
#include "storage/lock.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
/*----------
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index e977b9f870..f21a0528e7 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -7,18 +7,22 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.183 2008/01/01 19:45:58 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.184 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
#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"
diff --git a/src/include/nodes/print.h b/src/include/nodes/print.h
index 421fb09791..58c8486815 100644
--- a/src/include/nodes/print.h
+++ b/src/include/nodes/print.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/print.h,v 1.28 2008/01/01 19:45:58 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/print.h,v 1.29 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@
#define PRINT_H
#include "nodes/parsenodes.h"
-#include "nodes/execnodes.h"
+#include "executor/tuptable.h"
#define nodeDisplay(x) pprint(x)
diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h
index 9e83549358..7471d1b44d 100644
--- a/src/include/optimizer/plancat.h
+++ b/src/include/optimizer/plancat.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/optimizer/plancat.h,v 1.49 2008/04/01 00:48:33 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/optimizer/plancat.h,v 1.50 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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,
diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h
index bf77ced328..ed8f7fe3b3 100644
--- a/src/include/parser/parse_node.h
+++ b/src/include/parser/parse_node.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/parser/parse_node.h,v 1.53 2008/01/01 19:45:58 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/parser/parse_node.h,v 1.54 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index 3cda489b35..9b48f42bb0 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 2001-2008, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.75 2008/05/15 00:17:41 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.76 2008/06/19 00:46:05 alvherre Exp $
* ----------
*/
#ifndef PGSTAT_H
@@ -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"
diff --git a/src/include/rewrite/rewriteDefine.h b/src/include/rewrite/rewriteDefine.h
index 3e44baa2a3..514728e763 100644
--- a/src/include/rewrite/rewriteDefine.h
+++ b/src/include/rewrite/rewriteDefine.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/rewrite/rewriteDefine.h,v 1.29 2008/05/12 00:00:53 alvherre Exp $
+ * $PostgreSQL: pgsql/src/include/rewrite/rewriteDefine.h,v 1.30 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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'
diff --git a/src/include/rewrite/rewriteHandler.h b/src/include/rewrite/rewriteHandler.h
index 297cb0411f..87ce29ee06 100644
--- a/src/include/rewrite/rewriteHandler.h
+++ b/src/include/rewrite/rewriteHandler.h
@@ -7,14 +7,14 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/rewrite/rewriteHandler.h,v 1.29 2008/01/01 19:45:58 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/rewrite/rewriteHandler.h,v 1.30 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef REWRITEHANDLER_H
#define REWRITEHANDLER_H
-#include "utils/rel.h"
+#include "utils/relcache.h"
#include "nodes/parsenodes.h"
extern List *QueryRewrite(Query *parsetree);
diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h
index 472e64de1b..589baa0a7e 100644
--- a/src/include/storage/buf_internals.h
+++ b/src/include/storage/buf_internals.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.96 2008/06/12 09:12:31 heikki Exp $
+ * $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.97 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,7 +20,7 @@
#include "storage/shmem.h"
#include "storage/smgr.h"
#include "storage/spin.h"
-#include "utils/rel.h"
+#include "utils/relcache.h"
/*
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h
index 29d8bea287..f940ae466d 100644
--- a/src/include/storage/bufmgr.h
+++ b/src/include/storage/bufmgr.h
@@ -7,16 +7,18 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.113 2008/06/12 09:12:31 heikki Exp $
+ * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.114 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
#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;
diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h
index 5e029d0f46..80814c4e6d 100644
--- a/src/include/utils/catcache.h
+++ b/src/include/utils/catcache.h
@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/catcache.h,v 1.66 2008/01/01 19:45:59 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/catcache.h,v 1.67 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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.
diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h
index 80c8c2ab33..821c751d28 100644
--- a/src/include/utils/inval.h
+++ b/src/include/utils/inval.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/inval.h,v 1.42 2008/03/13 18:00:32 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/inval.h,v 1.43 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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);
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index 25b9d43845..0d9d75dd8b 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.106 2008/04/10 22:25:26 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.107 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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.
diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h
index c5005abce5..bcfb3a8f58 100644
--- a/src/include/utils/relcache.h
+++ b/src/include/utils/relcache.h
@@ -7,14 +7,27 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/relcache.h,v 1.61 2008/01/01 19:45:59 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/relcache.h,v 1.62 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
#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
diff --git a/src/include/utils/tuplesort.h b/src/include/utils/tuplesort.h
index ab57fb505e..8de8e0297a 100644
--- a/src/include/utils/tuplesort.h
+++ b/src/include/utils/tuplesort.h
@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/tuplesort.h,v 1.30 2008/05/12 00:00:54 alvherre Exp $
+ * $PostgreSQL: pgsql/src/include/utils/tuplesort.h,v 1.31 2008/06/19 00:46:06 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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