mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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.
This commit is contained in:
@@ -75,7 +75,8 @@ fillScanKey(GinState *ginstate, GinScanKey key, OffsetNumber attnum, Datum query
|
||||
/* link to the equals entry in current scan key */
|
||||
key->scanEntry[i].master = NULL;
|
||||
for (j = 0; j < i; j++)
|
||||
if (compareEntries(ginstate, attnum, entryValues[i], entryValues[j]) == 0 &&
|
||||
if (ginCompareEntries(ginstate, attnum,
|
||||
entryValues[i], entryValues[j]) == 0 &&
|
||||
key->scanEntry[i].isPartialMatch == key->scanEntry[j].isPartialMatch &&
|
||||
key->scanEntry[i].strategy == key->scanEntry[j].strategy)
|
||||
{
|
||||
@@ -155,7 +156,7 @@ freeScanKeys(GinScanKey keys, uint32 nkeys)
|
||||
}
|
||||
|
||||
void
|
||||
newScanKey(IndexScanDesc scan)
|
||||
ginNewScanKey(IndexScanDesc scan)
|
||||
{
|
||||
ScanKey scankey = scan->keyData;
|
||||
GinScanOpaque so = (GinScanOpaque) scan->opaque;
|
||||
|
Reference in New Issue
Block a user