Skip to content

Commit 1343ae9

Browse files
Give nbtree move right function internal linkage.
Declare _bt_moveright() static. This is a minor modularity win; the routine was already private to nbtsearch.c for all practical purposes. Author: Matthias van de Meent <boekewurm+postgres@gmail.com> Discussion: https://postgr.es/m/CAEze2WgWVzCNEXQB_op5MMZMDgJ3fg3AhVm6bq2iZPpJNXGhWw@mail.gmail.com
1 parent 2aecbd7 commit 1343ae9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/backend/access/nbtree/nbtsearch.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626

2727

2828
static void _bt_drop_lock_and_maybe_pin(IndexScanDesc scan, BTScanPos sp);
29+
static Buffer _bt_moveright(Relation rel, Relation heaprel, BTScanInsert key,
30+
Buffer buf, bool forupdate, BTStack stack,
31+
int access);
2932
static OffsetNumber _bt_binsrch(Relation rel, BTScanInsert key, Buffer buf);
3033
static int _bt_binsrch_posting(BTScanInsert key, Page page,
3134
OffsetNumber offnum);
@@ -231,7 +234,7 @@ _bt_search(Relation rel, Relation heaprel, BTScanInsert key, Buffer *bufP,
231234
* 'access'. If we move right, we release the buffer and lock and acquire
232235
* the same on the right sibling. Return value is the buffer we stop at.
233236
*/
234-
Buffer
237+
static Buffer
235238
_bt_moveright(Relation rel,
236239
Relation heaprel,
237240
BTScanInsert key,

src/include/access/nbtree.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,9 +1272,6 @@ extern void _bt_pendingfsm_finalize(Relation rel, BTVacState *vstate);
12721272
*/
12731273
extern BTStack _bt_search(Relation rel, Relation heaprel, BTScanInsert key,
12741274
Buffer *bufP, int access);
1275-
extern Buffer _bt_moveright(Relation rel, Relation heaprel, BTScanInsert key,
1276-
Buffer buf, bool forupdate, BTStack stack,
1277-
int access);
12781275
extern OffsetNumber _bt_binsrch_insert(Relation rel, BTInsertState insertstate);
12791276
extern int32 _bt_compare(Relation rel, BTScanInsert key, Page page, OffsetNumber offnum);
12801277
extern bool _bt_first(IndexScanDesc scan, ScanDirection dir);

0 commit comments

Comments
 (0)