mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
Make functions static where possible, enclose unused functions in #ifdef NOT_USED.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.6 1996/11/05 10:02:02 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.7 1997/08/19 21:29:26 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* many of the old access method routines have been turned into
|
||||
@@ -127,6 +127,7 @@ RelationGetIndexScan(Relation relation,
|
||||
return (scan);
|
||||
}
|
||||
|
||||
#ifdef NOT_USED
|
||||
/* ----------------
|
||||
* IndexScanRestart -- Restart an index scan.
|
||||
*
|
||||
@@ -166,7 +167,9 @@ IndexScanRestart(IndexScanDesc scan,
|
||||
key,
|
||||
scan->numberOfKeys * sizeof(ScanKeyData));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NOT_USED
|
||||
/* ----------------
|
||||
* IndexScanEnd -- End and index scan.
|
||||
*
|
||||
@@ -188,6 +191,7 @@ IndexScanEnd(IndexScanDesc scan)
|
||||
|
||||
pfree(scan);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ----------------
|
||||
* IndexScanMarkPosition -- Mark current position in a scan.
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.11 1997/08/12 22:51:48 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.12 1997/08/19 21:29:30 momjian Exp $
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
* index_open - open an index relation by relationId
|
||||
@@ -271,6 +271,7 @@ index_endscan(IndexScanDesc scan)
|
||||
RelationUnsetRIntentLock(scan->relation);
|
||||
}
|
||||
|
||||
#ifdef NOT_USED
|
||||
/* ----------------
|
||||
* index_markpos - mark a scan position
|
||||
* ----------------
|
||||
@@ -285,7 +286,9 @@ index_markpos(IndexScanDesc scan)
|
||||
|
||||
fmgr(procedure, scan);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NOT_USED
|
||||
/* ----------------
|
||||
* index_restrpos - restore a scan position
|
||||
* ----------------
|
||||
@@ -300,6 +303,7 @@ index_restrpos(IndexScanDesc scan)
|
||||
|
||||
fmgr(procedure, scan);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ----------------
|
||||
* index_getnext - get the next tuple from a scan
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.7 1996/11/05 10:02:06 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.8 1997/08/19 21:29:32 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -26,6 +26,16 @@
|
||||
#include <access/istrat.h>
|
||||
#include <fmgr.h>
|
||||
|
||||
static bool StrategyEvaluationIsValid(StrategyEvaluation evaluation);
|
||||
static bool StrategyExpressionIsValid(StrategyExpression expression,
|
||||
StrategyNumber maxStrategy);
|
||||
static ScanKey StrategyMapGetScanKeyEntry(StrategyMap map,
|
||||
StrategyNumber strategyNumber);
|
||||
static bool StrategyOperatorIsValid(StrategyOperator operator,
|
||||
StrategyNumber maxStrategy);
|
||||
static bool StrategyTermIsValid(StrategyTerm term,
|
||||
StrategyNumber maxStrategy);
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
* misc strategy support routines
|
||||
* ----------------------------------------------------------------
|
||||
@@ -50,7 +60,7 @@
|
||||
* Assumes that the index strategy number is valid.
|
||||
* Bounds checking should be done outside this routine.
|
||||
*/
|
||||
ScanKey
|
||||
static ScanKey
|
||||
StrategyMapGetScanKeyEntry(StrategyMap map,
|
||||
StrategyNumber strategyNumber)
|
||||
{
|
||||
@@ -103,7 +113,7 @@ AttributeNumberGetIndexStrategySize(AttrNumber maxAttributeNumber,
|
||||
* StrategyOperatorIsValid
|
||||
* ----------------
|
||||
*/
|
||||
bool
|
||||
static bool
|
||||
StrategyOperatorIsValid(StrategyOperator operator,
|
||||
StrategyNumber maxStrategy)
|
||||
{
|
||||
@@ -117,7 +127,7 @@ StrategyOperatorIsValid(StrategyOperator operator,
|
||||
* StrategyTermIsValid
|
||||
* ----------------
|
||||
*/
|
||||
bool
|
||||
static bool
|
||||
StrategyTermIsValid(StrategyTerm term,
|
||||
StrategyNumber maxStrategy)
|
||||
{
|
||||
@@ -141,7 +151,7 @@ StrategyTermIsValid(StrategyTerm term,
|
||||
* StrategyExpressionIsValid
|
||||
* ----------------
|
||||
*/
|
||||
bool
|
||||
static bool
|
||||
StrategyExpressionIsValid(StrategyExpression expression,
|
||||
StrategyNumber maxStrategy)
|
||||
{
|
||||
@@ -165,7 +175,7 @@ StrategyExpressionIsValid(StrategyExpression expression,
|
||||
* StrategyEvaluationIsValid
|
||||
* ----------------
|
||||
*/
|
||||
bool
|
||||
static bool
|
||||
StrategyEvaluationIsValid(StrategyEvaluation evaluation)
|
||||
{
|
||||
Index index;
|
||||
|
Reference in New Issue
Block a user