summaryrefslogtreecommitdiff
path: root/src/backend/access/gin/gininsert.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-10-17 21:43:26 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2010-10-17 21:43:26 -0400
commit419d2374bfbc1eae562121fde31c1aa0e8a164cb (patch)
tree3c91e43520d82b3a1f3e79fa18bcc1a6f536d83b /src/backend/access/gin/gininsert.c
parent48c7d9f6ff99714495b7d6d2ebc44fbbe992cc8f (diff)
downloadpostgresql-419d2374bfbc1eae562121fde31c1aa0e8a164cb.tar.gz
Fix a passel of inappropriately-named global functions in GIN.
The GIN code has absolutely no business exporting GIN-specific functions with names as generic as compareItemPointers() or newScanKey(); that's just trouble waiting to happen. I got annoyed about this again just now and decided to fix it. This commit ensures that all global symbols defined in access/gin/ have names including "gin" or "Gin". There were a couple of cases, like names involving "PostingItem", where arguably the names were already sufficiently nongeneric; but I figured as long as I was risking creating merge problems for unapplied GIN patches I might as well impose a uniform policy. I didn't touch any static symbol names. There might be some places where it'd be appropriate to rename some static functions to match siblings that are exported, but I'll leave that for another time.
Diffstat (limited to 'src/backend/access/gin/gininsert.c')
-rw-r--r--src/backend/access/gin/gininsert.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/backend/access/gin/gininsert.c b/src/backend/access/gin/gininsert.c
index 263e447ca4..fa70e4fa55 100644
--- a/src/backend/access/gin/gininsert.c
+++ b/src/backend/access/gin/gininsert.c
@@ -114,9 +114,10 @@ addItemPointersToTuple(Relation index, GinState *ginstate,
/* good, small enough */
uint32 newnitem;
- newnitem = MergeItemPointers(GinGetPosting(res),
- GinGetPosting(old), GinGetNPosting(old),
- items, nitem);
+ newnitem = ginMergeItemPointers(GinGetPosting(res),
+ GinGetPosting(old),
+ GinGetNPosting(old),
+ items, nitem);
/* merge might have eliminated some duplicate items */
GinShortenTuple(res, newnitem);
}
@@ -130,7 +131,7 @@ addItemPointersToTuple(Relation index, GinState *ginstate,
postingRoot = createPostingTree(index, GinGetPosting(old), GinGetNPosting(old));
GinSetPostingTree(res, postingRoot);
- gdi = prepareScanPostingTree(index, postingRoot, FALSE);
+ gdi = ginPrepareScanPostingTree(index, postingRoot, FALSE);
gdi->btree.isBuild = (buildStats != NULL);
ginInsertItemPointer(gdi, items, nitem, buildStats);
@@ -166,7 +167,7 @@ ginEntryInsert(Relation index, GinState *ginstate,
if (buildStats)
buildStats->nEntries++;
- prepareEntryScan(&btree, index, attnum, value, ginstate);
+ ginPrepareEntryScan(&btree, index, attnum, value, ginstate);
stack = ginFindLeafPage(&btree, NULL);
page = BufferGetPage(stack->buffer);
@@ -187,7 +188,7 @@ ginEntryInsert(Relation index, GinState *ginstate,
freeGinBtreeStack(stack);
/* insert into posting tree */
- gdi = prepareScanPostingTree(index, rootPostingTree, FALSE);
+ gdi = ginPrepareScanPostingTree(index, rootPostingTree, FALSE);
gdi->btree.isBuild = (buildStats != NULL);
ginInsertItemPointer(gdi, items, nitem, buildStats);
pfree(gdi);
@@ -233,7 +234,7 @@ ginHeapTupleBulkInsert(GinBuildState *buildstate, OffsetNumber attnum, Datum val
MemoryContext oldCtx;
oldCtx = MemoryContextSwitchTo(buildstate->funcCtx);
- entries = extractEntriesSU(buildstate->accum.ginstate, attnum, value, &nentries);
+ entries = ginExtractEntriesSU(buildstate->accum.ginstate, attnum, value, &nentries);
MemoryContextSwitchTo(oldCtx);
if (nentries == 0)
@@ -420,7 +421,7 @@ ginHeapTupleInsert(Relation index, GinState *ginstate, OffsetNumber attnum, Datu
int32 i,
nentries;
- entries = extractEntriesSU(ginstate, attnum, value, &nentries);
+ entries = ginExtractEntriesSU(ginstate, attnum, value, &nentries);
if (nentries == 0)
/* nothing to insert */