summaryrefslogtreecommitdiff
path: root/src/backend/access/nbtree
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/nbtree')
-rw-r--r--src/backend/access/nbtree/nbtpage.c11
-rw-r--r--src/backend/access/nbtree/nbtsearch.c6
-rw-r--r--src/backend/access/nbtree/nbtsort.c17
-rw-r--r--src/backend/access/nbtree/nbtutils.c6
4 files changed, 28 insertions, 12 deletions
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index 93b420fd77..9142c55737 100644
--- a/src/backend/access/nbtree/nbtpage.c
+++ b/src/backend/access/nbtree/nbtpage.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.8 1997/05/30 18:35:33 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.9 1997/08/19 21:29:36 momjian Exp $
*
* NOTES
* Postgres btree pages look like ordinary relation pages. The opaque
@@ -36,6 +36,9 @@
# include <string.h>
#endif
+static void _bt_setpagelock(Relation rel, BlockNumber blkno, int access);
+static void _bt_unsetpagelock(Relation rel, BlockNumber blkno, int access);
+
#define BTREE_METAPAGE 0
#define BTREE_MAGIC 0x053162
@@ -118,6 +121,7 @@ _bt_metapinit(Relation rel)
RelationUnsetLockForWrite(rel);
}
+#ifdef NOT_USED
/*
* _bt_checkmeta() -- Verify that the metadata stored in a btree are
* reasonable.
@@ -157,6 +161,7 @@ _bt_checkmeta(Relation rel)
_bt_relbuf(rel, metabuf, BT_READ);
}
+#endif
/*
* _bt_getroot() -- Get the root page of the btree.
@@ -537,7 +542,7 @@ _bt_getstackbuf(Relation rel, BTStack stack, int access)
}
}
-void
+static void
_bt_setpagelock(Relation rel, BlockNumber blkno, int access)
{
ItemPointerData iptr;
@@ -552,7 +557,7 @@ _bt_setpagelock(Relation rel, BlockNumber blkno, int access)
}
}
-void
+static void
_bt_unsetpagelock(Relation rel, BlockNumber blkno, int access)
{
ItemPointerData iptr;
diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c
index a0999d5d6f..1d1c8072b9 100644
--- a/src/backend/access/nbtree/nbtsearch.c
+++ b/src/backend/access/nbtree/nbtsearch.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.22 1997/08/12 22:51:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.23 1997/08/19 21:29:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,7 +34,7 @@ _bt_searchr(Relation rel, int keysz, ScanKey scankey,
static OffsetNumber
_bt_firsteq(Relation rel, TupleDesc itupdesc, Page page,
Size keysz, ScanKey scankey, OffsetNumber offnum);
-int
+static int
_bt_compare(Relation rel, TupleDesc itupdesc, Page page,
int keysz, ScanKey scankey, OffsetNumber offnum);
static bool
@@ -556,7 +556,7 @@ _bt_firsteq(Relation rel,
* but not "any time a new min key is inserted" (see _bt_insertonpg).
* - vadim 12/05/96
*/
-int
+static int
_bt_compare(Relation rel,
TupleDesc itupdesc,
Page page,
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index 060bc99655..8e054d24ab 100644
--- a/src/backend/access/nbtree/nbtsort.c
+++ b/src/backend/access/nbtree/nbtsort.c
@@ -5,7 +5,7 @@
*
*
* IDENTIFICATION
- * $Id: nbtsort.c,v 1.18 1997/08/12 22:51:52 momjian Exp $
+ * $Id: nbtsort.c,v 1.19 1997/08/19 21:29:46 momjian Exp $
*
* NOTES
*
@@ -68,6 +68,11 @@
extern int ShowExecutorStats;
#endif
+static BTItem _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags);
+static BTItem _bt_minitem(Page opage, BlockNumber oblkno, int atend);
+static void *_bt_pagestate(Relation index, int flags, int level, bool doupper);
+static void _bt_uppershutdown(Relation index, BTPageState *state);
+
/*
* turn on debugging output.
*
@@ -806,7 +811,7 @@ _bt_slideleft(Relation index, Buffer buf, Page page)
* allocate and initialize a new BTPageState. the returned structure
* is suitable for immediate use by _bt_buildadd.
*/
-void *
+static void *
_bt_pagestate(Relation index, int flags, int level, bool doupper)
{
BTPageState *state = (BTPageState *) palloc(sizeof(BTPageState));
@@ -829,7 +834,7 @@ _bt_pagestate(Relation index, int flags, int level, bool doupper)
* the page to which the item used to point, e.g., a heap page if
* 'opage' is a leaf page).
*/
-BTItem
+static BTItem
_bt_minitem(Page opage, BlockNumber oblkno, int atend)
{
OffsetNumber off;
@@ -883,7 +888,7 @@ _bt_minitem(Page opage, BlockNumber oblkno, int atend)
*
* if all keys are unique, 'first' will always be the same as 'last'.
*/
-BTItem
+static BTItem
_bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
{
BTPageState *state = (BTPageState *) pstate;
@@ -1055,7 +1060,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
return(last_bti);
}
-void
+static void
_bt_uppershutdown(Relation index, BTPageState *state)
{
BTPageState *s;
@@ -1311,6 +1316,7 @@ _bt_merge(Relation index, BTSpool *btspool)
* which case we can just build the upper levels as we create the
* sorted bottom level). it is only used for index recycling.
*/
+#ifdef NOT_USED
void
_bt_upperbuild(Relation index)
{
@@ -1370,6 +1376,7 @@ _bt_upperbuild(Relation index)
_bt_uppershutdown(index, state);
}
+#endif
/*
* given a spool loading by successive calls to _bt_spool, create an
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index f74a476bab..738e55dbcc 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.10 1997/04/16 01:48:29 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.11 1997/08/19 21:29:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -303,6 +303,7 @@ _bt_formitem(IndexTuple itup)
return (btitem);
}
+#ifdef NOT_USED
bool
_bt_checkqual(IndexScanDesc scan, IndexTuple itup)
{
@@ -315,7 +316,9 @@ _bt_checkqual(IndexScanDesc scan, IndexTuple itup)
else
return (true);
}
+#endif
+#ifdef NOT_USED
bool
_bt_checkforkeys(IndexScanDesc scan, IndexTuple itup, Size keysz)
{
@@ -328,6 +331,7 @@ _bt_checkforkeys(IndexScanDesc scan, IndexTuple itup, Size keysz)
else
return (true);
}
+#endif
bool
_bt_checkkeys (IndexScanDesc scan, IndexTuple tuple, Size *keysok)