summaryrefslogtreecommitdiff
path: root/src/include/access/heapam.h
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2008-06-19 00:46:06 +0000
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2008-06-19 00:46:06 +0000
commita3540b0f657c6352ae91884a9ee47c67395ce122 (patch)
treec0447efbf3f5a885f29d080e4005ff5562484513 /src/include/access/heapam.h
parentd1da215d325a1b8923def0a59cf2b948186164c8 (diff)
downloadpostgresql-a3540b0f657c6352ae91884a9ee47c67395ce122.tar.gz
Improve our #include situation by moving pointer types away from the
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.
Diffstat (limited to 'src/include/access/heapam.h')
-rw-r--r--src/include/access/heapam.h15
1 files changed, 13 insertions, 2 deletions
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,