Skip to content

Commit 8f57b06

Browse files
committed
Rename updateNodeLink to spgUpdateNodeLink.
On reflection, the original name seems way too generic for a global symbol. A quick check shows this is the only exported function name in SP-GiST that doesn't begin with "spg" or contain "SpGist", so the rest of them seem all right.
1 parent 61d81bd commit 8f57b06

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

src/backend/access/spgist/spgdoinsert.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ typedef struct SPPageDesc
4444
* split operation.
4545
*/
4646
void
47-
updateNodeLink(SpGistInnerTuple tup, int nodeN,
48-
BlockNumber blkno, OffsetNumber offset)
47+
spgUpdateNodeLink(SpGistInnerTuple tup, int nodeN,
48+
BlockNumber blkno, OffsetNumber offset)
4949
{
5050
int i;
5151
SpGistNodeTuple node;
@@ -190,7 +190,7 @@ saveNodeLink(Relation index, SPPageDesc *parent,
190190
innerTuple = (SpGistInnerTuple) PageGetItem(parent->page,
191191
PageGetItemId(parent->page, parent->offnum));
192192

193-
updateNodeLink(innerTuple, parent->node, blkno, offnum);
193+
spgUpdateNodeLink(innerTuple, parent->node, blkno, offnum);
194194

195195
MarkBufferDirty(parent->buffer);
196196
}
@@ -1766,10 +1766,10 @@ spgSplitNodeAction(Relation index, SpGistState *state,
17661766
* the postfix tuple first.) We have to update the local copy of the
17671767
* prefixTuple too, because that's what will be written to WAL.
17681768
*/
1769-
updateNodeLink(prefixTuple, 0, postfixBlkno, postfixOffset);
1769+
spgUpdateNodeLink(prefixTuple, 0, postfixBlkno, postfixOffset);
17701770
prefixTuple = (SpGistInnerTuple) PageGetItem(current->page,
17711771
PageGetItemId(current->page, current->offnum));
1772-
updateNodeLink(prefixTuple, 0, postfixBlkno, postfixOffset);
1772+
spgUpdateNodeLink(prefixTuple, 0, postfixBlkno, postfixOffset);
17731773

17741774
MarkBufferDirty(current->buffer);
17751775

src/backend/access/spgist/spgxlog.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ spgRedoAddLeaf(XLogRecPtr lsn, XLogRecord *record)
172172
tuple = (SpGistInnerTuple) PageGetItem(page,
173173
PageGetItemId(page, xldata->offnumParent));
174174

175-
updateNodeLink(tuple, xldata->nodeI,
176-
xldata->blknoLeaf, xldata->offnumLeaf);
175+
spgUpdateNodeLink(tuple, xldata->nodeI,
176+
xldata->blknoLeaf, xldata->offnumLeaf);
177177

178178
PageSetLSN(page, lsn);
179179
PageSetTLI(page, ThisTimeLineID);
@@ -277,8 +277,8 @@ spgRedoMoveLeafs(XLogRecPtr lsn, XLogRecord *record)
277277
tuple = (SpGistInnerTuple) PageGetItem(page,
278278
PageGetItemId(page, xldata->offnumParent));
279279

280-
updateNodeLink(tuple, xldata->nodeI,
281-
xldata->blknoDst, toInsert[nInsert - 1]);
280+
spgUpdateNodeLink(tuple, xldata->nodeI,
281+
xldata->blknoDst, toInsert[nInsert - 1]);
282282

283283
PageSetLSN(page, lsn);
284284
PageSetTLI(page, ThisTimeLineID);
@@ -425,8 +425,8 @@ spgRedoAddNode(XLogRecPtr lsn, XLogRecord *record)
425425
innerTuple = (SpGistInnerTuple) PageGetItem(page,
426426
PageGetItemId(page, xldata->offnumParent));
427427

428-
updateNodeLink(innerTuple, xldata->nodeI,
429-
xldata->blknoNew, xldata->offnumNew);
428+
spgUpdateNodeLink(innerTuple, xldata->nodeI,
429+
xldata->blknoNew, xldata->offnumNew);
430430

431431
PageSetLSN(page, lsn);
432432
PageSetTLI(page, ThisTimeLineID);
@@ -692,8 +692,8 @@ spgRedoPickSplit(XLogRecPtr lsn, XLogRecord *record)
692692

693693
parent = (SpGistInnerTuple) PageGetItem(page,
694694
PageGetItemId(page, xldata->offnumParent));
695-
updateNodeLink(parent, xldata->nodeI,
696-
xldata->blknoInner, xldata->offnumInner);
695+
spgUpdateNodeLink(parent, xldata->nodeI,
696+
xldata->blknoInner, xldata->offnumInner);
697697
}
698698

699699
PageSetLSN(page, lsn);
@@ -727,8 +727,8 @@ spgRedoPickSplit(XLogRecPtr lsn, XLogRecord *record)
727727

728728
parent = (SpGistInnerTuple) PageGetItem(page,
729729
PageGetItemId(page, xldata->offnumParent));
730-
updateNodeLink(parent, xldata->nodeI,
731-
xldata->blknoInner, xldata->offnumInner);
730+
spgUpdateNodeLink(parent, xldata->nodeI,
731+
xldata->blknoInner, xldata->offnumInner);
732732

733733
PageSetLSN(page, lsn);
734734
PageSetTLI(page, ThisTimeLineID);

src/include/access/spgist_private.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ extern OffsetNumber SpGistPageAddNewItem(SpGistState *state, Page page,
610610
bool errorOK);
611611

612612
/* spgdoinsert.c */
613-
extern void updateNodeLink(SpGistInnerTuple tup, int nodeN,
614-
BlockNumber blkno, OffsetNumber offset);
613+
extern void spgUpdateNodeLink(SpGistInnerTuple tup, int nodeN,
614+
BlockNumber blkno, OffsetNumber offset);
615615
extern void spgPageIndexMultiDelete(SpGistState *state, Page page,
616616
OffsetNumber *itemnos, int nitems,
617617
int firststate, int reststate,

0 commit comments

Comments
 (0)