1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Make functions static where possible, enclose unused functions in #ifdef NOT_USED.

This commit is contained in:
Bruce Momjian
1997-08-19 21:40:56 +00:00
parent b992e200b8
commit 1d8bbfd2e7
186 changed files with 1114 additions and 1048 deletions

View File

@ -57,7 +57,9 @@ static OffsetNumber gistchoose(Relation r, Page p, IndexTuple it,
static int gistnospace(Page p, IndexTuple it);
void gistdelete(Relation r, ItemPointer tid);
static IndexTuple gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t);
static void gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
Relation r, Page pg, OffsetNumber o, int b, bool l) ;
static char *int_range_out(INTRANGE *r);
/*
** routine to build an index. Basically calls insert over and over
@ -1172,7 +1174,7 @@ gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r,
/*
** initialize a GiST entry with a compressed version of pred
*/
void
static void
gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r,
Page pg, OffsetNumber o, int b, bool l)
{
@ -1244,7 +1246,8 @@ _gistdump(Relation r)
}
}
char *text_range_out(TXTRANGE *r)
#ifdef NOT_USED
static char *text_range_out(TXTRANGE *r)
{
char *result;
char *lower, *upper;
@ -1266,8 +1269,9 @@ char *text_range_out(TXTRANGE *r)
pfree(upper);
return(result);
}
#endif
char *
static char *
int_range_out(INTRANGE *r)
{
char *result;

View File

@ -34,6 +34,9 @@ static RetrieveIndexResult gistscancache(IndexScanDesc s, ScanDirection dir);
static RetrieveIndexResult gistfirst(IndexScanDesc s, ScanDirection dir);
static RetrieveIndexResult gistnext(IndexScanDesc s, ScanDirection dir);
static ItemPointer gistheapptr(Relation r, ItemPointer itemp);
static bool gistindex_keytest(IndexTuple tuple, TupleDesc tupdesc,
int scanKeySize, ScanKey key, GISTSTATE *giststate,
Relation r, Page p, OffsetNumber offset);
RetrieveIndexResult
@ -217,7 +220,7 @@ gistnext(IndexScanDesc s, ScanDirection dir)
}
/* Similar to index_keytest, but decompresses the key in the IndexTuple */
bool
static bool
gistindex_keytest(IndexTuple tuple,
TupleDesc tupdesc,
int scanKeySize,

View File

@ -102,6 +102,7 @@ RelationGetGISTStrategy(Relation r,
return (RelationGetStrategy(r, attnum, &GISTEvaluationData, proc));
}
#ifdef NOT_USED
bool
RelationInvokeGISTStrategy(Relation r,
AttrNumber attnum,
@ -112,4 +113,4 @@ RelationInvokeGISTStrategy(Relation r,
return (RelationInvokeStrategy(r, &GISTEvaluationData, attnum, s,
left, right));
}
#endif