|
|
|
|
@ -6,7 +6,7 @@ |
|
|
|
|
* |
|
|
|
|
* Copyright (c) 1994, Regents of the University of California |
|
|
|
|
* |
|
|
|
|
* $Id: nbtree.h,v 1.18 1997/09/08 21:50:55 momjian Exp $ |
|
|
|
|
* $Id: nbtree.h,v 1.19 1998/01/24 22:48:07 momjian Exp $ |
|
|
|
|
* |
|
|
|
|
*------------------------------------------------------------------------- |
|
|
|
|
*/ |
|
|
|
|
@ -213,13 +213,11 @@ typedef struct BTPageState |
|
|
|
|
/*
|
|
|
|
|
* prototypes for functions in nbtinsert.c |
|
|
|
|
*/ |
|
|
|
|
extern InsertIndexResult |
|
|
|
|
_bt_doinsert(Relation rel, BTItem btitem, |
|
|
|
|
extern InsertIndexResult _bt_doinsert(Relation rel, BTItem btitem, |
|
|
|
|
bool index_is_unique, Relation heapRel); |
|
|
|
|
|
|
|
|
|
/* default is to allow duplicates */ |
|
|
|
|
extern bool |
|
|
|
|
_bt_itemcmp(Relation rel, Size keysz, BTItem item1, BTItem item2, |
|
|
|
|
extern bool _bt_itemcmp(Relation rel, Size keysz, BTItem item1, BTItem item2, |
|
|
|
|
StrategyNumber strat); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
@ -241,16 +239,13 @@ extern void _bt_pagedel(Relation rel, ItemPointer tid); |
|
|
|
|
*/ |
|
|
|
|
extern bool BuildingBtree; /* in nbtree.c */ |
|
|
|
|
|
|
|
|
|
extern void |
|
|
|
|
btbuild(Relation heap, Relation index, int natts, |
|
|
|
|
extern void btbuild(Relation heap, Relation index, int natts, |
|
|
|
|
AttrNumber *attnum, IndexStrategy istrat, uint16 pcount, |
|
|
|
|
Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo); |
|
|
|
|
extern InsertIndexResult |
|
|
|
|
btinsert(Relation rel, Datum *datum, char *nulls, |
|
|
|
|
extern InsertIndexResult btinsert(Relation rel, Datum *datum, char *nulls, |
|
|
|
|
ItemPointer ht_ctid, Relation heapRel); |
|
|
|
|
extern char *btgettuple(IndexScanDesc scan, ScanDirection dir); |
|
|
|
|
extern char * |
|
|
|
|
btbeginscan(Relation rel, bool fromEnd, uint16 keysz, |
|
|
|
|
extern char * btbeginscan(Relation rel, bool fromEnd, uint16 keysz, |
|
|
|
|
ScanKey scankey); |
|
|
|
|
|
|
|
|
|
extern void btrescan(IndexScanDesc scan, bool fromEnd, ScanKey scankey); |
|
|
|
|
@ -270,17 +265,13 @@ extern void _bt_adjscans(Relation rel, ItemPointer tid, int op); |
|
|
|
|
/*
|
|
|
|
|
* prototypes for functions in nbtsearch.c |
|
|
|
|
*/ |
|
|
|
|
extern BTStack |
|
|
|
|
_bt_search(Relation rel, int keysz, ScanKey scankey, |
|
|
|
|
extern BTStack _bt_search(Relation rel, int keysz, ScanKey scankey, |
|
|
|
|
Buffer *bufP); |
|
|
|
|
extern Buffer |
|
|
|
|
_bt_moveright(Relation rel, Buffer buf, int keysz, |
|
|
|
|
extern Buffer _bt_moveright(Relation rel, Buffer buf, int keysz, |
|
|
|
|
ScanKey scankey, int access); |
|
|
|
|
extern bool |
|
|
|
|
_bt_skeycmp(Relation rel, Size keysz, ScanKey scankey, |
|
|
|
|
extern bool _bt_skeycmp(Relation rel, Size keysz, ScanKey scankey, |
|
|
|
|
Page page, ItemId itemid, StrategyNumber strat); |
|
|
|
|
extern OffsetNumber |
|
|
|
|
_bt_binsrch(Relation rel, Buffer buf, int keysz, |
|
|
|
|
extern OffsetNumber _bt_binsrch(Relation rel, Buffer buf, int keysz, |
|
|
|
|
ScanKey scankey, int srchtype); |
|
|
|
|
extern RetrieveIndexResult _bt_next(IndexScanDesc scan, ScanDirection dir); |
|
|
|
|
extern RetrieveIndexResult _bt_first(IndexScanDesc scan, ScanDirection dir); |
|
|
|
|
@ -289,11 +280,9 @@ extern bool _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir); |
|
|
|
|
/*
|
|
|
|
|
* prototypes for functions in nbtstrat.c |
|
|
|
|
*/ |
|
|
|
|
extern StrategyNumber |
|
|
|
|
_bt_getstrat(Relation rel, AttrNumber attno, |
|
|
|
|
extern StrategyNumber _bt_getstrat(Relation rel, AttrNumber attno, |
|
|
|
|
RegProcedure proc); |
|
|
|
|
extern bool |
|
|
|
|
_bt_invokestrat(Relation rel, AttrNumber attno, |
|
|
|
|
extern bool _bt_invokestrat(Relation rel, AttrNumber attno, |
|
|
|
|
StrategyNumber strat, Datum left, Datum right); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|