Commit 1d8bbfd2 authored by Bruce Momjian's avatar Bruce Momjian

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

parent b992e200
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.18 1996/12/09 01:22:17 bryanh Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.19 1997/08/19 21:28:49 momjian Exp $
* *
* NOTES * NOTES
* The old interface functions have been converted to macros * The old interface functions have been converted to macros
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#define register #define register
#endif /* !NO_ASSERT_CHECKING && sparc && sunos4 */ #endif /* !NO_ASSERT_CHECKING && sparc && sunos4 */
static char *heap_getsysattr(HeapTuple tup, Buffer b, int attnum);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* misc support routines * misc support routines
* ---------------------------------------------------------------- * ----------------------------------------------------------------
...@@ -335,7 +337,7 @@ heap_sysattrbyval(AttrNumber attno) ...@@ -335,7 +337,7 @@ heap_sysattrbyval(AttrNumber attno)
* heap_getsysattr * heap_getsysattr
* ---------------- * ----------------
*/ */
char * static char *
heap_getsysattr(HeapTuple tup, Buffer b, int attnum) heap_getsysattr(HeapTuple tup, Buffer b, int attnum)
{ {
switch (attnum) { switch (attnum) {
...@@ -740,6 +742,7 @@ heap_copytuple(HeapTuple tuple) ...@@ -740,6 +742,7 @@ heap_copytuple(HeapTuple tuple)
return(newTuple); return(newTuple);
} }
#ifdef NOT_USED
/* ---------------- /* ----------------
* heap_deformtuple * heap_deformtuple
* *
...@@ -772,6 +775,7 @@ heap_deformtuple(HeapTuple tuple, ...@@ -772,6 +775,7 @@ heap_deformtuple(HeapTuple tuple,
nulls[i] = ' '; nulls[i] = ' ';
} }
} }
#endif
/* ---------------- /* ----------------
* heap_formtuple * heap_formtuple
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.14 1997/06/12 15:41:52 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.15 1997/08/19 21:28:50 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#endif #endif
static Size IndexInfoFindDataOffset(unsigned short t_info); static Size IndexInfoFindDataOffset(unsigned short t_info);
static char *fastgetiattr(IndexTuple tup, int attnum,
TupleDesc att, bool *isnull);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* index_ tuple interface routines * index_ tuple interface routines
...@@ -125,7 +127,7 @@ index_formtuple(TupleDesc tupleDescriptor, ...@@ -125,7 +127,7 @@ index_formtuple(TupleDesc tupleDescriptor,
* the same attribute descriptor will go much quicker. -cim 5/4/91 * the same attribute descriptor will go much quicker. -cim 5/4/91
* ---------------- * ----------------
*/ */
char * static char *
fastgetiattr(IndexTuple tup, fastgetiattr(IndexTuple tup,
int attnum, int attnum,
TupleDesc tupleDesc, TupleDesc tupleDesc,
......
...@@ -57,7 +57,9 @@ static OffsetNumber gistchoose(Relation r, Page p, IndexTuple it, ...@@ -57,7 +57,9 @@ static OffsetNumber gistchoose(Relation r, Page p, IndexTuple it,
static int gistnospace(Page p, IndexTuple it); static int gistnospace(Page p, IndexTuple it);
void gistdelete(Relation r, ItemPointer tid); void gistdelete(Relation r, ItemPointer tid);
static IndexTuple gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t); 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 ** routine to build an index. Basically calls insert over and over
...@@ -1172,7 +1174,7 @@ gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r, ...@@ -1172,7 +1174,7 @@ gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r,
/* /*
** initialize a GiST entry with a compressed version of pred ** initialize a GiST entry with a compressed version of pred
*/ */
void static void
gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r, gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r,
Page pg, OffsetNumber o, int b, bool l) Page pg, OffsetNumber o, int b, bool l)
{ {
...@@ -1244,7 +1246,8 @@ _gistdump(Relation r) ...@@ -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 *result;
char *lower, *upper; char *lower, *upper;
...@@ -1266,8 +1269,9 @@ char *text_range_out(TXTRANGE *r) ...@@ -1266,8 +1269,9 @@ char *text_range_out(TXTRANGE *r)
pfree(upper); pfree(upper);
return(result); return(result);
} }
#endif
char * static char *
int_range_out(INTRANGE *r) int_range_out(INTRANGE *r)
{ {
char *result; char *result;
......
...@@ -34,6 +34,9 @@ static RetrieveIndexResult gistscancache(IndexScanDesc s, ScanDirection dir); ...@@ -34,6 +34,9 @@ static RetrieveIndexResult gistscancache(IndexScanDesc s, ScanDirection dir);
static RetrieveIndexResult gistfirst(IndexScanDesc s, ScanDirection dir); static RetrieveIndexResult gistfirst(IndexScanDesc s, ScanDirection dir);
static RetrieveIndexResult gistnext(IndexScanDesc s, ScanDirection dir); static RetrieveIndexResult gistnext(IndexScanDesc s, ScanDirection dir);
static ItemPointer gistheapptr(Relation r, ItemPointer itemp); 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 RetrieveIndexResult
...@@ -217,7 +220,7 @@ gistnext(IndexScanDesc s, ScanDirection dir) ...@@ -217,7 +220,7 @@ gistnext(IndexScanDesc s, ScanDirection dir)
} }
/* Similar to index_keytest, but decompresses the key in the IndexTuple */ /* Similar to index_keytest, but decompresses the key in the IndexTuple */
bool static bool
gistindex_keytest(IndexTuple tuple, gistindex_keytest(IndexTuple tuple,
TupleDesc tupdesc, TupleDesc tupdesc,
int scanKeySize, int scanKeySize,
......
...@@ -102,6 +102,7 @@ RelationGetGISTStrategy(Relation r, ...@@ -102,6 +102,7 @@ RelationGetGISTStrategy(Relation r,
return (RelationGetStrategy(r, attnum, &GISTEvaluationData, proc)); return (RelationGetStrategy(r, attnum, &GISTEvaluationData, proc));
} }
#ifdef NOT_USED
bool bool
RelationInvokeGISTStrategy(Relation r, RelationInvokeGISTStrategy(Relation r,
AttrNumber attnum, AttrNumber attnum,
...@@ -112,4 +113,4 @@ RelationInvokeGISTStrategy(Relation r, ...@@ -112,4 +113,4 @@ RelationInvokeGISTStrategy(Relation r,
return (RelationInvokeStrategy(r, &GISTEvaluationData, attnum, s, return (RelationInvokeStrategy(r, &GISTEvaluationData, attnum, s,
left, right)); left, right));
} }
#endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/Attic/hashstrat.c,v 1.7 1996/11/05 09:40:24 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/Attic/hashstrat.c,v 1.8 1997/08/19 21:29:07 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -33,6 +33,7 @@ static StrategyNumber HTNegateCommute[1] = { ...@@ -33,6 +33,7 @@ static StrategyNumber HTNegateCommute[1] = {
InvalidStrategy InvalidStrategy
}; };
#ifdef NOT_USED
static StrategyEvaluationData HTEvaluationData = { static StrategyEvaluationData HTEvaluationData = {
/* XXX static for simplicity */ /* XXX static for simplicity */
...@@ -42,13 +43,15 @@ static StrategyEvaluationData HTEvaluationData = { ...@@ -42,13 +43,15 @@ static StrategyEvaluationData HTEvaluationData = {
(StrategyTransformMap)HTNegateCommute, (StrategyTransformMap)HTNegateCommute,
{NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL} {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}
}; };
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* RelationGetHashStrategy * RelationGetHashStrategy
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
StrategyNumber #ifdef NOT_USED
static StrategyNumber
_hash_getstrat(Relation rel, _hash_getstrat(Relation rel,
AttrNumber attno, AttrNumber attno,
RegProcedure proc) RegProcedure proc)
...@@ -61,8 +64,10 @@ _hash_getstrat(Relation rel, ...@@ -61,8 +64,10 @@ _hash_getstrat(Relation rel,
return (strat); return (strat);
} }
#endif
bool #ifdef NOT_USED
static bool
_hash_invokestrat(Relation rel, _hash_invokestrat(Relation rel,
AttrNumber attno, AttrNumber attno,
StrategyNumber strat, StrategyNumber strat,
...@@ -72,28 +77,4 @@ _hash_invokestrat(Relation rel, ...@@ -72,28 +77,4 @@ _hash_invokestrat(Relation rel,
return (RelationInvokeStrategy(rel, &HTEvaluationData, attno, strat, return (RelationInvokeStrategy(rel, &HTEvaluationData, attno, strat,
left, right)); left, right));
} }
#endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.13 1997/08/12 22:51:40 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.14 1997/08/19 21:29:17 momjian Exp $
* *
* *
* INTERFACE ROUTINES * INTERFACE ROUTINES
...@@ -461,6 +461,7 @@ doinsert(Relation relation, HeapTuple tup) ...@@ -461,6 +461,7 @@ doinsert(Relation relation, HeapTuple tup)
* HeapScanIsValid is now a macro in relscan.h -cim 4/27/91 * HeapScanIsValid is now a macro in relscan.h -cim 4/27/91
*/ */
#ifdef NOT_USED
/* ---------------- /* ----------------
* SetHeapAccessMethodImmediateInvalidation * SetHeapAccessMethodImmediateInvalidation
* ---------------- * ----------------
...@@ -470,6 +471,7 @@ SetHeapAccessMethodImmediateInvalidation(bool on) ...@@ -470,6 +471,7 @@ SetHeapAccessMethodImmediateInvalidation(bool on)
{ {
ImmediateInvalidation = on; ImmediateInvalidation = on;
} }
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* heap access method interface * heap access method interface
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.10 1997/08/12 22:51:44 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.11 1997/08/19 21:29:21 momjian Exp $
* *
* NOTES * NOTES
* initam should be moved someplace else. * initam should be moved someplace else.
...@@ -28,13 +28,15 @@ ...@@ -28,13 +28,15 @@
# include <string.h> # include <string.h>
#endif #endif
static void InitHeapAccessStatistics(void);
/* ---------------- /* ----------------
* InitHeapAccessStatistics * InitHeapAccessStatistics
* ---------------- * ----------------
*/ */
HeapAccessStatistics heap_access_stats = (HeapAccessStatistics) NULL; HeapAccessStatistics heap_access_stats = (HeapAccessStatistics) NULL;
void static void
InitHeapAccessStatistics() InitHeapAccessStatistics()
{ {
MemoryContext oldContext; MemoryContext oldContext;
...@@ -121,6 +123,7 @@ InitHeapAccessStatistics() ...@@ -121,6 +123,7 @@ InitHeapAccessStatistics()
heap_access_stats = stats; heap_access_stats = stats;
} }
#ifdef NOT_USED
/* ---------------- /* ----------------
* ResetHeapAccessStatistics * ResetHeapAccessStatistics
* ---------------- * ----------------
...@@ -171,7 +174,9 @@ ResetHeapAccessStatistics() ...@@ -171,7 +174,9 @@ ResetHeapAccessStatistics()
time(&stats->local_reset_timestamp); time(&stats->local_reset_timestamp);
time(&stats->last_request_timestamp); time(&stats->last_request_timestamp);
} }
#endif
#ifdef NOT_USED
/* ---------------- /* ----------------
* GetHeapAccessStatistics * GetHeapAccessStatistics
* ---------------- * ----------------
...@@ -206,7 +211,9 @@ HeapAccessStatistics GetHeapAccessStatistics() ...@@ -206,7 +211,9 @@ HeapAccessStatistics GetHeapAccessStatistics()
return stats; return stats;
} }
#endif
#ifdef NOT_USED
/* ---------------- /* ----------------
* PrintHeapAccessStatistics * PrintHeapAccessStatistics
* ---------------- * ----------------
...@@ -302,7 +309,9 @@ PrintHeapAccessStatistics(HeapAccessStatistics stats) ...@@ -302,7 +309,9 @@ PrintHeapAccessStatistics(HeapAccessStatistics stats)
printf("\n"); printf("\n");
} }
#endif
#ifdef NOT_USED
/* ---------------- /* ----------------
* PrintAndFreeHeapAccessStatistics * PrintAndFreeHeapAccessStatistics
* ---------------- * ----------------
...@@ -314,6 +323,7 @@ PrintAndFreeHeapAccessStatistics(HeapAccessStatistics stats) ...@@ -314,6 +323,7 @@ PrintAndFreeHeapAccessStatistics(HeapAccessStatistics stats)
if (stats != NULL) if (stats != NULL)
pfree(stats); pfree(stats);
} }
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* access method initialization * access method initialization
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* many of the old access method routines have been turned into * many of the old access method routines have been turned into
...@@ -127,6 +127,7 @@ RelationGetIndexScan(Relation relation, ...@@ -127,6 +127,7 @@ RelationGetIndexScan(Relation relation,
return (scan); return (scan);
} }
#ifdef NOT_USED
/* ---------------- /* ----------------
* IndexScanRestart -- Restart an index scan. * IndexScanRestart -- Restart an index scan.
* *
...@@ -166,7 +167,9 @@ IndexScanRestart(IndexScanDesc scan, ...@@ -166,7 +167,9 @@ IndexScanRestart(IndexScanDesc scan,
key, key,
scan->numberOfKeys * sizeof(ScanKeyData)); scan->numberOfKeys * sizeof(ScanKeyData));
} }
#endif
#ifdef NOT_USED
/* ---------------- /* ----------------
* IndexScanEnd -- End and index scan. * IndexScanEnd -- End and index scan.
* *
...@@ -188,6 +191,7 @@ IndexScanEnd(IndexScanDesc scan) ...@@ -188,6 +191,7 @@ IndexScanEnd(IndexScanDesc scan)
pfree(scan); pfree(scan);
} }
#endif
/* ---------------- /* ----------------
* IndexScanMarkPosition -- Mark current position in a scan. * IndexScanMarkPosition -- Mark current position in a scan.
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * INTERFACE ROUTINES
* index_open - open an index relation by relationId * index_open - open an index relation by relationId
...@@ -271,6 +271,7 @@ index_endscan(IndexScanDesc scan) ...@@ -271,6 +271,7 @@ index_endscan(IndexScanDesc scan)
RelationUnsetRIntentLock(scan->relation); RelationUnsetRIntentLock(scan->relation);
} }
#ifdef NOT_USED
/* ---------------- /* ----------------
* index_markpos - mark a scan position * index_markpos - mark a scan position
* ---------------- * ----------------
...@@ -285,7 +286,9 @@ index_markpos(IndexScanDesc scan) ...@@ -285,7 +286,9 @@ index_markpos(IndexScanDesc scan)
fmgr(procedure, scan); fmgr(procedure, scan);
} }
#endif
#ifdef NOT_USED
/* ---------------- /* ----------------
* index_restrpos - restore a scan position * index_restrpos - restore a scan position
* ---------------- * ----------------
...@@ -300,6 +303,7 @@ index_restrpos(IndexScanDesc scan) ...@@ -300,6 +303,7 @@ index_restrpos(IndexScanDesc scan)
fmgr(procedure, scan); fmgr(procedure, scan);
} }
#endif
/* ---------------- /* ----------------
* index_getnext - get the next tuple from a scan * index_getnext - get the next tuple from a scan
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 @@ ...@@ -26,6 +26,16 @@
#include <access/istrat.h> #include <access/istrat.h>
#include <fmgr.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 * misc strategy support routines
* ---------------------------------------------------------------- * ----------------------------------------------------------------
...@@ -50,7 +60,7 @@ ...@@ -50,7 +60,7 @@
* Assumes that the index strategy number is valid. * Assumes that the index strategy number is valid.
* Bounds checking should be done outside this routine. * Bounds checking should be done outside this routine.
*/ */
ScanKey static ScanKey
StrategyMapGetScanKeyEntry(StrategyMap map, StrategyMapGetScanKeyEntry(StrategyMap map,
StrategyNumber strategyNumber) StrategyNumber strategyNumber)
{ {
...@@ -103,7 +113,7 @@ AttributeNumberGetIndexStrategySize(AttrNumber maxAttributeNumber, ...@@ -103,7 +113,7 @@ AttributeNumberGetIndexStrategySize(AttrNumber maxAttributeNumber,
* StrategyOperatorIsValid * StrategyOperatorIsValid
* ---------------- * ----------------
*/ */
bool static bool
StrategyOperatorIsValid(StrategyOperator operator, StrategyOperatorIsValid(StrategyOperator operator,
StrategyNumber maxStrategy) StrategyNumber maxStrategy)
{ {
...@@ -117,7 +127,7 @@ StrategyOperatorIsValid(StrategyOperator operator, ...@@ -117,7 +127,7 @@ StrategyOperatorIsValid(StrategyOperator operator,
* StrategyTermIsValid * StrategyTermIsValid
* ---------------- * ----------------
*/ */
bool static bool
StrategyTermIsValid(StrategyTerm term, StrategyTermIsValid(StrategyTerm term,
StrategyNumber maxStrategy) StrategyNumber maxStrategy)
{ {
...@@ -141,7 +151,7 @@ StrategyTermIsValid(StrategyTerm term, ...@@ -141,7 +151,7 @@ StrategyTermIsValid(StrategyTerm term,
* StrategyExpressionIsValid * StrategyExpressionIsValid
* ---------------- * ----------------
*/ */
bool static bool
StrategyExpressionIsValid(StrategyExpression expression, StrategyExpressionIsValid(StrategyExpression expression,
StrategyNumber maxStrategy) StrategyNumber maxStrategy)
{ {
...@@ -165,7 +175,7 @@ StrategyExpressionIsValid(StrategyExpression expression, ...@@ -165,7 +175,7 @@ StrategyExpressionIsValid(StrategyExpression expression,
* StrategyEvaluationIsValid * StrategyEvaluationIsValid
* ---------------- * ----------------
*/ */
bool static bool
StrategyEvaluationIsValid(StrategyEvaluation evaluation) StrategyEvaluationIsValid(StrategyEvaluation evaluation)
{ {
Index index; Index index;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.8 1997/05/30 18:35:33 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.9 1997/08/19 21:29:36 momjian Exp $
* *
* NOTES * NOTES
* Postgres btree pages look like ordinary relation pages. The opaque * Postgres btree pages look like ordinary relation pages. The opaque
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
# include <string.h> # include <string.h>
#endif #endif
static void _bt_setpagelock(Relation rel, BlockNumber blkno, int access);
static void _bt_unsetpagelock(Relation rel, BlockNumber blkno, int access);
#define BTREE_METAPAGE 0 #define BTREE_METAPAGE 0
#define BTREE_MAGIC 0x053162 #define BTREE_MAGIC 0x053162
...@@ -118,6 +121,7 @@ _bt_metapinit(Relation rel) ...@@ -118,6 +121,7 @@ _bt_metapinit(Relation rel)
RelationUnsetLockForWrite(rel); RelationUnsetLockForWrite(rel);
} }
#ifdef NOT_USED
/* /*
* _bt_checkmeta() -- Verify that the metadata stored in a btree are * _bt_checkmeta() -- Verify that the metadata stored in a btree are
* reasonable. * reasonable.
...@@ -157,6 +161,7 @@ _bt_checkmeta(Relation rel) ...@@ -157,6 +161,7 @@ _bt_checkmeta(Relation rel)
_bt_relbuf(rel, metabuf, BT_READ); _bt_relbuf(rel, metabuf, BT_READ);
} }
#endif
/* /*
* _bt_getroot() -- Get the root page of the btree. * _bt_getroot() -- Get the root page of the btree.
...@@ -537,7 +542,7 @@ _bt_getstackbuf(Relation rel, BTStack stack, int access) ...@@ -537,7 +542,7 @@ _bt_getstackbuf(Relation rel, BTStack stack, int access)
} }
} }
void static void
_bt_setpagelock(Relation rel, BlockNumber blkno, int access) _bt_setpagelock(Relation rel, BlockNumber blkno, int access)
{ {
ItemPointerData iptr; ItemPointerData iptr;
...@@ -552,7 +557,7 @@ _bt_setpagelock(Relation rel, BlockNumber blkno, int access) ...@@ -552,7 +557,7 @@ _bt_setpagelock(Relation rel, BlockNumber blkno, int access)
} }
} }
void static void
_bt_unsetpagelock(Relation rel, BlockNumber blkno, int access) _bt_unsetpagelock(Relation rel, BlockNumber blkno, int access)
{ {
ItemPointerData iptr; ItemPointerData iptr;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.22 1997/08/12 22:51:50 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.23 1997/08/19 21:29:42 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -34,7 +34,7 @@ _bt_searchr(Relation rel, int keysz, ScanKey scankey, ...@@ -34,7 +34,7 @@ _bt_searchr(Relation rel, int keysz, ScanKey scankey,
static OffsetNumber static OffsetNumber
_bt_firsteq(Relation rel, TupleDesc itupdesc, Page page, _bt_firsteq(Relation rel, TupleDesc itupdesc, Page page,
Size keysz, ScanKey scankey, OffsetNumber offnum); Size keysz, ScanKey scankey, OffsetNumber offnum);
int static int
_bt_compare(Relation rel, TupleDesc itupdesc, Page page, _bt_compare(Relation rel, TupleDesc itupdesc, Page page,
int keysz, ScanKey scankey, OffsetNumber offnum); int keysz, ScanKey scankey, OffsetNumber offnum);
static bool static bool
...@@ -556,7 +556,7 @@ _bt_firsteq(Relation rel, ...@@ -556,7 +556,7 @@ _bt_firsteq(Relation rel,
* but not "any time a new min key is inserted" (see _bt_insertonpg). * but not "any time a new min key is inserted" (see _bt_insertonpg).
* - vadim 12/05/96 * - vadim 12/05/96
*/ */
int static int
_bt_compare(Relation rel, _bt_compare(Relation rel,
TupleDesc itupdesc, TupleDesc itupdesc,
Page page, Page page,
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Id: nbtsort.c,v 1.18 1997/08/12 22:51:52 momjian Exp $ * $Id: nbtsort.c,v 1.19 1997/08/19 21:29:46 momjian Exp $
* *
* NOTES * NOTES
* *
...@@ -68,6 +68,11 @@ ...@@ -68,6 +68,11 @@
extern int ShowExecutorStats; extern int ShowExecutorStats;
#endif #endif
static BTItem _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags);
static BTItem _bt_minitem(Page opage, BlockNumber oblkno, int atend);
static void *_bt_pagestate(Relation index, int flags, int level, bool doupper);
static void _bt_uppershutdown(Relation index, BTPageState *state);
/* /*
* turn on debugging output. * turn on debugging output.
* *
...@@ -806,7 +811,7 @@ _bt_slideleft(Relation index, Buffer buf, Page page) ...@@ -806,7 +811,7 @@ _bt_slideleft(Relation index, Buffer buf, Page page)
* allocate and initialize a new BTPageState. the returned structure * allocate and initialize a new BTPageState. the returned structure
* is suitable for immediate use by _bt_buildadd. * is suitable for immediate use by _bt_buildadd.
*/ */
void * static void *
_bt_pagestate(Relation index, int flags, int level, bool doupper) _bt_pagestate(Relation index, int flags, int level, bool doupper)
{ {
BTPageState *state = (BTPageState *) palloc(sizeof(BTPageState)); BTPageState *state = (BTPageState *) palloc(sizeof(BTPageState));
...@@ -829,7 +834,7 @@ _bt_pagestate(Relation index, int flags, int level, bool doupper) ...@@ -829,7 +834,7 @@ _bt_pagestate(Relation index, int flags, int level, bool doupper)
* the page to which the item used to point, e.g., a heap page if * the page to which the item used to point, e.g., a heap page if
* 'opage' is a leaf page). * 'opage' is a leaf page).
*/ */
BTItem static BTItem
_bt_minitem(Page opage, BlockNumber oblkno, int atend) _bt_minitem(Page opage, BlockNumber oblkno, int atend)
{ {
OffsetNumber off; OffsetNumber off;
...@@ -883,7 +888,7 @@ _bt_minitem(Page opage, BlockNumber oblkno, int atend) ...@@ -883,7 +888,7 @@ _bt_minitem(Page opage, BlockNumber oblkno, int atend)
* *
* if all keys are unique, 'first' will always be the same as 'last'. * if all keys are unique, 'first' will always be the same as 'last'.
*/ */
BTItem static BTItem
_bt_buildadd(Relation index, void *pstate, BTItem bti, int flags) _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
{ {
BTPageState *state = (BTPageState *) pstate; BTPageState *state = (BTPageState *) pstate;
...@@ -1055,7 +1060,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags) ...@@ -1055,7 +1060,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
return(last_bti); return(last_bti);
} }
void static void
_bt_uppershutdown(Relation index, BTPageState *state) _bt_uppershutdown(Relation index, BTPageState *state)
{ {
BTPageState *s; BTPageState *s;
...@@ -1311,6 +1316,7 @@ _bt_merge(Relation index, BTSpool *btspool) ...@@ -1311,6 +1316,7 @@ _bt_merge(Relation index, BTSpool *btspool)
* which case we can just build the upper levels as we create the * which case we can just build the upper levels as we create the
* sorted bottom level). it is only used for index recycling. * sorted bottom level). it is only used for index recycling.
*/ */
#ifdef NOT_USED
void void
_bt_upperbuild(Relation index) _bt_upperbuild(Relation index)
{ {
...@@ -1370,6 +1376,7 @@ _bt_upperbuild(Relation index) ...@@ -1370,6 +1376,7 @@ _bt_upperbuild(Relation index)
_bt_uppershutdown(index, state); _bt_uppershutdown(index, state);
} }
#endif
/* /*
* given a spool loading by successive calls to _bt_spool, create an * given a spool loading by successive calls to _bt_spool, create an
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.10 1997/04/16 01:48:29 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.11 1997/08/19 21:29:47 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -303,6 +303,7 @@ _bt_formitem(IndexTuple itup) ...@@ -303,6 +303,7 @@ _bt_formitem(IndexTuple itup)
return (btitem); return (btitem);
} }
#ifdef NOT_USED
bool bool
_bt_checkqual(IndexScanDesc scan, IndexTuple itup) _bt_checkqual(IndexScanDesc scan, IndexTuple itup)
{ {
...@@ -315,7 +316,9 @@ _bt_checkqual(IndexScanDesc scan, IndexTuple itup) ...@@ -315,7 +316,9 @@ _bt_checkqual(IndexScanDesc scan, IndexTuple itup)
else else
return (true); return (true);
} }
#endif
#ifdef NOT_USED
bool bool
_bt_checkforkeys(IndexScanDesc scan, IndexTuple itup, Size keysz) _bt_checkforkeys(IndexScanDesc scan, IndexTuple itup, Size keysz)
{ {
...@@ -328,6 +331,7 @@ _bt_checkforkeys(IndexScanDesc scan, IndexTuple itup, Size keysz) ...@@ -328,6 +331,7 @@ _bt_checkforkeys(IndexScanDesc scan, IndexTuple itup, Size keysz)
else else
return (true); return (true);
} }
#endif
bool bool
_bt_checkkeys (IndexScanDesc scan, IndexTuple tuple, Size *keysok) _bt_checkkeys (IndexScanDesc scan, IndexTuple tuple, Size *keysok)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtstrat.c,v 1.5 1996/11/05 10:54:20 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtstrat.c,v 1.6 1997/08/19 21:29:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
#include <access/rtree.h> #include <access/rtree.h>
#include <access/istrat.h> #include <access/istrat.h>
static StrategyNumber RelationGetRTStrategy(Relation r,
AttrNumber attnum, RegProcedure proc);
/* /*
* Note: negate, commute, and negatecommute all assume that operators are * Note: negate, commute, and negatecommute all assume that operators are
* ordered as follows in the strategy map: * ordered as follows in the strategy map:
...@@ -200,7 +203,7 @@ static StrategyNumber RTOperMap[RTNStrategies] = { ...@@ -200,7 +203,7 @@ static StrategyNumber RTOperMap[RTNStrategies] = {
RTOverlapStrategyNumber RTOverlapStrategyNumber
}; };
StrategyNumber static StrategyNumber
RelationGetRTStrategy(Relation r, RelationGetRTStrategy(Relation r,
AttrNumber attnum, AttrNumber attnum,
RegProcedure proc) RegProcedure proc)
...@@ -208,6 +211,7 @@ RelationGetRTStrategy(Relation r, ...@@ -208,6 +211,7 @@ RelationGetRTStrategy(Relation r,
return (RelationGetStrategy(r, attnum, &RTEvaluationData, proc)); return (RelationGetStrategy(r, attnum, &RTEvaluationData, proc));
} }
#ifdef NOT_USED
bool bool
RelationInvokeRTStrategy(Relation r, RelationInvokeRTStrategy(Relation r,
AttrNumber attnum, AttrNumber attnum,
...@@ -218,6 +222,7 @@ RelationInvokeRTStrategy(Relation r, ...@@ -218,6 +222,7 @@ RelationInvokeRTStrategy(Relation r,
return (RelationInvokeStrategy(r, &RTEvaluationData, attnum, s, return (RelationInvokeStrategy(r, &RTEvaluationData, attnum, s,
left, right)); left, right));
} }
#endif
RegProcedure RegProcedure
RTMapOperator(Relation r, RTMapOperator(Relation r,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.8 1996/11/27 15:15:54 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.9 1997/08/19 21:29:59 momjian Exp $
* *
* NOTES * NOTES
* This file contains the high level access-method interface to the * This file contains the high level access-method interface to the
...@@ -26,6 +26,12 @@ ...@@ -26,6 +26,12 @@
#include <storage/spin.h> #include <storage/spin.h>
#include <commands/vacuum.h> #include <commands/vacuum.h>
static int RecoveryCheckingEnabled(void);
static void TransRecover(Relation logRelation);
static bool TransactionLogTest(TransactionId transactionId, XidStatus status);
static void TransactionLogUpdate(TransactionId transactionId,
XidStatus status);
/* ---------------- /* ----------------
* global variables holding pointers to relations used * global variables holding pointers to relations used
* by the transaction system. These are initialized by * by the transaction system. These are initialized by
...@@ -95,17 +101,19 @@ extern bool BuildingBtree; ...@@ -95,17 +101,19 @@ extern bool BuildingBtree;
* recovery checking accessors * recovery checking accessors
* ---------------- * ----------------
*/ */
int static int
RecoveryCheckingEnabled(void) RecoveryCheckingEnabled(void)
{ {
return RecoveryCheckingEnableState; return RecoveryCheckingEnableState;
} }
void #ifdef NOT_USED
static void
SetRecoveryCheckingEnabled(bool state) SetRecoveryCheckingEnabled(bool state)
{ {
RecoveryCheckingEnableState = (state == true); RecoveryCheckingEnableState = (state == true);
} }
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* postgres log/time access method interface * postgres log/time access method interface
...@@ -124,7 +132,7 @@ SetRecoveryCheckingEnabled(bool state) ...@@ -124,7 +132,7 @@ SetRecoveryCheckingEnabled(bool state)
* -------------------------------- * --------------------------------
*/ */
bool /* true/false: does transaction id have specified status? */ static bool /* true/false: does transaction id have specified status? */
TransactionLogTest(TransactionId transactionId, /* transaction id to test */ TransactionLogTest(TransactionId transactionId, /* transaction id to test */
XidStatus status) /* transaction status */ XidStatus status) /* transaction status */
{ {
...@@ -186,7 +194,7 @@ TransactionLogTest(TransactionId transactionId, /* transaction id to test */ ...@@ -186,7 +194,7 @@ TransactionLogTest(TransactionId transactionId, /* transaction id to test */
* TransactionLogUpdate * TransactionLogUpdate
* -------------------------------- * --------------------------------
*/ */
void static void
TransactionLogUpdate(TransactionId transactionId, /* trans id to update */ TransactionLogUpdate(TransactionId transactionId, /* trans id to update */
XidStatus status) /* new trans status */ XidStatus status) /* new trans status */
{ {
...@@ -371,7 +379,7 @@ TransactionIdGetCommitTime(TransactionId transactionId) /* transaction id to tes ...@@ -371,7 +379,7 @@ TransactionIdGetCommitTime(TransactionId transactionId) /* transaction id to tes
* passed a flag on the command line. * passed a flag on the command line.
* -------------------------------- * --------------------------------
*/ */
void static void
TransRecover(Relation logRelation) TransRecover(Relation logRelation)
{ {
#if 0 #if 0
...@@ -664,6 +672,7 @@ TransactionIdAbort(TransactionId transactionId) ...@@ -664,6 +672,7 @@ TransactionIdAbort(TransactionId transactionId)
TransactionLogUpdate(transactionId, XID_ABORT); TransactionLogUpdate(transactionId, XID_ABORT);
} }
#ifdef NOT_USED
void void
TransactionIdSetInProgress(TransactionId transactionId) TransactionIdSetInProgress(TransactionId transactionId)
{ {
...@@ -672,3 +681,4 @@ TransactionIdSetInProgress(TransactionId transactionId) ...@@ -672,3 +681,4 @@ TransactionIdSetInProgress(TransactionId transactionId)
TransactionLogUpdate(transactionId, XID_INPROGRESS); TransactionLogUpdate(transactionId, XID_INPROGRESS);
} }
#endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.8 1997/08/12 22:51:57 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.9 1997/08/19 21:30:12 momjian Exp $
* *
* NOTES * NOTES
* This file contains support functions for the high * This file contains support functions for the high
...@@ -23,6 +23,15 @@ ...@@ -23,6 +23,15 @@
#include <access/xact.h> #include <access/xact.h>
#include <storage/lmgr.h> #include <storage/lmgr.h>
static AbsoluteTime TransBlockGetCommitTime(Block tblock,
TransactionId transactionId);
static XidStatus TransBlockGetXidStatus(Block tblock,
TransactionId transactionId);
static void TransBlockSetCommitTime(Block tblock,
TransactionId transactionId, AbsoluteTime commitTime);
static void TransBlockSetXidStatus(Block tblock,
TransactionId transactionId, XidStatus xstatus);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* general support routines * general support routines
* ---------------------------------------------------------------- * ----------------------------------------------------------------
...@@ -93,7 +102,8 @@ TransComputeBlockNumber(Relation relation, /* relation to test */ ...@@ -93,7 +102,8 @@ TransComputeBlockNumber(Relation relation, /* relation to test */
* -------------------------------- * --------------------------------
*/ */
XidStatus #ifdef NOT_USED
static XidStatus
TransBlockGetLastTransactionIdStatus(Block tblock, TransBlockGetLastTransactionIdStatus(Block tblock,
TransactionId baseXid, TransactionId baseXid,
TransactionId *returnXidP) TransactionId *returnXidP)
...@@ -159,6 +169,7 @@ TransBlockGetLastTransactionIdStatus(Block tblock, ...@@ -159,6 +169,7 @@ TransBlockGetLastTransactionIdStatus(Block tblock,
*/ */
return xstatus; return xstatus;
} }
#endif
/* -------------------------------- /* --------------------------------
* TransBlockGetXidStatus * TransBlockGetXidStatus
...@@ -167,7 +178,7 @@ TransBlockGetLastTransactionIdStatus(Block tblock, ...@@ -167,7 +178,7 @@ TransBlockGetLastTransactionIdStatus(Block tblock,
* -------------------------------- * --------------------------------
*/ */
XidStatus static XidStatus
TransBlockGetXidStatus(Block tblock, TransBlockGetXidStatus(Block tblock,
TransactionId transactionId) TransactionId transactionId)
{ {
...@@ -218,7 +229,7 @@ TransBlockGetXidStatus(Block tblock, ...@@ -218,7 +229,7 @@ TransBlockGetXidStatus(Block tblock,
* This sets the status of the desired transaction * This sets the status of the desired transaction
* -------------------------------- * --------------------------------
*/ */
void static void
TransBlockSetXidStatus(Block tblock, TransBlockSetXidStatus(Block tblock,
TransactionId transactionId, TransactionId transactionId,
XidStatus xstatus) XidStatus xstatus)
...@@ -279,7 +290,7 @@ TransBlockSetXidStatus(Block tblock, ...@@ -279,7 +290,7 @@ TransBlockSetXidStatus(Block tblock,
* specified transaction id in the trans block. * specified transaction id in the trans block.
* -------------------------------- * --------------------------------
*/ */
AbsoluteTime static AbsoluteTime
TransBlockGetCommitTime(Block tblock, TransBlockGetCommitTime(Block tblock,
TransactionId transactionId) TransactionId transactionId)
{ {
...@@ -320,7 +331,7 @@ TransBlockGetCommitTime(Block tblock, ...@@ -320,7 +331,7 @@ TransBlockGetCommitTime(Block tblock,
* This sets the commit time of the specified transaction * This sets the commit time of the specified transaction
* -------------------------------- * --------------------------------
*/ */
void static void
TransBlockSetCommitTime(Block tblock, TransBlockSetCommitTime(Block tblock,
TransactionId transactionId, TransactionId transactionId,
AbsoluteTime commitTime) AbsoluteTime commitTime)
...@@ -590,6 +601,7 @@ TransBlockNumberSetCommitTime(Relation relation, ...@@ -590,6 +601,7 @@ TransBlockNumberSetCommitTime(Relation relation,
* TransGetLastRecordedTransaction * TransGetLastRecordedTransaction
* -------------------------------- * --------------------------------
*/ */
#ifdef NOT_USED
void void
TransGetLastRecordedTransaction(Relation relation, TransGetLastRecordedTransaction(Relation relation,
TransactionId xid, /* return: transaction id */ TransactionId xid, /* return: transaction id */
...@@ -651,3 +663,4 @@ TransGetLastRecordedTransaction(Relation relation, ...@@ -651,3 +663,4 @@ TransGetLastRecordedTransaction(Relation relation,
*/ */
RelationUnsetLockForRead(relation); RelationUnsetLockForRead(relation);
} }
#endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.8 1997/08/12 22:51:58 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.9 1997/08/19 21:30:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,6 +20,13 @@ ...@@ -20,6 +20,13 @@
#include <access/heapam.h> #include <access/heapam.h>
#include <catalog/catname.h> #include <catalog/catname.h>
static void GetNewObjectIdBlock(Oid *oid_return, int oid_block_size);
static void VariableRelationGetNextOid(Oid *oid_return);
static void VariableRelationGetNextXid(TransactionId *xidP);
static void VariableRelationPutLastXid(TransactionId xid);
static void VariableRelationPutNextOid(Oid *oidP);
static void VariableRelationGetLastXid(TransactionId *xidP);
/* --------------------- /* ---------------------
* spin lock for oid generation * spin lock for oid generation
* --------------------- * ---------------------
...@@ -35,7 +42,7 @@ int OidGenLockId; ...@@ -35,7 +42,7 @@ int OidGenLockId;
* VariableRelationGetNextXid * VariableRelationGetNextXid
* -------------------------------- * --------------------------------
*/ */
void static void
VariableRelationGetNextXid(TransactionId *xidP) VariableRelationGetNextXid(TransactionId *xidP)
{ {
Buffer buf; Buffer buf;
...@@ -77,7 +84,7 @@ VariableRelationGetNextXid(TransactionId *xidP) ...@@ -77,7 +84,7 @@ VariableRelationGetNextXid(TransactionId *xidP)
* VariableRelationGetLastXid * VariableRelationGetLastXid
* -------------------------------- * --------------------------------
*/ */
void static void
VariableRelationGetLastXid(TransactionId *xidP) VariableRelationGetLastXid(TransactionId *xidP)
{ {
Buffer buf; Buffer buf;
...@@ -166,7 +173,7 @@ VariableRelationPutNextXid(TransactionId xid) ...@@ -166,7 +173,7 @@ VariableRelationPutNextXid(TransactionId xid)
* VariableRelationPutLastXid * VariableRelationPutLastXid
* -------------------------------- * --------------------------------
*/ */
void static void
VariableRelationPutLastXid(TransactionId xid) VariableRelationPutLastXid(TransactionId xid)
{ {
Buffer buf; Buffer buf;
...@@ -209,7 +216,7 @@ VariableRelationPutLastXid(TransactionId xid) ...@@ -209,7 +216,7 @@ VariableRelationPutLastXid(TransactionId xid)
* VariableRelationGetNextOid * VariableRelationGetNextOid
* -------------------------------- * --------------------------------
*/ */
void static void
VariableRelationGetNextOid(Oid *oid_return) VariableRelationGetNextOid(Oid *oid_return)
{ {
Buffer buf; Buffer buf;
...@@ -277,7 +284,7 @@ VariableRelationGetNextOid(Oid *oid_return) ...@@ -277,7 +284,7 @@ VariableRelationGetNextOid(Oid *oid_return)
* VariableRelationPutNextOid * VariableRelationPutNextOid
* -------------------------------- * --------------------------------
*/ */
void static void
VariableRelationPutNextOid(Oid *oidP) VariableRelationPutNextOid(Oid *oidP)
{ {
Buffer buf; Buffer buf;
...@@ -484,7 +491,7 @@ UpdateLastCommittedXid(TransactionId xid) ...@@ -484,7 +491,7 @@ UpdateLastCommittedXid(TransactionId xid)
* id assignments should use this * id assignments should use this
* ---------------- * ----------------
*/ */
void static void
GetNewObjectIdBlock(Oid *oid_return, /* place to return the new object id */ GetNewObjectIdBlock(Oid *oid_return, /* place to return the new object id */
int oid_block_size) /* number of oids desired */ int oid_block_size) /* number of oids desired */
{ {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.11 1997/08/12 22:52:01 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.12 1997/08/19 21:30:19 momjian Exp $
* *
* NOTES * NOTES
* Transaction aborts can now occur two ways: * Transaction aborts can now occur two ways:
...@@ -151,6 +151,21 @@ ...@@ -151,6 +151,21 @@
#include <commands/async.h> #include <commands/async.h>
#include <commands/sequence.h> #include <commands/sequence.h>
static void AbortTransaction(void);
static void AtAbort_Cache(void);
static void AtAbort_Locks(void);
static void AtAbort_Memory(void);
static void AtCommit_Cache(void);
static void AtCommit_Locks(void);
static void AtCommit_Memory(void);
static void AtStart_Cache(void);
static void AtStart_Locks(void);
static void AtStart_Memory(void);
static void CommitTransaction(void);
static void RecordTransactionAbort(void);
static void RecordTransactionCommit(void);
static void StartTransaction(void);
/* ---------------- /* ----------------
* global variables holding the current transaction state. * global variables holding the current transaction state.
* *
...@@ -232,11 +247,13 @@ TransactionFlushEnabled(void) ...@@ -232,11 +247,13 @@ TransactionFlushEnabled(void)
return TransactionFlushState; return TransactionFlushState;
} }
#ifdef NOT_USED
void void
SetTransactionFlushEnabled(bool state) SetTransactionFlushEnabled(bool state)
{ {
TransactionFlushState = (state == true); TransactionFlushState = (state == true);
} }
#endif
/* -------------------------------- /* --------------------------------
* IsTransactionState * IsTransactionState
...@@ -420,12 +437,13 @@ CommandIdIsCurrentCommandId(CommandId cid) ...@@ -420,12 +437,13 @@ CommandIdIsCurrentCommandId(CommandId cid)
* ClearCommandIdCounterOverflowFlag * ClearCommandIdCounterOverflowFlag
* -------------------------------- * --------------------------------
*/ */
#ifdef NOT_USED
void void
ClearCommandIdCounterOverflowFlag() ClearCommandIdCounterOverflowFlag()
{ {
CommandIdCounterOverflowFlag = false; CommandIdCounterOverflowFlag = false;
} }
#endif
/* -------------------------------- /* --------------------------------
* CommandCounterIncrement * CommandCounterIncrement
...@@ -464,7 +482,7 @@ InitializeTransactionSystem() ...@@ -464,7 +482,7 @@ InitializeTransactionSystem()
* AtStart_Cache * AtStart_Cache
* -------------------------------- * --------------------------------
*/ */
void static void
AtStart_Cache() AtStart_Cache()
{ {
DiscardInvalid(); DiscardInvalid();
...@@ -474,7 +492,7 @@ AtStart_Cache() ...@@ -474,7 +492,7 @@ AtStart_Cache()
* AtStart_Locks * AtStart_Locks
* -------------------------------- * --------------------------------
*/ */
void static void
AtStart_Locks() AtStart_Locks()
{ {
/* /*
...@@ -489,7 +507,7 @@ AtStart_Locks() ...@@ -489,7 +507,7 @@ AtStart_Locks()
* AtStart_Memory * AtStart_Memory
* -------------------------------- * --------------------------------
*/ */
void static void
AtStart_Memory() AtStart_Memory()
{ {
Portal portal; Portal portal;
...@@ -526,7 +544,7 @@ AtStart_Memory() ...@@ -526,7 +544,7 @@ AtStart_Memory()
* -cim 3/18/90 * -cim 3/18/90
* -------------------------------- * --------------------------------
*/ */
void static void
RecordTransactionCommit() RecordTransactionCommit()
{ {
TransactionId xid; TransactionId xid;
...@@ -569,7 +587,7 @@ RecordTransactionCommit() ...@@ -569,7 +587,7 @@ RecordTransactionCommit()
* AtCommit_Cache * AtCommit_Cache
* -------------------------------- * --------------------------------
*/ */
void static void
AtCommit_Cache() AtCommit_Cache()
{ {
/* ---------------- /* ----------------
...@@ -586,7 +604,7 @@ AtCommit_Cache() ...@@ -586,7 +604,7 @@ AtCommit_Cache()
* AtCommit_Locks * AtCommit_Locks
* -------------------------------- * --------------------------------
*/ */
void static void
AtCommit_Locks() AtCommit_Locks()
{ {
/* ---------------- /* ----------------
...@@ -602,7 +620,7 @@ AtCommit_Locks() ...@@ -602,7 +620,7 @@ AtCommit_Locks()
* AtCommit_Memory * AtCommit_Memory
* -------------------------------- * --------------------------------
*/ */
void static void
AtCommit_Memory() AtCommit_Memory()
{ {
/* ---------------- /* ----------------
...@@ -624,7 +642,7 @@ AtCommit_Memory() ...@@ -624,7 +642,7 @@ AtCommit_Memory()
* RecordTransactionAbort * RecordTransactionAbort
* -------------------------------- * --------------------------------
*/ */
void static void
RecordTransactionAbort() RecordTransactionAbort()
{ {
TransactionId xid; TransactionId xid;
...@@ -655,7 +673,7 @@ RecordTransactionAbort() ...@@ -655,7 +673,7 @@ RecordTransactionAbort()
* AtAbort_Cache * AtAbort_Cache
* -------------------------------- * --------------------------------
*/ */
void static void
AtAbort_Cache() AtAbort_Cache()
{ {
RegisterInvalid(false); RegisterInvalid(false);
...@@ -665,7 +683,7 @@ AtAbort_Cache() ...@@ -665,7 +683,7 @@ AtAbort_Cache()
* AtAbort_Locks * AtAbort_Locks
* -------------------------------- * --------------------------------
*/ */
void static void
AtAbort_Locks() AtAbort_Locks()
{ {
/* ---------------- /* ----------------
...@@ -682,7 +700,7 @@ AtAbort_Locks() ...@@ -682,7 +700,7 @@ AtAbort_Locks()
* AtAbort_Memory * AtAbort_Memory
* -------------------------------- * --------------------------------
*/ */
void static void
AtAbort_Memory() AtAbort_Memory()
{ {
/* ---------------- /* ----------------
...@@ -704,7 +722,7 @@ AtAbort_Memory() ...@@ -704,7 +722,7 @@ AtAbort_Memory()
* *
* -------------------------------- * --------------------------------
*/ */
void static void
StartTransaction() StartTransaction()
{ {
TransactionState s = CurrentTransactionState; TransactionState s = CurrentTransactionState;
...@@ -788,7 +806,7 @@ CurrentXactInProgress() ...@@ -788,7 +806,7 @@ CurrentXactInProgress()
* *
* -------------------------------- * --------------------------------
*/ */
void static void
CommitTransaction() CommitTransaction()
{ {
TransactionState s = CurrentTransactionState; TransactionState s = CurrentTransactionState;
...@@ -847,7 +865,7 @@ CommitTransaction() ...@@ -847,7 +865,7 @@ CommitTransaction()
* *
* -------------------------------- * --------------------------------
*/ */
void static void
AbortTransaction() AbortTransaction()
{ {
TransactionState s = CurrentTransactionState; TransactionState s = CurrentTransactionState;
...@@ -1245,7 +1263,8 @@ EndTransactionBlock(void) ...@@ -1245,7 +1263,8 @@ EndTransactionBlock(void)
* AbortTransactionBlock * AbortTransactionBlock
* -------------------------------- * --------------------------------
*/ */
void #ifdef NOT_USED
static void
AbortTransactionBlock(void) AbortTransactionBlock(void)
{ {
TransactionState s = CurrentTransactionState; TransactionState s = CurrentTransactionState;
...@@ -1288,6 +1307,7 @@ AbortTransactionBlock(void) ...@@ -1288,6 +1307,7 @@ AbortTransactionBlock(void)
AbortTransaction(); AbortTransaction();
s->blockState = TBLOCK_ENDABORT; s->blockState = TBLOCK_ENDABORT;
} }
#endif
/* -------------------------------- /* --------------------------------
* UserAbortTransactionBlock * UserAbortTransactionBlock
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.6 1997/08/12 22:52:02 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.7 1997/08/19 21:30:20 momjian Exp $
* *
* OLD COMMENTS * OLD COMMENTS
* XXX WARNING * XXX WARNING
...@@ -132,6 +132,7 @@ xideq(TransactionId xid1, TransactionId xid2) ...@@ -132,6 +132,7 @@ xideq(TransactionId xid1, TransactionId xid2)
* TransactionIdIncrement * TransactionIdIncrement
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
#ifdef NOT_USED
void void
TransactionIdIncrement(TransactionId *transactionId) TransactionIdIncrement(TransactionId *transactionId)
{ {
...@@ -141,6 +142,7 @@ TransactionIdIncrement(TransactionId *transactionId) ...@@ -141,6 +142,7 @@ TransactionIdIncrement(TransactionId *transactionId)
elog(FATAL, "TransactionIdIncrement: exhausted XID's"); elog(FATAL, "TransactionIdIncrement: exhausted XID's");
return; return;
} }
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* TransactionIdAdd * TransactionIdAdd
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.20 1997/08/18 20:51:44 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.21 1997/08/19 21:30:24 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -103,7 +103,14 @@ ...@@ -103,7 +103,14 @@
#define ALLOC(t, c) (t *)calloc((unsigned)(c), sizeof(t)) #define ALLOC(t, c) (t *)calloc((unsigned)(c), sizeof(t))
#define FIRST_TYPE_OID 16 /* OID of the first type */ #define FIRST_TYPE_OID 16 /* OID of the first type */
extern int Int_yyparse (void); extern int Int_yyparse (void);
static hashnode *AddStr(char *str, int strlength, int mderef);
static AttributeTupleForm AllocateAttribute(void);
static bool BootstrapAlreadySeen(Oid id);
static int CompHash (char *str, int len);
static hashnode *FindStr (char *str, int length, hashnode *mderef);
static int gettype(char *type);
static void cleanup(void);
/* ---------------- /* ----------------
* global variables * global variables
...@@ -701,7 +708,7 @@ InsertOneNull(int i) ...@@ -701,7 +708,7 @@ InsertOneNull(int i)
#define MORE_THAN_THE_NUMBER_OF_CATALOGS 256 #define MORE_THAN_THE_NUMBER_OF_CATALOGS 256
bool static bool
BootstrapAlreadySeen(Oid id) BootstrapAlreadySeen(Oid id)
{ {
static Oid seenArray[MORE_THAN_THE_NUMBER_OF_CATALOGS]; static Oid seenArray[MORE_THAN_THE_NUMBER_OF_CATALOGS];
...@@ -728,7 +735,7 @@ BootstrapAlreadySeen(Oid id) ...@@ -728,7 +735,7 @@ BootstrapAlreadySeen(Oid id)
* cleanup * cleanup
* ---------------- * ----------------
*/ */
void static void
cleanup() cleanup()
{ {
static int beenhere = 0; static int beenhere = 0;
...@@ -750,7 +757,7 @@ cleanup() ...@@ -750,7 +757,7 @@ cleanup()
* gettype * gettype
* ---------------- * ----------------
*/ */
int static int
gettype(char *type) gettype(char *type)
{ {
int i; int i;
...@@ -806,7 +813,7 @@ gettype(char *type) ...@@ -806,7 +813,7 @@ gettype(char *type)
* AllocateAttribute * AllocateAttribute
* ---------------- * ----------------
*/ */
AttributeTupleForm /* XXX */ static AttributeTupleForm /* XXX */
AllocateAttribute() AllocateAttribute()
{ {
AttributeTupleForm attribute = AttributeTupleForm attribute =
...@@ -898,7 +905,7 @@ LexIDStr(int ident_num) ...@@ -898,7 +905,7 @@ LexIDStr(int ident_num)
* are mod'ing by a prime number. * are mod'ing by a prime number.
* ---------------- * ----------------
*/ */
int static int
CompHash(char *str, int len) CompHash(char *str, int len)
{ {
register int result; register int result;
...@@ -917,7 +924,7 @@ CompHash(char *str, int len) ...@@ -917,7 +924,7 @@ CompHash(char *str, int len)
* or NULL if the string is not in the table. * or NULL if the string is not in the table.
* ---------------- * ----------------
*/ */
hashnode * static hashnode *
FindStr(char *str, int length, hashnode *mderef) FindStr(char *str, int length, hashnode *mderef)
{ {
hashnode *node; hashnode *node;
...@@ -947,7 +954,7 @@ FindStr(char *str, int length, hashnode *mderef) ...@@ -947,7 +954,7 @@ FindStr(char *str, int length, hashnode *mderef)
* has assigned to this string. * has assigned to this string.
* ---------------- * ----------------
*/ */
hashnode * static hashnode *
AddStr(char *str, int strlength, int mderef) AddStr(char *str, int strlength, int mderef)
{ {
hashnode *temp, *trail, *newnode; hashnode *temp, *trail, *newnode;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.16 1997/08/19 04:42:54 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.17 1997/08/19 21:30:30 momjian Exp $
* *
* INTERFACE ROUTINES * INTERFACE ROUTINES
* heap_creatr() - Create an uncataloged heap relation * heap_creatr() - Create an uncataloged heap relation
...@@ -53,6 +53,19 @@ ...@@ -53,6 +53,19 @@
# include <string.h> # include <string.h>
#endif #endif
static void AddPgRelationTuple(Relation pg_class_desc,
Relation new_rel_desc, Oid new_rel_oid, int arch, unsigned natts);
static void AddToTempRelList(Relation r);
static void DeletePgAttributeTuples(Relation rdesc);
static void DeletePgRelationTuple(Relation rdesc);
static void DeletePgTypeTuple(Relation rdesc);
static int RelationAlreadyExists(Relation pg_class_desc, char relname[]);
static void RelationRemoveIndexes(Relation relation);
static void RelationRemoveInheritance(Relation relation);
static void RemoveFromTempRelList(Relation r);
static void addNewRelationType(char *typeName, Oid new_rel_oid);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* XXX UGLY HARD CODED BADNESS FOLLOWS XXX * XXX UGLY HARD CODED BADNESS FOLLOWS XXX
* *
...@@ -447,7 +460,7 @@ CheckAttributeNames(TupleDesc tupdesc) ...@@ -447,7 +460,7 @@ CheckAttributeNames(TupleDesc tupdesc)
* has to open pg_class and pass an open descriptor. * has to open pg_class and pass an open descriptor.
* -------------------------------- * --------------------------------
*/ */
int static int
RelationAlreadyExists(Relation pg_class_desc, char relname[]) RelationAlreadyExists(Relation pg_class_desc, char relname[])
{ {
ScanKeyData key; ScanKeyData key;
...@@ -610,7 +623,7 @@ AddNewAttributeTuples(Oid new_rel_oid, ...@@ -610,7 +623,7 @@ AddNewAttributeTuples(Oid new_rel_oid,
* adding a tuple to pg_class. * adding a tuple to pg_class.
* -------------------------------- * --------------------------------
*/ */
void static void
AddPgRelationTuple(Relation pg_class_desc, AddPgRelationTuple(Relation pg_class_desc,
Relation new_rel_desc, Relation new_rel_desc,
Oid new_rel_oid, Oid new_rel_oid,
...@@ -689,7 +702,7 @@ AddPgRelationTuple(Relation pg_class_desc, ...@@ -689,7 +702,7 @@ AddPgRelationTuple(Relation pg_class_desc,
* define a complex type corresponding to the new relation * define a complex type corresponding to the new relation
* -------------------------------- * --------------------------------
*/ */
void static void
addNewRelationType(char *typeName, Oid new_rel_oid) addNewRelationType(char *typeName, Oid new_rel_oid)
{ {
Oid new_type_oid; Oid new_type_oid;
...@@ -854,7 +867,7 @@ heap_create(char relname[], ...@@ -854,7 +867,7 @@ heap_create(char relname[],
* lots of work. * lots of work.
* -------------------------------- * --------------------------------
*/ */
void static void
RelationRemoveInheritance(Relation relation) RelationRemoveInheritance(Relation relation)
{ {
Relation catalogRelation; Relation catalogRelation;
...@@ -953,7 +966,7 @@ RelationRemoveInheritance(Relation relation) ...@@ -953,7 +966,7 @@ RelationRemoveInheritance(Relation relation)
* *
* -------------------------------- * --------------------------------
*/ */
void static void
RelationRemoveIndexes(Relation relation) RelationRemoveIndexes(Relation relation)
{ {
Relation indexRelation; Relation indexRelation;
...@@ -991,7 +1004,7 @@ RelationRemoveIndexes(Relation relation) ...@@ -991,7 +1004,7 @@ RelationRemoveIndexes(Relation relation)
* *
* -------------------------------- * --------------------------------
*/ */
void static void
DeletePgRelationTuple(Relation rdesc) DeletePgRelationTuple(Relation rdesc)
{ {
Relation pg_class_desc; Relation pg_class_desc;
...@@ -1048,7 +1061,7 @@ DeletePgRelationTuple(Relation rdesc) ...@@ -1048,7 +1061,7 @@ DeletePgRelationTuple(Relation rdesc)
* *
* -------------------------------- * --------------------------------
*/ */
void static void
DeletePgAttributeTuples(Relation rdesc) DeletePgAttributeTuples(Relation rdesc)
{ {
Relation pg_attribute_desc; Relation pg_attribute_desc;
...@@ -1117,7 +1130,7 @@ DeletePgAttributeTuples(Relation rdesc) ...@@ -1117,7 +1130,7 @@ DeletePgAttributeTuples(Relation rdesc)
* special. presently we disallow the destroy. * special. presently we disallow the destroy.
* -------------------------------- * --------------------------------
*/ */
void static void
DeletePgTypeTuple(Relation rdesc) DeletePgTypeTuple(Relation rdesc)
{ {
Relation pg_type_desc; Relation pg_type_desc;
...@@ -1386,7 +1399,7 @@ InitTempRelList(void) ...@@ -1386,7 +1399,7 @@ InitTempRelList(void)
we don't really remove it, just mark it as NULL we don't really remove it, just mark it as NULL
and DestroyTempRels will look for NULLs and DestroyTempRels will look for NULLs
*/ */
void static void
RemoveFromTempRelList(Relation r) RemoveFromTempRelList(Relation r)
{ {
int i; int i;
...@@ -1407,7 +1420,7 @@ RemoveFromTempRelList(Relation r) ...@@ -1407,7 +1420,7 @@ RemoveFromTempRelList(Relation r)
MODIFIES the global variable tempRels MODIFIES the global variable tempRels
*/ */
void static void
AddToTempRelList(Relation r) AddToTempRelList(Relation r)
{ {
if (!tempRels) if (!tempRels)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.6 1997/08/12 22:52:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.7 1997/08/19 21:30:38 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -30,6 +30,9 @@ ...@@ -30,6 +30,9 @@
# include <string.h> # include <string.h>
#endif #endif
static Oid TypeShellMakeWithOpenRelation(Relation pg_type_desc,
char *typeName);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* TypeGetWithOpenRelation * TypeGetWithOpenRelation
* *
...@@ -145,7 +148,7 @@ TypeGet(char* typeName, /* name of type to be fetched */ ...@@ -145,7 +148,7 @@ TypeGet(char* typeName, /* name of type to be fetched */
* *
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
Oid static Oid
TypeShellMakeWithOpenRelation(Relation pg_type_desc, char *typeName) TypeShellMakeWithOpenRelation(Relation pg_type_desc, char *typeName)
{ {
register int i; register int i;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/version.c,v 1.4 1997/08/12 20:15:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/version.c,v 1.5 1997/08/19 21:30:47 momjian Exp $
* *
* NOTES * NOTES
* At the point the version is defined, 2 physical relations are created * At the point the version is defined, 2 physical relations are created
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
#define MAX_QUERY_LEN 1024 #define MAX_QUERY_LEN 1024
char rule_buf[MAX_QUERY_LEN]; char rule_buf[MAX_QUERY_LEN];
#ifdef NOT_USED
static char attr_list[MAX_QUERY_LEN]; static char attr_list[MAX_QUERY_LEN];
#endif
static void setAttrList(char *bname);
/* /*
* problem: the version system assumes that the rules it declares will * problem: the version system assumes that the rules it declares will
...@@ -82,6 +82,7 @@ static void setAttrList(char *bname); ...@@ -82,6 +82,7 @@ static void setAttrList(char *bname);
* DO NOT COMMIT THE XACT, just increase the Cid counter! * DO NOT COMMIT THE XACT, just increase the Cid counter!
* _sp. * _sp.
*/ */
#ifdef NOT_USED
static void static void
eval_as_new_xact(char *query) eval_as_new_xact(char *query)
{ {
...@@ -92,10 +93,11 @@ eval_as_new_xact(char *query) ...@@ -92,10 +93,11 @@ eval_as_new_xact(char *query)
CommandCounterIncrement(); CommandCounterIncrement();
pg_eval(query, (char **) NULL, (Oid *) NULL, 0); pg_eval(query, (char **) NULL, (Oid *) NULL, 0);
} }
#endif
/* /*
* Define a version. * Define a version.
*/ */
#ifdef NOT_USED
void void
DefineVersion(char *name, char *fromRelname, char *date) DefineVersion(char *name, char *fromRelname, char *date)
{ {
...@@ -130,11 +132,12 @@ DefineVersion(char *name, char *fromRelname, char *date) ...@@ -130,11 +132,12 @@ DefineVersion(char *name, char *fromRelname, char *date)
VersionReplace (name, saved_basename,saved_snapshot); VersionReplace (name, saved_basename,saved_snapshot);
VersionRetrieve (name, saved_basename, saved_snapshot); VersionRetrieve (name, saved_basename, saved_snapshot);
} }
#endif
/* /*
* Creates the deltas. * Creates the deltas.
*/ */
#ifdef NOT_USED
void void
VersionCreate(char *vname, char *bname) VersionCreate(char *vname, char *bname)
{ {
...@@ -161,6 +164,7 @@ VersionCreate(char *vname, char *bname) ...@@ -161,6 +164,7 @@ VersionCreate(char *vname, char *bname)
sprintf (query_buf, "CREATE TABLE %s_del (DOID oid)", vname); sprintf (query_buf, "CREATE TABLE %s_del (DOID oid)", vname);
eval_as_new_xact (query_buf); eval_as_new_xact (query_buf);
} }
#endif
/* /*
...@@ -168,6 +172,7 @@ VersionCreate(char *vname, char *bname) ...@@ -168,6 +172,7 @@ VersionCreate(char *vname, char *bname)
* sets the global variable 'attr_list' with the list of attributes (names) * sets the global variable 'attr_list' with the list of attributes (names)
* for that relation. * for that relation.
*/ */
#ifdef NOT_USED
static void static void
setAttrList(char *bname) setAttrList(char *bname)
{ {
...@@ -203,13 +208,15 @@ setAttrList(char *bname) ...@@ -203,13 +208,15 @@ setAttrList(char *bname)
return; return;
} }
#endif
/* /*
* This routine defines the rule governing the append semantics of * This routine defines the rule governing the append semantics of
* versions. All tuples appended to a version gets appended to the * versions. All tuples appended to a version gets appended to the
* <vname>_added relation. * <vname>_added relation.
*/ */
void #ifdef NOT_USED
static void
VersionAppend(char *vname, char *bname) VersionAppend(char *vname, char *bname)
{ {
sprintf(rule_buf, sprintf(rule_buf,
...@@ -218,7 +225,7 @@ VersionAppend(char *vname, char *bname) ...@@ -218,7 +225,7 @@ VersionAppend(char *vname, char *bname)
eval_as_new_xact(rule_buf); eval_as_new_xact(rule_buf);
} }
#endif
/* /*
* This routine defines the rule governing the retrieval semantics of * This routine defines the rule governing the retrieval semantics of
...@@ -228,6 +235,7 @@ VersionAppend(char *vname, char *bname) ...@@ -228,6 +235,7 @@ VersionAppend(char *vname, char *bname)
* 2. Retrieve all tuples in the base relation which are not in * 2. Retrieve all tuples in the base relation which are not in
* the <vname>_del relation. * the <vname>_del relation.
*/ */
#ifdef NOT_USED
void void
VersionRetrieve(char *vname, char *bname, char *snapshot) VersionRetrieve(char *vname, char *bname, char *snapshot)
{ {
...@@ -245,6 +253,7 @@ where _%s.oid !!= '%s_del.DOID'", ...@@ -245,6 +253,7 @@ where _%s.oid !!= '%s_del.DOID'",
/* printf("%s\n",rule_buf); */ /* printf("%s\n",rule_buf); */
} }
#endif
/* /*
* This routine defines the rules that govern the delete semantics of * This routine defines the rules that govern the delete semantics of
...@@ -257,6 +266,7 @@ where _%s.oid !!= '%s_del.DOID'", ...@@ -257,6 +266,7 @@ where _%s.oid !!= '%s_del.DOID'",
* then we have to mark that tuple as being deleted by adding * then we have to mark that tuple as being deleted by adding
* it to the <vname>_del relation. * it to the <vname>_del relation.
*/ */
#ifdef NOT_USED
void void
VersionDelete(char *vname, char *bname, char *snapshot) VersionDelete(char *vname, char *bname, char *snapshot)
{ {
...@@ -280,6 +290,7 @@ bname,bname,snapshot,bname); ...@@ -280,6 +290,7 @@ bname,bname,snapshot,bname);
eval_as_new_xact(rule_buf); eval_as_new_xact(rule_buf);
#endif /* OLD_REWRITE */ #endif /* OLD_REWRITE */
} }
#endif
/* /*
* This routine defines the rules that govern the update semantics * This routine defines the rules that govern the update semantics
...@@ -293,6 +304,7 @@ bname,bname,snapshot,bname); ...@@ -293,6 +304,7 @@ bname,bname,snapshot,bname);
* adding the tuple to the <vname>_del relation. * adding the tuple to the <vname>_del relation.
* 2.2 A copy of the tuple is appended to the <vname>_added relation * 2.2 A copy of the tuple is appended to the <vname>_added relation
*/ */
#ifdef NOT_USED
void void
VersionReplace(char *vname, char *bname, char *snapshot) VersionReplace(char *vname, char *bname, char *snapshot)
{ {
...@@ -332,3 +344,4 @@ vname,attr_list,bname,bname,snapshot,vname,bname); ...@@ -332,3 +344,4 @@ vname,attr_list,bname,bname,snapshot,vname,bname);
} }
#endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.16 1997/08/12 22:52:15 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.17 1997/08/19 21:30:42 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -93,6 +93,9 @@ static Dllist *pendingNotifies = NULL; ...@@ -93,6 +93,9 @@ static Dllist *pendingNotifies = NULL;
static int AsyncExistsPendingNotify(char *); static int AsyncExistsPendingNotify(char *);
static void ClearPendingNotify(void); static void ClearPendingNotify(void);
static void Async_NotifyFrontEnd(void);
static void Async_Unlisten(char *relname, int pid);
static void Async_UnlistenOnExit(int code, char *relname);
/* /*
*-------------------------------------------------------------- *--------------------------------------------------------------
...@@ -478,7 +481,7 @@ Async_Listen(char *relname, int pid) ...@@ -478,7 +481,7 @@ Async_Listen(char *relname, int pid)
* *
*-------------------------------------------------------------- *--------------------------------------------------------------
*/ */
void static void
Async_Unlisten(char *relname, int pid) Async_Unlisten(char *relname, int pid)
{ {
Relation lDesc; Relation lDesc;
...@@ -498,7 +501,7 @@ Async_Unlisten(char *relname, int pid) ...@@ -498,7 +501,7 @@ Async_Unlisten(char *relname, int pid)
heap_close(lDesc); heap_close(lDesc);
} }
void static void
Async_UnlistenOnExit(int code, /* from exitpg */ Async_UnlistenOnExit(int code, /* from exitpg */
char *relname) char *relname)
{ {
...@@ -529,7 +532,7 @@ Async_UnlistenOnExit(int code, /* from exitpg */ ...@@ -529,7 +532,7 @@ Async_UnlistenOnExit(int code, /* from exitpg */
*/ */
GlobalMemory notifyContext = NULL; GlobalMemory notifyContext = NULL;
void static void
Async_NotifyFrontEnd() Async_NotifyFrontEnd()
{ {
extern CommandDest whereToSendOutput; extern CommandDest whereToSendOutput;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.12 1997/08/18 20:52:07 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.13 1997/08/19 21:30:45 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
#include <utils/acl.h> #include <utils/acl.h>
#endif /* !NO_SECURITY */ #endif /* !NO_SECURITY */
static Relation copy_heap(Oid OIDOldHeap);
static void copy_index(Oid OIDOldIndex, Oid OIDNewHeap);
static void rebuildheap(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex);
/* /*
* cluster * cluster
* *
...@@ -178,7 +182,7 @@ cluster(char oldrelname[], char oldindexname[]) ...@@ -178,7 +182,7 @@ cluster(char oldrelname[], char oldindexname[])
StartTransactionCommand(); StartTransactionCommand();
} }
Relation static Relation
copy_heap(Oid OIDOldHeap) copy_heap(Oid OIDOldHeap)
{ {
char NewName[NAMEDATALEN]; char NewName[NAMEDATALEN];
...@@ -219,7 +223,7 @@ copy_heap(Oid OIDOldHeap) ...@@ -219,7 +223,7 @@ copy_heap(Oid OIDOldHeap)
return NewHeap; return NewHeap;
} }
void static void
copy_index(Oid OIDOldIndex, Oid OIDNewHeap) copy_index(Oid OIDOldIndex, Oid OIDNewHeap)
{ {
Relation OldIndex, NewHeap; Relation OldIndex, NewHeap;
...@@ -309,7 +313,7 @@ copy_index(Oid OIDOldIndex, Oid OIDNewHeap) ...@@ -309,7 +313,7 @@ copy_index(Oid OIDOldIndex, Oid OIDNewHeap)
} }
void static void
rebuildheap(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex) rebuildheap(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex)
{ {
Relation LocalNewHeap, LocalOldHeap, LocalOldIndex; Relation LocalNewHeap, LocalOldHeap, LocalOldIndex;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.4 1996/11/08 00:45:54 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.5 1997/08/19 21:30:51 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -43,6 +43,10 @@ ...@@ -43,6 +43,10 @@
#include "access/heapam.h" #include "access/heapam.h"
#include "catalog/heap.h" #include "catalog/heap.h"
static Pointer ExecBeginScan(Relation relation, int nkeys, ScanKey skeys,
bool isindex, ScanDirection dir, TimeQual time_range);
static Relation ExecOpenR(Oid relationOid, bool isindex);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* ExecOpenScanR * ExecOpenScanR
* *
...@@ -99,7 +103,7 @@ ExecOpenScanR(Oid relOid, ...@@ -99,7 +103,7 @@ ExecOpenScanR(Oid relOid,
* returns a relation descriptor given an object id. * returns a relation descriptor given an object id.
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
Relation static Relation
ExecOpenR(Oid relationOid, bool isindex) ExecOpenR(Oid relationOid, bool isindex)
{ {
Relation relation; Relation relation;
...@@ -133,7 +137,7 @@ ExecOpenR(Oid relationOid, bool isindex) ...@@ -133,7 +137,7 @@ ExecOpenR(Oid relationOid, bool isindex)
* -cim 9/14/89 * -cim 9/14/89
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
Pointer static Pointer
ExecBeginScan(Relation relation, ExecBeginScan(Relation relation,
int nkeys, int nkeys,
ScanKey skeys, ScanKey skeys,
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/execFlatten.c,v 1.1.1.1 1996/07/09 06:21:24 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/Attic/execFlatten.c,v 1.2 1997/08/19 21:30:56 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -32,6 +32,11 @@ ...@@ -32,6 +32,11 @@
#include "executor/executor.h" #include "executor/executor.h"
#include "executor/execFlatten.h" #include "executor/execFlatten.h"
#ifdef SETS_FIXED
static bool FjoinBumpOuterNodes(TargetEntry *tlist, ExprContext *econtext,
DatumPtr results, char *nulls);
#endif
Datum Datum
ExecEvalIter(Iter *iterNode, ExecEvalIter(Iter *iterNode,
ExprContext *econtext, ExprContext *econtext,
...@@ -168,13 +173,13 @@ ExecEvalFjoin(TargetEntry *tlist, ...@@ -168,13 +173,13 @@ ExecEvalFjoin(TargetEntry *tlist,
return; return;
} }
bool #ifdef SETS_FIXED
static bool
FjoinBumpOuterNodes(TargetEntry *tlist, FjoinBumpOuterNodes(TargetEntry *tlist,
ExprContext *econtext, ExprContext *econtext,
DatumPtr results, DatumPtr results,
char *nulls) char *nulls)
{ {
#ifdef SETS_FIXED
bool funcIsDone = true; bool funcIsDone = true;
Fjoin *fjNode = tlist->fjoin; Fjoin *fjNode = tlist->fjoin;
char *alwaysDone = fjNode->fj_alwaysDone; char *alwaysDone = fjNode->fj_alwaysDone;
...@@ -231,6 +236,5 @@ FjoinBumpOuterNodes(TargetEntry *tlist, ...@@ -231,6 +236,5 @@ FjoinBumpOuterNodes(TargetEntry *tlist,
trailers = lnext(trailers); trailers = lnext(trailers);
} }
return false; return false;
#endif
return false;
} }
#endif
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.16 1997/08/19 04:43:45 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.17 1997/08/19 21:31:00 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -80,12 +80,14 @@ static int queryLimit = ALL_TUPLES; ...@@ -80,12 +80,14 @@ static int queryLimit = ALL_TUPLES;
#undef ALL_TUPLES #undef ALL_TUPLES
#define ALL_TUPLES queryLimit #define ALL_TUPLES queryLimit
#ifdef NOT_USED
int int
ExecutorLimit(int limit) ExecutorLimit(int limit)
{ {
return queryLimit = limit; return queryLimit = limit;
} }
#endif #endif
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* ExecutorStart * ExecutorStart
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.11 1997/04/22 03:32:35 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.12 1997/08/19 21:31:03 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -72,6 +72,19 @@ int execConstLen; ...@@ -72,6 +72,19 @@ int execConstLen;
static Datum ExecEvalAggreg(Aggreg *agg, ExprContext *econtext, bool *isNull); static Datum ExecEvalAggreg(Aggreg *agg, ExprContext *econtext, bool *isNull);
static Datum ExecEvalArrayRef(ArrayRef *arrayRef, ExprContext *econtext, static Datum ExecEvalArrayRef(ArrayRef *arrayRef, ExprContext *econtext,
bool *isNull, bool *isDone); bool *isNull, bool *isDone);
static Datum ExecEvalAnd(Expr *andExpr, ExprContext *econtext, bool *isNull);
static Datum ExecEvalFunc(Expr *funcClause, ExprContext *econtext,
bool *isNull, bool *isDone);
static void ExecEvalFuncArgs(FunctionCachePtr fcache, ExprContext *econtext,
List *argList, Datum argV[], bool *argIsDone);
static Datum ExecEvalNot(Expr *notclause, ExprContext *econtext, bool *isNull);
static Datum ExecEvalOper(Expr *opClause, ExprContext *econtext,
bool *isNull);
static Datum ExecEvalOr(Expr *orExpr, ExprContext *econtext, bool *isNull);
static Datum ExecEvalVar(Var *variable, ExprContext *econtext, bool *isNull);
static Datum ExecMakeFunctionResult(Node *node, List *arguments,
ExprContext *econtext, bool *isNull, bool *isDone);
static bool ExecQualClause(Node *clause, ExprContext *econtext);
/* -------------------------------- /* --------------------------------
* ExecEvalArrayRef * ExecEvalArrayRef
...@@ -201,7 +214,7 @@ ExecEvalAggreg(Aggreg *agg, ExprContext *econtext, bool *isNull) ...@@ -201,7 +214,7 @@ ExecEvalAggreg(Aggreg *agg, ExprContext *econtext, bool *isNull)
* We have an Assert to make sure this entry condition is met. * We have an Assert to make sure this entry condition is met.
* *
* ---------------------------------------------------------------- */ * ---------------------------------------------------------------- */
Datum static Datum
ExecEvalVar(Var *variable, ExprContext *econtext, bool *isNull) ExecEvalVar(Var *variable, ExprContext *econtext, bool *isNull)
{ {
Datum result; Datum result;
...@@ -460,7 +473,8 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull) ...@@ -460,7 +473,8 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
* to use this. Ex: overpaid(EMP) might call GetAttributeByNum(). * to use this. Ex: overpaid(EMP) might call GetAttributeByNum().
* ---------------- * ----------------
*/ */
char * #ifdef NOT_USED
static char *
GetAttributeByNum(TupleTableSlot *slot, GetAttributeByNum(TupleTableSlot *slot,
AttrNumber attrno, AttrNumber attrno,
bool *isNull) bool *isNull)
...@@ -492,8 +506,10 @@ GetAttributeByNum(TupleTableSlot *slot, ...@@ -492,8 +506,10 @@ GetAttributeByNum(TupleTableSlot *slot,
return (char *) NULL; return (char *) NULL;
return (char *) retval; return (char *) retval;
} }
#endif
/* XXX char16 name for catalogs */ /* XXX char16 name for catalogs */
#ifdef NOT_USED
char * char *
att_by_num(TupleTableSlot *slot, att_by_num(TupleTableSlot *slot,
AttrNumber attrno, AttrNumber attrno,
...@@ -501,6 +517,7 @@ att_by_num(TupleTableSlot *slot, ...@@ -501,6 +517,7 @@ att_by_num(TupleTableSlot *slot,
{ {
return(GetAttributeByNum(slot, attrno, isNull)); return(GetAttributeByNum(slot, attrno, isNull));
} }
#endif
char * char *
GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull) GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull)
...@@ -552,13 +569,15 @@ GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull) ...@@ -552,13 +569,15 @@ GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull)
} }
/* XXX char16 name for catalogs */ /* XXX char16 name for catalogs */
#ifdef NOT_USED
char * char *
att_by_name(TupleTableSlot *slot, char *attname, bool *isNull) att_by_name(TupleTableSlot *slot, char *attname, bool *isNull)
{ {
return(GetAttributeByName(slot, attname, isNull)); return(GetAttributeByName(slot, attname, isNull));
} }
#endif
void static void
ExecEvalFuncArgs(FunctionCachePtr fcache, ExecEvalFuncArgs(FunctionCachePtr fcache,
ExprContext *econtext, ExprContext *econtext,
List *argList, List *argList,
...@@ -603,7 +622,7 @@ ExecEvalFuncArgs(FunctionCachePtr fcache, ...@@ -603,7 +622,7 @@ ExecEvalFuncArgs(FunctionCachePtr fcache,
* ExecMakeFunctionResult * ExecMakeFunctionResult
* ---------------- * ----------------
*/ */
Datum static Datum
ExecMakeFunctionResult(Node *node, ExecMakeFunctionResult(Node *node,
List *arguments, List *arguments,
ExprContext *econtext, ExprContext *econtext,
...@@ -785,7 +804,7 @@ ExecMakeFunctionResult(Node *node, ...@@ -785,7 +804,7 @@ ExecMakeFunctionResult(Node *node,
* ExecEvalOper * ExecEvalOper
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
Datum static Datum
ExecEvalOper(Expr *opClause, ExprContext *econtext, bool *isNull) ExecEvalOper(Expr *opClause, ExprContext *econtext, bool *isNull)
{ {
Oper *op; Oper *op;
...@@ -829,7 +848,7 @@ ExecEvalOper(Expr *opClause, ExprContext *econtext, bool *isNull) ...@@ -829,7 +848,7 @@ ExecEvalOper(Expr *opClause, ExprContext *econtext, bool *isNull)
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
Datum static Datum
ExecEvalFunc(Expr *funcClause, ExecEvalFunc(Expr *funcClause,
ExprContext *econtext, ExprContext *econtext,
bool *isNull, bool *isNull,
...@@ -883,7 +902,7 @@ ExecEvalFunc(Expr *funcClause, ...@@ -883,7 +902,7 @@ ExecEvalFunc(Expr *funcClause,
* need to know this, mind you... * need to know this, mind you...
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
Datum static Datum
ExecEvalNot(Expr *notclause, ExprContext *econtext, bool *isNull) ExecEvalNot(Expr *notclause, ExprContext *econtext, bool *isNull)
{ {
Datum expr_value; Datum expr_value;
...@@ -922,7 +941,7 @@ ExecEvalNot(Expr *notclause, ExprContext *econtext, bool *isNull) ...@@ -922,7 +941,7 @@ ExecEvalNot(Expr *notclause, ExprContext *econtext, bool *isNull)
* ExecEvalOr * ExecEvalOr
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
Datum static Datum
ExecEvalOr(Expr *orExpr, ExprContext *econtext, bool *isNull) ExecEvalOr(Expr *orExpr, ExprContext *econtext, bool *isNull)
{ {
List *clauses; List *clauses;
...@@ -985,7 +1004,7 @@ ExecEvalOr(Expr *orExpr, ExprContext *econtext, bool *isNull) ...@@ -985,7 +1004,7 @@ ExecEvalOr(Expr *orExpr, ExprContext *econtext, bool *isNull)
* ExecEvalAnd * ExecEvalAnd
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
Datum static Datum
ExecEvalAnd(Expr *andExpr, ExprContext *econtext, bool *isNull) ExecEvalAnd(Expr *andExpr, ExprContext *econtext, bool *isNull)
{ {
List *clauses; List *clauses;
...@@ -1168,7 +1187,7 @@ ExecEvalExpr(Node *expression, ...@@ -1168,7 +1187,7 @@ ExecEvalExpr(Node *expression,
* rest of the qualification) * rest of the qualification)
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
bool static bool
ExecQualClause(Node *clause, ExprContext *econtext) ExecQualClause(Node *clause, ExprContext *econtext)
{ {
Datum expr_value; Datum expr_value;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.5 1996/12/11 00:26:38 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.6 1997/08/19 21:31:05 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -131,6 +131,9 @@ ...@@ -131,6 +131,9 @@
#include "parser/catalog_utils.h" #include "parser/catalog_utils.h"
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
static TupleTableSlot *NodeGetResultTupleSlot(Plan *node);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* tuple table create/delete functions * tuple table create/delete functions
* ---------------------------------------------------------------- * ----------------------------------------------------------------
...@@ -428,11 +431,13 @@ ExecClearTuple(TupleTableSlot* slot) /* slot in which to store tuple */ ...@@ -428,11 +431,13 @@ ExecClearTuple(TupleTableSlot* slot) /* slot in which to store tuple */
* merge joins that you need to diddle the slot policy. * merge joins that you need to diddle the slot policy.
* -------------------------------- * --------------------------------
*/ */
#ifdef NOT_USED
bool /* return: slot policy */ bool /* return: slot policy */
ExecSlotPolicy(TupleTableSlot* slot) /* slot to inspect */ ExecSlotPolicy(TupleTableSlot* slot) /* slot to inspect */
{ {
return slot->ttc_shouldFree; return slot->ttc_shouldFree;
} }
#endif
/* -------------------------------- /* --------------------------------
* ExecSetSlotPolicy * ExecSetSlotPolicy
...@@ -500,6 +505,7 @@ ExecSetSlotDescriptorIsNew(TupleTableSlot *slot,/* slot to change */ ...@@ -500,6 +505,7 @@ ExecSetSlotDescriptorIsNew(TupleTableSlot *slot,/* slot to change */
* with the slot's tuple, and set the "isNew" flag at the same time. * with the slot's tuple, and set the "isNew" flag at the same time.
* -------------------------------- * --------------------------------
*/ */
#ifdef NOT_USED
TupleDesc /* return: old slot tuple descriptor */ TupleDesc /* return: old slot tuple descriptor */
ExecSetNewSlotDescriptor(TupleTableSlot *slot, /* slot to change */ ExecSetNewSlotDescriptor(TupleTableSlot *slot, /* slot to change */
TupleDesc tupdesc) /* tuple descriptor */ TupleDesc tupdesc) /* tuple descriptor */
...@@ -510,6 +516,7 @@ ExecSetNewSlotDescriptor(TupleTableSlot *slot, /* slot to change */ ...@@ -510,6 +516,7 @@ ExecSetNewSlotDescriptor(TupleTableSlot *slot, /* slot to change */
return old_tupdesc; return old_tupdesc;
} }
#endif
/* -------------------------------- /* --------------------------------
* ExecSlotBuffer * ExecSlotBuffer
...@@ -532,6 +539,7 @@ ExecSetNewSlotDescriptor(TupleTableSlot *slot, /* slot to change */ ...@@ -532,6 +539,7 @@ ExecSetNewSlotDescriptor(TupleTableSlot *slot, /* slot to change */
* also use ExecIncrSlotBufferRefcnt(). * also use ExecIncrSlotBufferRefcnt().
* -------------------------------- * --------------------------------
*/ */
#ifdef NOT_USED
Buffer /* return: old slot buffer */ Buffer /* return: old slot buffer */
ExecSetSlotBuffer(TupleTableSlot *slot, /* slot to change */ ExecSetSlotBuffer(TupleTableSlot *slot, /* slot to change */
Buffer b) /* tuple descriptor */ Buffer b) /* tuple descriptor */
...@@ -541,6 +549,7 @@ ExecSetSlotBuffer(TupleTableSlot *slot, /* slot to change */ ...@@ -541,6 +549,7 @@ ExecSetSlotBuffer(TupleTableSlot *slot, /* slot to change */
return oldb; return oldb;
} }
#endif
/* -------------------------------- /* --------------------------------
* ExecIncrSlotBufferRefcnt * ExecIncrSlotBufferRefcnt
...@@ -602,6 +611,7 @@ TupIsNull(TupleTableSlot* slot) /* slot to check */ ...@@ -602,6 +611,7 @@ TupIsNull(TupleTableSlot* slot) /* slot to check */
* now storing a new type of tuple in this slot * now storing a new type of tuple in this slot
* -------------------------------- * --------------------------------
*/ */
#ifdef NOT_USED
bool /* return: descriptor "is new" */ bool /* return: descriptor "is new" */
ExecSlotDescriptorIsNew(TupleTableSlot *slot) /* slot to inspect */ ExecSlotDescriptorIsNew(TupleTableSlot *slot) /* slot to inspect */
{ {
...@@ -609,6 +619,7 @@ ExecSlotDescriptorIsNew(TupleTableSlot *slot) /* slot to inspect */ ...@@ -609,6 +619,7 @@ ExecSlotDescriptorIsNew(TupleTableSlot *slot) /* slot to inspect */
return isNew; */ return isNew; */
return slot->ttc_descIsNew; return slot->ttc_descIsNew;
} }
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* convenience initialization routines * convenience initialization routines
...@@ -686,6 +697,7 @@ ExecInitOuterTupleSlot(EState *estate, HashJoinState *hashstate) ...@@ -686,6 +697,7 @@ ExecInitOuterTupleSlot(EState *estate, HashJoinState *hashstate)
* ExecInitHashTupleSlot * ExecInitHashTupleSlot
* ---------------- * ----------------
*/ */
#ifdef NOT_USED
void void
ExecInitHashTupleSlot(EState *estate, HashJoinState *hashstate) ExecInitHashTupleSlot(EState *estate, HashJoinState *hashstate)
{ {
...@@ -693,8 +705,9 @@ ExecInitHashTupleSlot(EState *estate, HashJoinState *hashstate) ...@@ -693,8 +705,9 @@ ExecInitHashTupleSlot(EState *estate, HashJoinState *hashstate)
INIT_SLOT_ALLOC; INIT_SLOT_ALLOC;
hashstate->hj_HashTupleSlot = slot; hashstate->hj_HashTupleSlot = slot;
} }
#endif
TupleTableSlot * static TupleTableSlot *
NodeGetResultTupleSlot(Plan *node) NodeGetResultTupleSlot(Plan *node)
{ {
TupleTableSlot *slot; TupleTableSlot *slot;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.10 1997/08/18 20:52:27 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.11 1997/08/19 21:31:06 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -58,6 +58,9 @@ ...@@ -58,6 +58,9 @@
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "parser/parsetree.h" #include "parser/parsetree.h"
static void ExecGetIndexKeyInfo(IndexTupleForm indexTuple, int *numAttsOutP,
AttrNumber **attsOutP, FuncIndexInfoPtr fInfoP);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* global counters for number of tuples processed, retrieved, * global counters for number of tuples processed, retrieved,
* appended, replaced, deleted. * appended, replaced, deleted.
...@@ -82,6 +85,7 @@ extern int NIndexTupleProcessed; /* have to be defined in the access ...@@ -82,6 +85,7 @@ extern int NIndexTupleProcessed; /* have to be defined in the access
* ResetTupleCount * ResetTupleCount
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
#ifdef NOT_USED
void void
ResetTupleCount(void) ResetTupleCount(void)
{ {
...@@ -92,11 +96,13 @@ ResetTupleCount(void) ...@@ -92,11 +96,13 @@ ResetTupleCount(void)
NTupleReplaced = 0; NTupleReplaced = 0;
NIndexTupleProcessed = 0; NIndexTupleProcessed = 0;
} }
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* PrintTupleCount * PrintTupleCount
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
#ifdef NOT_USED
void void
DisplayTupleCount(FILE *statfp) DisplayTupleCount(FILE *statfp)
{ {
...@@ -127,6 +133,7 @@ DisplayTupleCount(FILE *statfp) ...@@ -127,6 +133,7 @@ DisplayTupleCount(FILE *statfp)
(NTupleReplaced == 1) ? "" : "s"); (NTupleReplaced == 1) ? "" : "s");
fprintf(statfp, "\n"); fprintf(statfp, "\n");
} }
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* miscellanious init node support functions * miscellanious init node support functions
...@@ -287,6 +294,7 @@ ExecGetResultType(CommonState *commonstate) ...@@ -287,6 +294,7 @@ ExecGetResultType(CommonState *commonstate)
* ExecFreeResultType * ExecFreeResultType
* ---------------- * ----------------
*/ */
#ifdef NOT_USED
void void
ExecFreeResultType(CommonState *commonstate) ExecFreeResultType(CommonState *commonstate)
{ {
...@@ -299,7 +307,7 @@ ExecFreeResultType(CommonState *commonstate) ...@@ -299,7 +307,7 @@ ExecFreeResultType(CommonState *commonstate)
/* ExecFreeTypeInfo(tupType); */ /* ExecFreeTypeInfo(tupType); */
pfree(tupType); pfree(tupType);
} }
#endif
/* ---------------- /* ----------------
* ExecAssignProjectionInfo * ExecAssignProjectionInfo
...@@ -382,6 +390,7 @@ ExecGetScanType(CommonScanState *csstate) ...@@ -382,6 +390,7 @@ ExecGetScanType(CommonScanState *csstate)
* ExecFreeScanType * ExecFreeScanType
* ---------------- * ----------------
*/ */
#ifdef NOT_USED
void void
ExecFreeScanType(CommonScanState *csstate) ExecFreeScanType(CommonScanState *csstate)
{ {
...@@ -394,6 +403,7 @@ ExecFreeScanType(CommonScanState *csstate) ...@@ -394,6 +403,7 @@ ExecFreeScanType(CommonScanState *csstate)
/* ExecFreeTypeInfo(tupType); */ /* ExecFreeTypeInfo(tupType); */
pfree(tupType); pfree(tupType);
} }
#endif
/* ---------------- /* ----------------
* ExecAssignScanType * ExecAssignScanType
...@@ -581,7 +591,7 @@ QueryDescGetTypeInfo(QueryDesc *queryDesc) ...@@ -581,7 +591,7 @@ QueryDescGetTypeInfo(QueryDesc *queryDesc)
* parameters. * parameters.
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
void static void
ExecGetIndexKeyInfo(IndexTupleForm indexTuple, ExecGetIndexKeyInfo(IndexTupleForm indexTuple,
int *numAttsOutP, int *numAttsOutP,
AttrNumber **attsOutP, AttrNumber **attsOutP,
...@@ -938,6 +948,7 @@ ExecCloseIndices(RelationInfo *resultRelationInfo) ...@@ -938,6 +948,7 @@ ExecCloseIndices(RelationInfo *resultRelationInfo)
* set of routines.. * set of routines..
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
#ifdef NOT_USED
IndexTuple IndexTuple
ExecFormIndexTuple(HeapTuple heapTuple, ExecFormIndexTuple(HeapTuple heapTuple,
Relation heapRelation, Relation heapRelation,
...@@ -1011,6 +1022,7 @@ ExecFormIndexTuple(HeapTuple heapTuple, ...@@ -1011,6 +1022,7 @@ ExecFormIndexTuple(HeapTuple heapTuple,
return indexTuple; return indexTuple;
} }
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* ExecInsertIndexTuples * ExecInsertIndexTuples
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.4 1996/11/06 06:47:39 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.5 1997/08/19 21:31:07 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -64,6 +64,8 @@ ...@@ -64,6 +64,8 @@
#include "utils/mcxt.h" #include "utils/mcxt.h"
#include "parser/parsetree.h" /* for rt_store() macro */ #include "parser/parsetree.h" /* for rt_store() macro */
static bool exec_append_initialize_next(Append *node);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* exec-append-initialize-next * exec-append-initialize-next
* *
...@@ -73,7 +75,7 @@ ...@@ -73,7 +75,7 @@
* Returns t iff there is a "next" scan to process. * Returns t iff there is a "next" scan to process.
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
bool static bool
exec_append_initialize_next(Append *node) exec_append_initialize_next(Append *node)
{ {
EState *estate; EState *estate;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.9 1997/07/28 00:53:58 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.10 1997/08/19 21:31:08 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -47,6 +47,11 @@ static int HashTBSize; ...@@ -47,6 +47,11 @@ static int HashTBSize;
static void mk_hj_temp(char *tempname); static void mk_hj_temp(char *tempname);
static int hashFunc(char *key, int len); static int hashFunc(char *key, int len);
static int ExecHashPartition(Hash *node);
static RelativeAddr hashTableAlloc(int size, HashJoinTable hashtable);
static void ExecHashOverflowInsert(HashJoinTable hashtable,
HashBucket bucket,
HeapTuple heapTuple);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* ExecHash * ExecHash
...@@ -258,7 +263,7 @@ ExecEndHash(Hash *node) ...@@ -258,7 +263,7 @@ ExecEndHash(Hash *node)
ExecEndNode(outerPlan, (Plan*)node); ExecEndNode(outerPlan, (Plan*)node);
} }
RelativeAddr static RelativeAddr
hashTableAlloc(int size, HashJoinTable hashtable) hashTableAlloc(int size, HashJoinTable hashtable)
{ {
RelativeAddr p; RelativeAddr p;
...@@ -577,7 +582,7 @@ ExecHashGetBucket(HashJoinTable hashtable, ...@@ -577,7 +582,7 @@ ExecHashGetBucket(HashJoinTable hashtable,
* insert into the overflow area of a hash bucket * insert into the overflow area of a hash bucket
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
void static void
ExecHashOverflowInsert(HashJoinTable hashtable, ExecHashOverflowInsert(HashJoinTable hashtable,
HashBucket bucket, HashBucket bucket,
HeapTuple heapTuple) HeapTuple heapTuple)
...@@ -790,7 +795,7 @@ hashFunc(char *key, int len) ...@@ -790,7 +795,7 @@ hashFunc(char *key, int len)
* determine the number of batches needed for a hashjoin * determine the number of batches needed for a hashjoin
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
int static int
ExecHashPartition(Hash *node) ExecHashPartition(Hash *node)
{ {
Plan *outerNode; Plan *outerNode;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.4 1997/07/28 00:54:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.5 1997/08/19 21:31:09 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -39,6 +39,13 @@ static TupleTableSlot * ...@@ -39,6 +39,13 @@ static TupleTableSlot *
ExecHashJoinGetSavedTuple(HashJoinState *hjstate, char *buffer, ExecHashJoinGetSavedTuple(HashJoinState *hjstate, char *buffer,
File file, TupleTableSlot *tupleSlot, int *block, char **position); File file, TupleTableSlot *tupleSlot, int *block, char **position);
static int ExecHashJoinGetBatch(int bucketno, HashJoinTable hashtable,
int nbatch);
static int ExecHashJoinNewBatch(HashJoinState *hjstate);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* ExecHashJoin * ExecHashJoin
* *
...@@ -624,7 +631,7 @@ ExecHashJoinGetSavedTuple(HashJoinState *hjstate, ...@@ -624,7 +631,7 @@ ExecHashJoinGetSavedTuple(HashJoinState *hjstate,
* switch to a new hashjoin batch * switch to a new hashjoin batch
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
int static int
ExecHashJoinNewBatch(HashJoinState *hjstate) ExecHashJoinNewBatch(HashJoinState *hjstate)
{ {
File *innerBatches; File *innerBatches;
...@@ -742,7 +749,7 @@ ExecHashJoinNewBatch(HashJoinState *hjstate) ...@@ -742,7 +749,7 @@ ExecHashJoinNewBatch(HashJoinState *hjstate)
* batch 0 1 2 ... * batch 0 1 2 ...
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
int static int
ExecHashJoinGetBatch(int bucketno, HashJoinTable hashtable, int nbatch) ExecHashJoinGetBatch(int bucketno, HashJoinTable hashtable, int nbatch)
{ {
int b; int b;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.7 1997/08/12 22:52:38 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.8 1997/08/19 21:31:10 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -84,6 +84,8 @@ ...@@ -84,6 +84,8 @@
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
#include "utils/psort.h" #include "utils/psort.h"
static bool MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* MarkInnerTuple and RestoreInnerTuple macros * MarkInnerTuple and RestoreInnerTuple macros
* *
...@@ -251,7 +253,7 @@ MJFormISortopO(List *qualList, Oid sortOp) ...@@ -251,7 +253,7 @@ MJFormISortopO(List *qualList, Oid sortOp)
* if (key1i > key2i) is true and (key1j = key2j) for 0 < j < i. * if (key1i > key2i) is true and (key1j = key2j) for 0 < j < i.
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
bool static bool
MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext) MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext)
{ {
List *clause; List *clause;
...@@ -319,6 +321,7 @@ MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext) ...@@ -319,6 +321,7 @@ MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext)
* when EXEC_MERGEJOINDEBUG is defined * when EXEC_MERGEJOINDEBUG is defined
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
#ifdef EXEC_MERGEJOINDEBUG
void void
ExecMergeTupleDumpInner(ExprContext *econtext) ExecMergeTupleDumpInner(ExprContext *econtext)
{ {
...@@ -332,7 +335,7 @@ ExecMergeTupleDumpInner(ExprContext *econtext) ...@@ -332,7 +335,7 @@ ExecMergeTupleDumpInner(ExprContext *econtext)
debugtup(innerSlot->val, debugtup(innerSlot->val,
innerSlot->ttc_tupleDescriptor); innerSlot->ttc_tupleDescriptor);
} }
void void
ExecMergeTupleDumpOuter(ExprContext *econtext) ExecMergeTupleDumpOuter(ExprContext *econtext)
{ {
...@@ -346,7 +349,7 @@ ExecMergeTupleDumpOuter(ExprContext *econtext) ...@@ -346,7 +349,7 @@ ExecMergeTupleDumpOuter(ExprContext *econtext)
debugtup(outerSlot->val, debugtup(outerSlot->val,
outerSlot->ttc_tupleDescriptor); outerSlot->ttc_tupleDescriptor);
} }
void void
ExecMergeTupleDumpMarked(ExprContext *econtext, ExecMergeTupleDumpMarked(ExprContext *econtext,
MergeJoinState *mergestate) MergeJoinState *mergestate)
...@@ -362,7 +365,7 @@ ExecMergeTupleDumpMarked(ExprContext *econtext, ...@@ -362,7 +365,7 @@ ExecMergeTupleDumpMarked(ExprContext *econtext,
debugtup(markedSlot->val, debugtup(markedSlot->val,
markedSlot->ttc_tupleDescriptor); markedSlot->ttc_tupleDescriptor);
} }
void void
ExecMergeTupleDump(ExprContext *econtext, MergeJoinState *mergestate) ExecMergeTupleDump(ExprContext *econtext, MergeJoinState *mergestate)
{ {
...@@ -374,6 +377,7 @@ ExecMergeTupleDump(ExprContext *econtext, MergeJoinState *mergestate) ...@@ -374,6 +377,7 @@ ExecMergeTupleDump(ExprContext *econtext, MergeJoinState *mergestate)
printf("******** \n"); printf("******** \n");
} }
#endif
static void static void
CleanUpSort(Plan *plan) { CleanUpSort(Plan *plan) {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.3 1996/11/08 05:56:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.4 1997/08/19 21:31:12 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -30,6 +30,11 @@ ...@@ -30,6 +30,11 @@
#include "access/heapam.h" #include "access/heapam.h"
#include "parser/parsetree.h" #include "parser/parsetree.h"
static Oid InitScanRelation(SeqScan *node, EState *estate,
CommonScanState *scanstate, Plan *outerPlan);
static TupleTableSlot *SeqNext(SeqScan *node);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* Scan Support * Scan Support
* ---------------------------------------------------------------- * ----------------------------------------------------------------
...@@ -40,7 +45,7 @@ ...@@ -40,7 +45,7 @@
* This is a workhorse for ExecSeqScan * This is a workhorse for ExecSeqScan
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
TupleTableSlot * static TupleTableSlot *
SeqNext(SeqScan *node) SeqNext(SeqScan *node)
{ {
HeapTuple tuple; HeapTuple tuple;
...@@ -139,7 +144,7 @@ S1_printf("ExecSeqScan: returned tuple slot: %d\n", slot); ...@@ -139,7 +144,7 @@ S1_printf("ExecSeqScan: returned tuple slot: %d\n", slot);
* subplans of scans. * subplans of scans.
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
Oid static Oid
InitScanRelation(SeqScan *node, EState *estate, InitScanRelation(SeqScan *node, EState *estate,
CommonScanState *scanstate, Plan *outerPlan) CommonScanState *scanstate, Plan *outerPlan)
{ {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.4 1996/11/10 03:00:20 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.5 1997/08/19 21:31:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -67,6 +67,7 @@ DLGetHead(Dllist* l) ...@@ -67,6 +67,7 @@ DLGetHead(Dllist* l)
} }
/* get the value stored in the first element */ /* get the value stored in the first element */
#ifdef NOT_USED
void* void*
DLGetHeadVal(Dllist* l) DLGetHeadVal(Dllist* l)
{ {
...@@ -74,6 +75,7 @@ DLGetHeadVal(Dllist* l) ...@@ -74,6 +75,7 @@ DLGetHeadVal(Dllist* l)
return (e ? e->dle_val : 0); return (e ? e->dle_val : 0);
} }
#endif
Dlelem* Dlelem*
DLGetTail(Dllist* l) DLGetTail(Dllist* l)
...@@ -82,6 +84,7 @@ DLGetTail(Dllist* l) ...@@ -82,6 +84,7 @@ DLGetTail(Dllist* l)
} }
/* get the value stored in the first element */ /* get the value stored in the first element */
#ifdef NOT_USED
void* void*
DLGetTailVal(Dllist* l) DLGetTailVal(Dllist* l)
{ {
...@@ -89,7 +92,7 @@ DLGetTailVal(Dllist* l) ...@@ -89,7 +92,7 @@ DLGetTailVal(Dllist* l)
return (e ? e->dle_val : 0); return (e ? e->dle_val : 0);
} }
#endif
Dlelem* Dlelem*
DLGetPred(Dlelem* e) /* get predecessor */ DLGetPred(Dlelem* e) /* get predecessor */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/lispsort.c,v 1.3 1996/11/06 08:27:14 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/lib/Attic/lispsort.c,v 1.4 1997/08/19 21:31:18 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <lib/lispsort.h> #include <lib/lispsort.h>
#include <lib/qsort.h> #include <lib/qsort.h>
#ifdef NOT_USED
/* /*
** lisp_qsort: Takes a lisp list as input, copies it into an array of lisp ** lisp_qsort: Takes a lisp list as input, copies it into an array of lisp
** nodes which it sorts via qsort() with the comparison function ** nodes which it sorts via qsort() with the comparison function
...@@ -57,3 +58,4 @@ List *lisp_qsort(List *the_list, /* the list to be sorted */ ...@@ -57,3 +58,4 @@ List *lisp_qsort(List *the_list, /* the list to be sorted */
return(output); return(output);
} }
#endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.13 1997/08/12 22:52:45 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.14 1997/08/19 21:31:23 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -72,6 +72,8 @@ ...@@ -72,6 +72,8 @@
#include <libpq/hba.h> #include <libpq/hba.h>
#include <libpq/password.h> #include <libpq/password.h>
static int be_getauthsvc(MsgType msgtype);
/*---------------------------------------------------------------- /*----------------------------------------------------------------
* common definitions for generic fe/be routines * common definitions for generic fe/be routines
*---------------------------------------------------------------- *----------------------------------------------------------------
...@@ -586,7 +588,7 @@ be_setauthsvc(char *name) ...@@ -586,7 +588,7 @@ be_setauthsvc(char *name)
return; return;
} }
int static int
be_getauthsvc(MsgType msgtype) be_getauthsvc(MsgType msgtype)
{ {
int i; int i;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.3 1997/08/12 20:15:19 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.4 1997/08/19 21:31:31 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
# include <string.h> # include <string.h>
#endif #endif
static char *strmake(char *str, int len);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* PQ interface routines * PQ interface routines
* ---------------------------------------------------------------- * ----------------------------------------------------------------
...@@ -215,7 +217,7 @@ pqtest_PQexec(char *q) ...@@ -215,7 +217,7 @@ pqtest_PQexec(char *q)
* utilities for pqtest_PQfn() * utilities for pqtest_PQfn()
* ---------------- * ----------------
*/ */
char * static char *
strmake(char *str, int len) strmake(char *str, int len)
{ {
char *newstr; char *newstr;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.5 1997/01/10 20:17:43 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.6 1997/08/19 21:31:36 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include "utils/elog.h" #include "utils/elog.h"
#include "storage/itemptr.h" #include "storage/itemptr.h"
static bool equali(List *a, List *b);
/* /*
* Stuff from primnodes.h * Stuff from primnodes.h
*/ */
...@@ -703,7 +705,8 @@ equal(void *a, void *b) ...@@ -703,7 +705,8 @@ equal(void *a, void *b)
* *
* XXX temp hack. needs something like T_IntList * XXX temp hack. needs something like T_IntList
*/ */
bool equali(List *a, List *b) static bool
equali(List *a, List *b)
{ {
List *la = (List*)a; List *la = (List*)a;
List *lb = (List*)b; List *lb = (List*)b;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.3 1997/03/12 20:59:27 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.4 1997/08/19 21:31:39 momjian Exp $
* *
* NOTES * NOTES
* XXX a few of the following functions are duplicated to handle * XXX a few of the following functions are duplicated to handle
...@@ -408,6 +408,7 @@ LispRemove(void *elem, List *list) ...@@ -408,6 +408,7 @@ LispRemove(void *elem, List *list)
return(list); return(list);
} }
#ifdef NOT_USED
List * List *
intLispRemove(int elem, List *list) intLispRemove(int elem, List *list)
{ {
...@@ -429,6 +430,7 @@ intLispRemove(int elem, List *list) ...@@ -429,6 +430,7 @@ intLispRemove(int elem, List *list)
} }
return(list); return(list);
} }
#endif
List * List *
set_difference(List *list1, List *list2) set_difference(List *list1, List *list2)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.2 1996/10/31 10:42:56 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.3 1997/08/19 21:31:41 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include "nodes/nodeFuncs.h" #include "nodes/nodeFuncs.h"
#include "utils/lsyscache.h" #include "utils/lsyscache.h"
static bool var_is_inner(Var *var);
/* /*
* single_node - * single_node -
* Returns t if node corresponds to a single-noded expression * Returns t if node corresponds to a single-noded expression
...@@ -61,7 +63,7 @@ var_is_outer (Var *var) ...@@ -61,7 +63,7 @@ var_is_outer (Var *var)
return((bool)(var->varno == OUTER)); return((bool)(var->varno == OUTER));
} }
bool static bool
var_is_inner (Var *var) var_is_inner (Var *var)
{ {
return ( (bool) (var->varno == INNER)); return ( (bool) (var->varno == INNER));
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.5 1997/08/12 20:15:27 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.6 1997/08/19 21:31:43 momjian Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
#include "nodes/nodes.h" #include "nodes/nodes.h"
#include "nodes/plannodes.h" #include "nodes/plannodes.h"
#include "optimizer/clauses.h" #include "optimizer/clauses.h"
static char *plannode_type (Plan* p);
/* /*
* print-- * print--
* print contents of Node to stdout * print contents of Node to stdout
...@@ -258,7 +261,7 @@ print_slot(TupleTableSlot *slot) ...@@ -258,7 +261,7 @@ print_slot(TupleTableSlot *slot)
debugtup(slot->val, slot->ttc_tupleDescriptor); debugtup(slot->val, slot->ttc_tupleDescriptor);
} }
char* static char *
plannode_type (Plan* p) plannode_type (Plan* p)
{ {
switch(nodeTag(p)) { switch(nodeTag(p)) {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.15 1997/04/24 15:49:30 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.16 1997/08/19 21:31:48 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -41,6 +41,7 @@ extern int NBuffers; ...@@ -41,6 +41,7 @@ extern int NBuffers;
static int compute_attribute_width(TargetEntry *tlistentry); static int compute_attribute_width(TargetEntry *tlistentry);
static double base_log(double x, double b); static double base_log(double x, double b);
static int compute_targetlist_width(List *targetlist);
int _disable_cost_ = 30000000; int _disable_cost_ = 30000000;
...@@ -209,6 +210,7 @@ cost_sort(List *keys, int tuples, int width, bool noread) ...@@ -209,6 +210,7 @@ cost_sort(List *keys, int tuples, int width, bool noread)
* Returns a flonum. * Returns a flonum.
* *
*/ */
#ifdef NOT_USED
Cost Cost
cost_result(int tuples, int width) cost_result(int tuples, int width)
{ {
...@@ -218,6 +220,7 @@ cost_result(int tuples, int width) ...@@ -218,6 +220,7 @@ cost_result(int tuples, int width)
Assert(temp >= 0); Assert(temp >= 0);
return(temp); return(temp);
} }
#endif
/* /*
* cost_nestloop-- * cost_nestloop--
...@@ -386,7 +389,7 @@ compute_rel_width(Rel *rel) ...@@ -386,7 +389,7 @@ compute_rel_width(Rel *rel)
* *
* Returns the width of the tuple as a fixnum. * Returns the width of the tuple as a fixnum.
*/ */
int static int
compute_targetlist_width(List *targetlist) compute_targetlist_width(List *targetlist)
{ {
List *temp_tl; List *temp_tl;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.6 1997/01/22 06:30:57 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.7 1997/08/19 21:31:54 momjian Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include "optimizer/internal.h" #include "optimizer/internal.h"
#include "optimizer/var.h" #include "optimizer/var.h"
static bool agg_clause(Node *clause);
Expr * Expr *
make_clause(int type, Node *oper, List *args) make_clause(int type, Node *oper, List *args)
...@@ -134,7 +136,7 @@ get_rightop(Expr *clause) ...@@ -134,7 +136,7 @@ get_rightop(Expr *clause)
* AGG clause functions * AGG clause functions
*****************************************************************************/ *****************************************************************************/
bool static bool
agg_clause(Node *clause) agg_clause(Node *clause)
{ {
return return
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.1.1.1 1996/07/09 06:21:38 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.2 1997/08/19 21:32:03 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
static Expr *matching2_tlvar(int var, List *tlist, bool (*test)()); static Expr *matching2_tlvar(int var, List *tlist, bool (*test)());
static bool equal_indexkey_var(int index_key, Var *var);
/* /*
* 1. index key * 1. index key
...@@ -69,7 +70,7 @@ match_indexkey_operand(int indexkey, Var *operand, Rel *rel) ...@@ -69,7 +70,7 @@ match_indexkey_operand(int indexkey, Var *operand, Rel *rel)
* fields of var node 'var'. * fields of var node 'var'.
* *
*/ */
bool static bool
equal_indexkey_var(int index_key, Var *var) equal_indexkey_var(int index_key, Var *var)
{ {
if (index_key == var->varattno) if (index_key == var->varattno)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.2 1996/10/31 10:59:41 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.3 1997/08/19 21:32:06 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "optimizer/internal.h" #include "optimizer/internal.h"
#include "optimizer/ordering.h" #include "optimizer/ordering.h"
static bool equal_sortops_order(Oid *ordering1, Oid *ordering2);
/* /*
* equal-path-path-ordering-- * equal-path-path-ordering--
...@@ -102,7 +103,7 @@ equal_merge_merge_ordering(MergeOrder *merge_ordering1, ...@@ -102,7 +103,7 @@ equal_merge_merge_ordering(MergeOrder *merge_ordering1,
* equal_sort_ops_order - * equal_sort_ops_order -
* Returns true iff the sort operators are in the same order. * Returns true iff the sort operators are in the same order.
*/ */
bool static bool
equal_sortops_order(Oid *ordering1, Oid *ordering2) equal_sortops_order(Oid *ordering1, Oid *ordering2)
{ {
int i = 0; int i = 0;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.2 1997/04/05 06:39:58 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.3 1997/08/19 21:32:08 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -532,10 +532,10 @@ get_expr(TargetEntry *tle) ...@@ -532,10 +532,10 @@ get_expr(TargetEntry *tle)
* append the group attribute to the target list if it's not already * append the group attribute to the target list if it's not already
* in there. * in there.
*/ */
#if 0
void void
AddGroupAttrToTlist(List *tlist, List *grpCl) AddGroupAttrToTlist(List *tlist, List *grpCl)
{ {
#if 0
List *gl; List *gl;
int last_resdomno = length(tlist) + 1; int last_resdomno = length(tlist) + 1;
...@@ -557,8 +557,8 @@ AddGroupAttrToTlist(List *tlist, List *grpCl) ...@@ -557,8 +557,8 @@ AddGroupAttrToTlist(List *tlist, List *grpCl)
tlist = lappend(tlist, MakeTLE(r, (Node*)var)); tlist = lappend(tlist, MakeTLE(r, (Node*)var));
} }
} }
#endif
} }
#endif
/* was ExecTargetListLength() in execQual.c, /* was ExecTargetListLength() in execQual.c,
moved here to reduce dependencies on the executor module */ moved here to reduce dependencies on the executor module */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.33 1997/08/18 20:53:00 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.34 1997/08/19 21:32:11 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -87,6 +87,7 @@ static void make_arguments(int nargs, List *fargs, Oid *input_typeids, ...@@ -87,6 +87,7 @@ static void make_arguments(int nargs, List *fargs, Oid *input_typeids,
static void AddAggToParseState(ParseState *pstate, Aggreg *aggreg); static void AddAggToParseState(ParseState *pstate, Aggreg *aggreg);
static void finalizeAggregates(ParseState *pstate, Query *qry); static void finalizeAggregates(ParseState *pstate, Query *qry);
static void parseCheckAggregates(ParseState *pstate, Query *qry); static void parseCheckAggregates(ParseState *pstate, Query *qry);
static ParseState* makeParseState(void);
/***************************************************************************** /*****************************************************************************
* *
...@@ -99,7 +100,7 @@ static void parseCheckAggregates(ParseState *pstate, Query *qry); ...@@ -99,7 +100,7 @@ static void parseCheckAggregates(ParseState *pstate, Query *qry);
* *
*/ */
ParseState* static ParseState*
makeParseState(void) makeParseState(void)
{ {
ParseState *pstate; ParseState *pstate;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.20 1997/08/12 20:15:32 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.21 1997/08/19 21:32:12 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -109,6 +109,9 @@ typedef struct _CandidateList { ...@@ -109,6 +109,9 @@ typedef struct _CandidateList {
static Oid **argtype_inherit(int nargs, Oid *oid_array); static Oid **argtype_inherit(int nargs, Oid *oid_array);
static Oid **genxprod(InhPaths *arginh, int nargs); static Oid **genxprod(InhPaths *arginh, int nargs);
static int findsupers(Oid relid, Oid **supervec); static int findsupers(Oid relid, Oid **supervec);
static bool check_typeid(Oid id);
static char *instr1(TypeTupleForm tp, char *string, int typlen);
static void op_error(char *op, Oid arg1, Oid arg2);
/* check to see if a type id is valid, /* check to see if a type id is valid,
* returns true if it is. By using this call before calling * returns true if it is. By using this call before calling
...@@ -116,7 +119,7 @@ static int findsupers(Oid relid, Oid **supervec); ...@@ -116,7 +119,7 @@ static int findsupers(Oid relid, Oid **supervec);
* can be produced because the caller typically has more context of * can be produced because the caller typically has more context of
* what's going on - jolly * what's going on - jolly
*/ */
bool static bool
check_typeid(Oid id) check_typeid(Oid id)
{ {
return (SearchSysCacheTuple(TYPOID, return (SearchSysCacheTuple(TYPOID,
...@@ -784,6 +787,7 @@ getAttrName(Relation rd, int attrno) ...@@ -784,6 +787,7 @@ getAttrName(Relation rd, int attrno)
/* Given a typename and value, returns the ascii form of the value */ /* Given a typename and value, returns the ascii form of the value */
#ifdef NOT_USED
char * char *
outstr(char *typename, /* Name of type of value */ outstr(char *typename, /* Name of type of value */
char *value) /* Could be of any type */ char *value) /* Could be of any type */
...@@ -795,6 +799,7 @@ outstr(char *typename, /* Name of type of value */ ...@@ -795,6 +799,7 @@ outstr(char *typename, /* Name of type of value */
op = tp->typoutput; op = tp->typoutput;
return((char *) fmgr(op, value)); return((char *) fmgr(op, value));
} }
#endif
/* Given a Type and a string, return the internal form of that string */ /* Given a Type and a string, return the internal form of that string */
char * char *
...@@ -805,7 +810,7 @@ instr2(Type tp, char *string, int typlen) ...@@ -805,7 +810,7 @@ instr2(Type tp, char *string, int typlen)
/* Given a type structure and a string, returns the internal form of /* Given a type structure and a string, returns the internal form of
that string */ that string */
char * static char *
instr1(TypeTupleForm tp, char *string, int typlen) instr1(TypeTupleForm tp, char *string, int typlen)
{ {
Oid op; Oid op;
...@@ -1422,6 +1427,7 @@ get_typelem(Oid type_id) ...@@ -1422,6 +1427,7 @@ get_typelem(Oid type_id)
return (type->typelem); return (type->typelem);
} }
#ifdef NOT_USED
char char
FindDelimiter(char *typename) FindDelimiter(char *typename)
{ {
...@@ -1440,12 +1446,13 @@ FindDelimiter(char *typename) ...@@ -1440,12 +1446,13 @@ FindDelimiter(char *typename)
delim = type->typdelim; delim = type->typdelim;
return (delim); return (delim);
} }
#endif
/* /*
* Give a somewhat useful error message when the operator for two types * Give a somewhat useful error message when the operator for two types
* is not found. * is not found.
*/ */
void static void
op_error(char *op, Oid arg1, Oid arg2) op_error(char *op, Oid arg1, Oid arg2)
{ {
Type tp1 = NULL, tp2 = NULL; Type tp1 = NULL, tp2 = NULL;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/dbcommands.c,v 1.5 1997/08/18 20:53:03 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/dbcommands.c,v 1.6 1997/08/19 21:32:14 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
static void check_permissions(char *command, char *dbname, static void check_permissions(char *command, char *dbname,
Oid *dbIdP, Oid *userIdP); Oid *dbIdP, Oid *userIdP);
static HeapTuple get_pg_dbtup(char *command, char *dbname, Relation dbrel); static HeapTuple get_pg_dbtup(char *command, char *dbname, Relation dbrel);
static void stop_vacuum(char *dbname);
void void
createdb(char *dbname) createdb(char *dbname)
...@@ -241,7 +242,7 @@ check_permissions(char *command, ...@@ -241,7 +242,7 @@ check_permissions(char *command,
* stop_vacuum() -- stop the vacuum daemon on the database, if one is * stop_vacuum() -- stop the vacuum daemon on the database, if one is
* running. * running.
*/ */
void static void
stop_vacuum(char *dbname) stop_vacuum(char *dbname)
{ {
char filename[256]; char filename[256];
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/parse_query.c,v 1.16 1997/05/31 07:10:25 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/parse_query.c,v 1.17 1997/08/19 21:32:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
#include "nodes/parsenodes.h" #include "nodes/parsenodes.h"
#include "nodes/makefuncs.h" #include "nodes/makefuncs.h"
static void checkTargetTypes(ParseState *pstate, char *target_colname,
char *refname, char *colname);
Oid *param_type_info; Oid *param_type_info;
int pfunc_num_args; int pfunc_num_args;
...@@ -755,7 +758,7 @@ handleTargetColname(ParseState *pstate, char **resname, ...@@ -755,7 +758,7 @@ handleTargetColname(ParseState *pstate, char **resname,
* checkTargetTypes - * checkTargetTypes -
* checks value and target column types * checks value and target column types
*/ */
void static void
checkTargetTypes(ParseState *pstate, char *target_colname, checkTargetTypes(ParseState *pstate, char *target_colname,
char *refname, char *colname) char *refname, char *colname)
{ {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.51 1997/08/12 22:53:31 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.52 1997/08/19 21:32:27 momjian Exp $
* *
* NOTES * NOTES
* *
...@@ -163,8 +163,8 @@ static void CleanupProc(int pid, int exitstatus); ...@@ -163,8 +163,8 @@ static void CleanupProc(int pid, int exitstatus);
static int DoExec(StartupInfo *packet, int portFd); static int DoExec(StartupInfo *packet, int portFd);
static void ExitPostmaster(int status); static void ExitPostmaster(int status);
static void usage(const char *); static void usage(const char *);
int ServerLoop(void); static int ServerLoop(void);
int BackendStartup(StartupInfo *packet, Port *port, int *pidPtr); static int BackendStartup(StartupInfo *packet, Port *port, int *pidPtr);
static void send_error_reply(Port *port, const char *errormsg); static void send_error_reply(Port *port, const char *errormsg);
extern char *optarg; extern char *optarg;
...@@ -432,7 +432,7 @@ usage(const char *progname) ...@@ -432,7 +432,7 @@ usage(const char *progname)
exit(1); exit(1);
} }
int static int
ServerLoop(void) ServerLoop(void)
{ {
int serverFd = ServerSock; int serverFd = ServerSock;
...@@ -943,7 +943,7 @@ CleanupProc(int pid, ...@@ -943,7 +943,7 @@ CleanupProc(int pid,
* otherwise. * otherwise.
* *
*/ */
int static int
BackendStartup(StartupInfo *packet, /* client's startup packet */ BackendStartup(StartupInfo *packet, /* client's startup packet */
Port *port, Port *port,
int *pidPtr) int *pidPtr)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.3 1996/11/03 04:56:59 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.4 1997/08/19 21:32:34 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -153,6 +153,7 @@ BufTableInsert(BufferDesc *buf) ...@@ -153,6 +153,7 @@ BufTableInsert(BufferDesc *buf)
} }
/* prints out collision stats for the buf table */ /* prints out collision stats for the buf table */
#ifdef NOT_USED
void void
DBG_LookupListCheck(int nlookup) DBG_LookupListCheck(int nlookup)
{ {
...@@ -160,3 +161,4 @@ DBG_LookupListCheck(int nlookup) ...@@ -160,3 +161,4 @@ DBG_LookupListCheck(int nlookup)
hash_stats("Shared",SharedBufHash); hash_stats("Shared",SharedBufHash);
} }
#endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.18 1997/08/18 20:53:08 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.19 1997/08/19 21:32:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -30,12 +30,6 @@ ...@@ -30,12 +30,6 @@
* *
* WriteBuffer() -- WriteNoReleaseBuffer() + ReleaseBuffer() * WriteBuffer() -- WriteNoReleaseBuffer() + ReleaseBuffer()
* *
* DirtyBufferCopy() -- For a given dbid/relid/blockno, if the buffer is
* in the cache and is dirty, mark it clean and copy
* it to the requested location. This is a logical
* write, and has been installed to support the cache
* management code for write-once storage managers.
*
* FlushBuffer() -- as above but never delayed write. * FlushBuffer() -- as above but never delayed write.
* *
* BufferSync() -- flush all dirty buffers in the buffer pool. * BufferSync() -- flush all dirty buffers in the buffer pool.
...@@ -169,6 +163,7 @@ ReadBuffer(Relation reln, BlockNumber blockNum) ...@@ -169,6 +163,7 @@ ReadBuffer(Relation reln, BlockNumber blockNum)
* *
* XXX caller must have already acquired BufMgrLock * XXX caller must have already acquired BufMgrLock
*/ */
#ifdef NOT_USED
static bool static bool
is_userbuffer(Buffer buffer) is_userbuffer(Buffer buffer)
{ {
...@@ -178,7 +173,9 @@ is_userbuffer(Buffer buffer) ...@@ -178,7 +173,9 @@ is_userbuffer(Buffer buffer)
return false; return false;
return true; return true;
} }
#endif
#ifdef NOT_USED
Buffer Buffer
ReadBuffer_Debug(char *file, ReadBuffer_Debug(char *file,
int line, int line,
...@@ -198,6 +195,7 @@ refcount = %ld, file: %s, line: %d\n", ...@@ -198,6 +195,7 @@ refcount = %ld, file: %s, line: %d\n",
} }
return buffer; return buffer;
} }
#endif
/* /*
* ReadBufferWithBufferLock -- does the work of * ReadBufferWithBufferLock -- does the work of
...@@ -669,6 +667,7 @@ WriteBuffer(Buffer buffer) ...@@ -669,6 +667,7 @@ WriteBuffer(Buffer buffer)
return(TRUE); return(TRUE);
} }
#ifdef NOT_USED
void void
WriteBuffer_Debug(char *file, int line, Buffer buffer) WriteBuffer_Debug(char *file, int line, Buffer buffer)
{ {
...@@ -682,8 +681,15 @@ refcount = %ld, file: %s, line: %d\n", ...@@ -682,8 +681,15 @@ refcount = %ld, file: %s, line: %d\n",
PrivateRefCount[buffer - 1], file, line); PrivateRefCount[buffer - 1], file, line);
} }
} }
#endif
/* /*
* DirtyBufferCopy() -- For a given dbid/relid/blockno, if the buffer is
* in the cache and is dirty, mark it clean and copy
* it to the requested location. This is a logical
* write, and has been installed to support the cache
* management code for write-once storage managers.
*
* DirtyBufferCopy() -- Copy a given dirty buffer to the requested * DirtyBufferCopy() -- Copy a given dirty buffer to the requested
* destination. * destination.
* *
...@@ -695,6 +701,7 @@ refcount = %ld, file: %s, line: %d\n", ...@@ -695,6 +701,7 @@ refcount = %ld, file: %s, line: %d\n",
* *
* NOTE: used by sony jukebox code in postgres 4.2 - ay 2/95 * NOTE: used by sony jukebox code in postgres 4.2 - ay 2/95
*/ */
#ifdef NOT_USED
void void
DirtyBufferCopy(Oid dbid, Oid relid, BlockNumber blkno, char *dest) DirtyBufferCopy(Oid dbid, Oid relid, BlockNumber blkno, char *dest)
{ {
...@@ -722,6 +729,7 @@ DirtyBufferCopy(Oid dbid, Oid relid, BlockNumber blkno, char *dest) ...@@ -722,6 +729,7 @@ DirtyBufferCopy(Oid dbid, Oid relid, BlockNumber blkno, char *dest)
SpinRelease(BufMgrLock); SpinRelease(BufMgrLock);
} }
#endif
/* /*
* FlushBuffer -- like WriteBuffer, but force the page to disk. * FlushBuffer -- like WriteBuffer, but force the page to disk.
...@@ -1462,6 +1470,7 @@ blockNum=%d, flags=0x%x, refcount=%d %d)\n", ...@@ -1462,6 +1470,7 @@ blockNum=%d, flags=0x%x, refcount=%d %d)\n",
* pool and start measuring some performance with a clean empty buffer * pool and start measuring some performance with a clean empty buffer
* pool. * pool.
*/ */
#ifdef NOT_USED
void void
BufferPoolBlowaway() BufferPoolBlowaway()
{ {
...@@ -1476,6 +1485,7 @@ BufferPoolBlowaway() ...@@ -1476,6 +1485,7 @@ BufferPoolBlowaway()
BufTableDelete(&BufferDescriptors[i-1]); BufTableDelete(&BufferDescriptors[i-1]);
} }
} }
#endif
#undef IncrBufferRefCount #undef IncrBufferRefCount
#undef ReleaseBuffer #undef ReleaseBuffer
...@@ -1535,6 +1545,7 @@ ReleaseBuffer(Buffer buffer) ...@@ -1535,6 +1545,7 @@ ReleaseBuffer(Buffer buffer)
return(STATUS_OK); return(STATUS_OK);
} }
#ifdef NOT_USED
void void
IncrBufferRefCount_Debug(char *file, int line, Buffer buffer) IncrBufferRefCount_Debug(char *file, int line, Buffer buffer)
{ {
...@@ -1548,7 +1559,9 @@ refcount = %ld, file: %s, line: %d\n", ...@@ -1548,7 +1559,9 @@ refcount = %ld, file: %s, line: %d\n",
PrivateRefCount[buffer - 1], file, line); PrivateRefCount[buffer - 1], file, line);
} }
} }
#endif
#ifdef NOT_USED
void void
ReleaseBuffer_Debug(char *file, int line, Buffer buffer) ReleaseBuffer_Debug(char *file, int line, Buffer buffer)
{ {
...@@ -1562,7 +1575,9 @@ refcount = %ld, file: %s, line: %d\n", ...@@ -1562,7 +1575,9 @@ refcount = %ld, file: %s, line: %d\n",
PrivateRefCount[buffer - 1], file, line); PrivateRefCount[buffer - 1], file, line);
} }
} }
#endif
#ifdef NOT_USED
int int
ReleaseAndReadBuffer_Debug(char *file, ReleaseAndReadBuffer_Debug(char *file,
int line, int line,
...@@ -1594,6 +1609,7 @@ refcount = %ld, file: %s, line: %d\n", ...@@ -1594,6 +1609,7 @@ refcount = %ld, file: %s, line: %d\n",
} }
return b; return b;
} }
#endif
#ifdef BMTRACE #ifdef BMTRACE
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.3 1996/11/10 03:02:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.4 1997/08/19 21:32:44 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -109,6 +109,7 @@ PinBuffer(BufferDesc *buf) ...@@ -109,6 +109,7 @@ PinBuffer(BufferDesc *buf)
PrivateRefCount[b]++; PrivateRefCount[b]++;
} }
#ifdef NOT_USED
void void
PinBuffer_Debug(char *file, int line, BufferDesc *buf) PinBuffer_Debug(char *file, int line, BufferDesc *buf)
{ {
...@@ -122,6 +123,7 @@ refcount = %ld, file: %s, line: %d\n", ...@@ -122,6 +123,7 @@ refcount = %ld, file: %s, line: %d\n",
PrivateRefCount[buffer - 1], file, line); PrivateRefCount[buffer - 1], file, line);
} }
} }
#endif
#undef UnpinBuffer #undef UnpinBuffer
...@@ -148,6 +150,7 @@ UnpinBuffer(BufferDesc *buf) ...@@ -148,6 +150,7 @@ UnpinBuffer(BufferDesc *buf)
} }
} }
#ifdef NOT_USED
void void
UnpinBuffer_Debug(char *file, int line, BufferDesc *buf) UnpinBuffer_Debug(char *file, int line, BufferDesc *buf)
{ {
...@@ -161,6 +164,7 @@ refcount = %ld, file: %s, line: %d\n", ...@@ -161,6 +164,7 @@ refcount = %ld, file: %s, line: %d\n",
PrivateRefCount[buffer - 1], file, line); PrivateRefCount[buffer - 1], file, line);
} }
} }
#endif
/* /*
* GetFreeBuffer() -- get the 'next' buffer from the freelist. * GetFreeBuffer() -- get the 'next' buffer from the freelist.
...@@ -222,6 +226,7 @@ InitFreeList(bool init) ...@@ -222,6 +226,7 @@ InitFreeList(bool init)
/* /*
* print out the free list and check for breaks. * print out the free list and check for breaks.
*/ */
#ifdef NOT_USED
void void
DBG_FreeListCheck(int nfree) DBG_FreeListCheck(int nfree)
{ {
...@@ -256,6 +261,7 @@ DBG_FreeListCheck(int nfree) ...@@ -256,6 +261,7 @@ DBG_FreeListCheck(int nfree)
} }
} }
#endif
#ifdef NOT_USED #ifdef NOT_USED
/* /*
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Id: fd.c,v 1.21 1997/08/18 02:14:50 momjian Exp $ * $Id: fd.c,v 1.22 1997/08/19 21:32:48 momjian Exp $
* *
* NOTES: * NOTES:
* *
...@@ -503,6 +503,7 @@ FileAccess(File file) ...@@ -503,6 +503,7 @@ FileAccess(File file)
/* /*
* Called when we get a shared invalidation message on some relation. * Called when we get a shared invalidation message on some relation.
*/ */
#ifdef NOT_USED
void void
FileInvalidate(File file) FileInvalidate(File file)
{ {
...@@ -511,6 +512,7 @@ FileInvalidate(File file) ...@@ -511,6 +512,7 @@ FileInvalidate(File file)
LruDelete(file); LruDelete(file);
} }
} }
#endif
/* VARARGS2 */ /* VARARGS2 */
static File static File
...@@ -735,6 +737,7 @@ FileSeek(File file, long offset, int whence) ...@@ -735,6 +737,7 @@ FileSeek(File file, long offset, int whence)
/* /*
* XXX not actually used but here for completeness * XXX not actually used but here for completeness
*/ */
#ifdef NOT_USED
long long
FileTell(File file) FileTell(File file)
{ {
...@@ -742,6 +745,7 @@ FileTell(File file) ...@@ -742,6 +745,7 @@ FileTell(File file)
file, VfdCache[file].fileName)); file, VfdCache[file].fileName));
return VfdCache[file].seekPos; return VfdCache[file].seekPos;
} }
#endif
int int
FileTruncate(File file, int offset) FileTruncate(File file, int offset)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.10 1997/01/08 08:32:01 bryanh Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.11 1997/08/19 21:32:54 momjian Exp $
* *
* NOTES * NOTES
* *
...@@ -49,6 +49,8 @@ int UsePrivateMemory = 1; ...@@ -49,6 +49,8 @@ int UsePrivateMemory = 1;
int UsePrivateMemory = 0; int UsePrivateMemory = 0;
#endif #endif
static void IpcMemoryDetach(int status, char *shmaddr);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* exit() handling stuff * exit() handling stuff
* ---------------------------------------------------------------- * ----------------------------------------------------------------
...@@ -312,6 +314,7 @@ IpcSemaphoreCreate(IpcSemaphoreKey semKey, ...@@ -312,6 +314,7 @@ IpcSemaphoreCreate(IpcSemaphoreKey semKey,
/* */ /* */
/* note: the xxx_return variables are only used for debugging. */ /* note: the xxx_return variables are only used for debugging. */
/****************************************************************************/ /****************************************************************************/
#ifdef NOT_USED
static int IpcSemaphoreSet_return; static int IpcSemaphoreSet_return;
void void
...@@ -330,6 +333,7 @@ IpcSemaphoreSet(int semId, int semno, int value) ...@@ -330,6 +333,7 @@ IpcSemaphoreSet(int semId, int semno, int value)
IpcConfigTip(); IpcConfigTip();
} }
} }
#endif
/****************************************************************************/ /****************************************************************************/
/* IpcSemaphoreKill(key) - removes a semaphore */ /* IpcSemaphoreKill(key) - removes a semaphore */
...@@ -513,7 +517,7 @@ IpcMemoryIdGet(IpcMemoryKey memKey, uint32 size) ...@@ -513,7 +517,7 @@ IpcMemoryIdGet(IpcMemoryKey memKey, uint32 size)
/* from a backend address space */ /* from a backend address space */
/* (only called by backends running under the postmaster) */ /* (only called by backends running under the postmaster) */
/****************************************************************************/ /****************************************************************************/
void static void
IpcMemoryDetach(int status, char *shmaddr) IpcMemoryDetach(int status, char *shmaddr)
{ {
if (shmdt(shmaddr) < 0) { if (shmdt(shmaddr) < 0) {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.17 1997/08/17 02:39:54 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.18 1997/08/19 21:33:01 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -45,9 +45,9 @@ ...@@ -45,9 +45,9 @@
#if defined(HAS_TEST_AND_SET) #if defined(HAS_TEST_AND_SET)
# if defined(__alpha__) && defined(linux) # if defined(__alpha__) && defined(linux)
extern long int tas(slock_t *lock); static long int tas(slock_t *lock);
# else # else
extern int tas(slock_t *lock); static int tas(slock_t *lock);
#endif #endif
#if defined (nextstep) #if defined (nextstep)
...@@ -383,7 +383,7 @@ S_INIT_LOCK(unsigned char *addr) ...@@ -383,7 +383,7 @@ S_INIT_LOCK(unsigned char *addr)
#if defined(NEED_I386_TAS_ASM) #if defined(NEED_I386_TAS_ASM)
int static int
tas(slock_t *m) tas(slock_t *m)
{ {
slock_t res; slock_t res;
...@@ -415,7 +415,7 @@ S_INIT_LOCK(slock_t *lock) ...@@ -415,7 +415,7 @@ S_INIT_LOCK(slock_t *lock)
#if defined(__alpha__) && defined(linux) #if defined(__alpha__) && defined(linux)
long int static long int
tas(slock_t *m) tas(slock_t *m)
{ {
slock_t res; slock_t res;
...@@ -459,7 +459,7 @@ S_INIT_LOCK(slock_t *lock) ...@@ -459,7 +459,7 @@ S_INIT_LOCK(slock_t *lock)
#if defined(linux) && defined(sparc) #if defined(linux) && defined(sparc)
int static int
tas(slock_t *m) tas(slock_t *m)
{ {
slock_t res; slock_t res;
...@@ -492,7 +492,7 @@ S_INIT_LOCK(slock_t *lock) ...@@ -492,7 +492,7 @@ S_INIT_LOCK(slock_t *lock)
#if defined(NEED_NS32K_TAS_ASM) #if defined(NEED_NS32K_TAS_ASM)
int static int
tas(slock_t *m) tas(slock_t *m)
{ {
slock_t res = 0; slock_t res = 0;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.2 1996/11/03 05:06:58 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.3 1997/08/19 21:33:06 momjian Exp $
* *
* NOTES * NOTES
* *
...@@ -49,12 +49,14 @@ SHMQueueInit(SHM_QUEUE *queue) ...@@ -49,12 +49,14 @@ SHMQueueInit(SHM_QUEUE *queue)
* SHMQueueIsDetached -- TRUE if element is not currently * SHMQueueIsDetached -- TRUE if element is not currently
* in a queue. * in a queue.
*/ */
#ifdef NOT_USED
bool bool
SHMQueueIsDetached(SHM_QUEUE *queue) SHMQueueIsDetached(SHM_QUEUE *queue)
{ {
Assert(SHM_PTR_VALID(queue)); Assert(SHM_PTR_VALID(queue));
return ((queue)->prev == INVALID_OFFSET); return ((queue)->prev == INVALID_OFFSET);
} }
#endif
/* /*
* SHMQueueElemInit -- clear an element's links * SHMQueueElemInit -- clear an element's links
...@@ -146,6 +148,7 @@ dumpQ(SHM_QUEUE *q, char *s) ...@@ -146,6 +148,7 @@ dumpQ(SHM_QUEUE *q, char *s)
* SHMQueueInsertHD -- put elem in queue between the queue head * SHMQueueInsertHD -- put elem in queue between the queue head
* and its "prev" element. * and its "prev" element.
*/ */
#ifdef NOT_USED
void void
SHMQueueInsertHD(SHM_QUEUE *queue, SHM_QUEUE *elem) SHMQueueInsertHD(SHM_QUEUE *queue, SHM_QUEUE *elem)
{ {
...@@ -168,6 +171,7 @@ SHMQueueInsertHD(SHM_QUEUE *queue, SHM_QUEUE *elem) ...@@ -168,6 +171,7 @@ SHMQueueInsertHD(SHM_QUEUE *queue, SHM_QUEUE *elem)
dumpQ(queue, "in SHMQueueInsertHD: end"); dumpQ(queue, "in SHMQueueInsertHD: end");
#endif /* SHMQUEUE_DEBUG_HD */ #endif /* SHMQUEUE_DEBUG_HD */
} }
#endif
void void
SHMQueueInsertTL(SHM_QUEUE *queue, SHM_QUEUE *elem) SHMQueueInsertTL(SHM_QUEUE *queue, SHM_QUEUE *elem)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/spin.c,v 1.4 1997/01/14 01:53:11 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/spin.c,v 1.5 1997/08/19 21:33:08 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -48,13 +48,6 @@ CreateSpinlocks(IPCKey key) ...@@ -48,13 +48,6 @@ CreateSpinlocks(IPCKey key)
return(TRUE); return(TRUE);
} }
bool
AttachSpinLocks(IPCKey key)
{
/* the spin lock shared memory must have been attached by now */
return(TRUE);
}
bool bool
InitSpinLocks(int init, IPCKey key) InitSpinLocks(int init, IPCKey key)
{ {
...@@ -100,16 +93,26 @@ SpinRelease(SPINLOCK lock) ...@@ -100,16 +93,26 @@ SpinRelease(SPINLOCK lock)
ExclusiveUnlock(lock); ExclusiveUnlock(lock);
} }
bool #else /* HAS_TEST_AND_SET */
/* Spinlocks are implemented using SysV semaphores */
static bool AttachSpinLocks(IPCKey key);
static bool SpinIsLocked(SPINLOCK lock);
static bool
AttachSpinLocks(IPCKey key)
{
/* the spin lock shared memory must have been attached by now */
return(TRUE);
}
static bool
SpinIsLocked(SPINLOCK lock) SpinIsLocked(SPINLOCK lock)
{ {
return(!LockIsFree(lock)); return(!LockIsFree(lock));
} }
#else /* HAS_TEST_AND_SET */
/* Spinlocks are implemented using SysV semaphores */
/* /*
* SpinAcquire -- try to grab a spinlock * SpinAcquire -- try to grab a spinlock
* *
...@@ -135,7 +138,7 @@ SpinRelease(SPINLOCK lock) ...@@ -135,7 +138,7 @@ SpinRelease(SPINLOCK lock)
IpcSemaphoreUnlock(SpinLockId, lock, IpcExclusiveLock); IpcSemaphoreUnlock(SpinLockId, lock, IpcExclusiveLock);
} }
bool static bool
SpinIsLocked(SPINLOCK lock) SpinIsLocked(SPINLOCK lock)
{ {
int semval; int semval;
...@@ -176,7 +179,7 @@ CreateSpinlocks(IPCKey key) ...@@ -176,7 +179,7 @@ CreateSpinlocks(IPCKey key)
/* /*
* Attach to existing spinlock set * Attach to existing spinlock set
*/ */
bool static bool
AttachSpinLocks(IPCKey key) AttachSpinLocks(IPCKey key)
{ {
IpcSemaphoreId id; IpcSemaphoreId id;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.12 1997/08/12 22:54:04 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.13 1997/08/19 21:33:10 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -296,6 +296,7 @@ inv_destroy(Oid lobjId) ...@@ -296,6 +296,7 @@ inv_destroy(Oid lobjId)
* updated so frequently, and postgres only appends tuples at the * updated so frequently, and postgres only appends tuples at the
* end of relations. Once clustering works, we should fix this. * end of relations. Once clustering works, we should fix this.
*/ */
#ifdef NOT_USED
int int
inv_stat(LargeObjectDesc *obj_desc, struct pgstat *stbuf) inv_stat(LargeObjectDesc *obj_desc, struct pgstat *stbuf)
{ {
...@@ -325,6 +326,7 @@ inv_stat(LargeObjectDesc *obj_desc, struct pgstat *stbuf) ...@@ -325,6 +326,7 @@ inv_stat(LargeObjectDesc *obj_desc, struct pgstat *stbuf)
return (0); return (0);
} }
#endif
int int
inv_seek(LargeObjectDesc *obj_desc, int offset, int whence) inv_seek(LargeObjectDesc *obj_desc, int offset, int whence)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.4 1997/01/10 20:18:47 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.5 1997/08/19 21:33:15 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -48,6 +48,8 @@ ...@@ -48,6 +48,8 @@
#include "storage/bufmgr.h" #include "storage/bufmgr.h"
#include "access/transam.h" /* for AmiTransactionId */ #include "access/transam.h" /* for AmiTransactionId */
static void LRelIdAssign(LRelId *lRelId, Oid dbId, Oid relId);
/* ---------------- /* ----------------
* *
* ---------------- * ----------------
...@@ -134,12 +136,13 @@ RelationGetLRelId(Relation relation) ...@@ -134,12 +136,13 @@ RelationGetLRelId(Relation relation)
* after it is created. * after it is created.
* ---------------- * ----------------
*/ */
#ifdef NOT_USED
Oid Oid
LRelIdGetDatabaseId(LRelId lRelId) LRelIdGetDatabaseId(LRelId lRelId)
{ {
return (lRelId.dbId); return (lRelId.dbId);
} }
#endif
/* /*
* LRelIdGetRelationId -- * LRelIdGetRelationId --
...@@ -155,23 +158,27 @@ LRelIdGetRelationId(LRelId lRelId) ...@@ -155,23 +158,27 @@ LRelIdGetRelationId(LRelId lRelId)
* DatabaseIdIsMyDatabaseId -- * DatabaseIdIsMyDatabaseId --
* True iff database object identifier is valid in my present database. * True iff database object identifier is valid in my present database.
*/ */
#ifdef NOT_USED
bool bool
DatabaseIdIsMyDatabaseId(Oid databaseId) DatabaseIdIsMyDatabaseId(Oid databaseId)
{ {
return (bool) return (bool)
(!OidIsValid(databaseId) || databaseId == MyDatabaseId); (!OidIsValid(databaseId) || databaseId == MyDatabaseId);
} }
#endif
/* /*
* LRelIdContainsMyDatabaseId -- * LRelIdContainsMyDatabaseId --
* True iff "lock" relation identifier is valid in my present database. * True iff "lock" relation identifier is valid in my present database.
*/ */
#ifdef NOT_USED
bool bool
LRelIdContainsMyDatabaseId(LRelId lRelId) LRelIdContainsMyDatabaseId(LRelId lRelId)
{ {
return (bool) return (bool)
(!OidIsValid(lRelId.dbId) || lRelId.dbId == MyDatabaseId); (!OidIsValid(lRelId.dbId) || lRelId.dbId == MyDatabaseId);
} }
#endif
/* /*
* RelationInitLockInfo -- * RelationInitLockInfo --
...@@ -285,6 +292,7 @@ elog(DEBUG, "DiscardLockInfo: NULL relation->lockInfo") ...@@ -285,6 +292,7 @@ elog(DEBUG, "DiscardLockInfo: NULL relation->lockInfo")
* RelationDiscardLockInfo -- * RelationDiscardLockInfo --
* Discards the lock information in a relation descriptor. * Discards the lock information in a relation descriptor.
*/ */
#ifdef NOT_USED
void void
RelationDiscardLockInfo(Relation relation) RelationDiscardLockInfo(Relation relation)
{ {
...@@ -296,6 +304,7 @@ RelationDiscardLockInfo(Relation relation) ...@@ -296,6 +304,7 @@ RelationDiscardLockInfo(Relation relation)
pfree(relation->lockInfo); pfree(relation->lockInfo);
relation->lockInfo = NULL; relation->lockInfo = NULL;
} }
#endif
/* /*
* RelationSetLockForDescriptorOpen -- * RelationSetLockForDescriptorOpen --
...@@ -537,6 +546,7 @@ elog(DEBUG, "RelationSetLockForTupleRead(%s[%d,%d], 0x%x) called", \ ...@@ -537,6 +546,7 @@ elog(DEBUG, "RelationSetLockForTupleRead(%s[%d,%d], 0x%x) called", \
* RelationSetLockForTupleRead -- * RelationSetLockForTupleRead --
* Sets tuple level read lock. * Sets tuple level read lock.
*/ */
#ifdef NOT_USED
void void
RelationSetLockForTupleRead(Relation relation, ItemPointer itemPointer) RelationSetLockForTupleRead(Relation relation, ItemPointer itemPointer)
{ {
...@@ -625,6 +635,7 @@ RelationSetLockForTupleRead(Relation relation, ItemPointer itemPointer) ...@@ -625,6 +635,7 @@ RelationSetLockForTupleRead(Relation relation, ItemPointer itemPointer)
*/ */
MultiLockTuple(linfo, itemPointer, READ_LOCK); MultiLockTuple(linfo, itemPointer, READ_LOCK);
} }
#endif
/* ---------------- /* ----------------
* RelationSetLockForReadPage * RelationSetLockForReadPage
...@@ -890,6 +901,7 @@ RelationUnsetWIntentLock(Relation relation) ...@@ -890,6 +901,7 @@ RelationUnsetWIntentLock(Relation relation)
* a WORM disk jukebox. Sometimes need exclusive access to extend a * a WORM disk jukebox. Sometimes need exclusive access to extend a
* file by a block. * file by a block.
*/ */
#ifdef NOT_USED
void void
RelationSetLockForExtend(Relation relation) RelationSetLockForExtend(Relation relation)
{ {
...@@ -906,7 +918,9 @@ RelationSetLockForExtend(Relation relation) ...@@ -906,7 +918,9 @@ RelationSetLockForExtend(Relation relation)
MultiLockReln((LockInfo) relation->lockInfo, EXTEND_LOCK); MultiLockReln((LockInfo) relation->lockInfo, EXTEND_LOCK);
} }
#endif
#ifdef NOT_USED
void void
RelationUnsetLockForExtend(Relation relation) RelationUnsetLockForExtend(Relation relation)
{ {
...@@ -923,11 +937,12 @@ RelationUnsetLockForExtend(Relation relation) ...@@ -923,11 +937,12 @@ RelationUnsetLockForExtend(Relation relation)
MultiReleaseReln((LockInfo) relation->lockInfo, EXTEND_LOCK); MultiReleaseReln((LockInfo) relation->lockInfo, EXTEND_LOCK);
} }
#endif
/* /*
* Create an LRelid --- Why not just pass in a pointer to the storage? * Create an LRelid --- Why not just pass in a pointer to the storage?
*/ */
void static void
LRelIdAssign(LRelId *lRelId, Oid dbId, Oid relId) LRelIdAssign(LRelId *lRelId, Oid dbId, Oid relId)
{ {
lRelId->dbId = dbId; lRelId->dbId = dbId;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.10 1997/08/12 22:54:07 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.11 1997/08/19 21:33:19 momjian Exp $
* *
* NOTES * NOTES
* Outside modules can create a lock table and acquire/release * Outside modules can create a lock table and acquire/release
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
#include "access/xact.h" #include "access/xact.h"
#include "access/transam.h" #include "access/transam.h"
static int WaitOnLock(LOCKTAB *ltable, LockTableId tableId, LOCK *lock,
LOCKT lockt);
/*#define LOCK_MGR_DEBUG*/ /*#define LOCK_MGR_DEBUG*/
#ifndef LOCK_MGR_DEBUG #ifndef LOCK_MGR_DEBUG
...@@ -369,6 +372,7 @@ LockTabInit(char *tabName, ...@@ -369,6 +372,7 @@ LockTabInit(char *tabName,
* client to use different tableIds when acquiring/releasing * client to use different tableIds when acquiring/releasing
* short term and long term locks. * short term and long term locks.
*/ */
#ifdef NOT_USED
LockTableId LockTableId
LockTabRename(LockTableId tableId) LockTabRename(LockTableId tableId)
{ {
...@@ -390,6 +394,7 @@ LockTabRename(LockTableId tableId) ...@@ -390,6 +394,7 @@ LockTabRename(LockTableId tableId)
AllTables[newTableId] = AllTables[tableId]; AllTables[newTableId] = AllTables[tableId];
return(newTableId); return(newTableId);
} }
#endif
/* /*
* LockAcquire -- Check for lock conflicts, sleep if conflict found, * LockAcquire -- Check for lock conflicts, sleep if conflict found,
...@@ -753,7 +758,7 @@ LockResolveConflicts(LOCKTAB *ltable, ...@@ -753,7 +758,7 @@ LockResolveConflicts(LOCKTAB *ltable,
return(STATUS_FOUND); return(STATUS_FOUND);
} }
int static int
WaitOnLock(LOCKTAB *ltable, LockTableId tableId, LOCK *lock, LOCKT lockt) WaitOnLock(LOCKTAB *ltable, LockTableId tableId, LOCK *lock, LOCKT lockt)
{ {
PROC_QUEUE *waitQueue = &(lock->waitProcs); PROC_QUEUE *waitQueue = &(lock->waitProcs);
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.3 1997/08/12 22:54:09 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.4 1997/08/19 21:33:25 momjian Exp $
* *
* NOTES: * NOTES:
* (1) The lock.c module assumes that the caller here is doing * (1) The lock.c module assumes that the caller here is doing
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
#include "utils/rel.h" #include "utils/rel.h"
#include "miscadmin.h" /* MyDatabaseId */ #include "miscadmin.h" /* MyDatabaseId */
static bool MultiAcquire(LockTableId tableId, LOCKTAG *tag, LOCKT lockt,
LOCK_LEVEL level);
static bool MultiRelease(LockTableId tableId, LOCKTAG *tag, LOCKT lockt,
LOCK_LEVEL level);
/* /*
* INTENT indicates to higher level that a lower level lock has been * INTENT indicates to higher level that a lower level lock has been
...@@ -186,7 +190,7 @@ MultiLockPage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt) ...@@ -186,7 +190,7 @@ MultiLockPage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt)
* Returns: TRUE if lock is set, FALSE if not * Returns: TRUE if lock is set, FALSE if not
* Side Effects: * Side Effects:
*/ */
bool static bool
MultiAcquire(LockTableId tableId, MultiAcquire(LockTableId tableId,
LOCKTAG *tag, LOCKTAG *tag,
LOCKT lockt, LOCKT lockt,
...@@ -288,6 +292,7 @@ MultiAcquire(LockTableId tableId, ...@@ -288,6 +292,7 @@ MultiAcquire(LockTableId tableId,
* Release a page in the multi-level lock table * Release a page in the multi-level lock table
* ------------------ * ------------------
*/ */
#ifdef NOT_USED
bool bool
MultiReleasePage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt) MultiReleasePage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt)
{ {
...@@ -307,6 +312,7 @@ MultiReleasePage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt) ...@@ -307,6 +312,7 @@ MultiReleasePage(LockInfo linfo, ItemPointer tidPtr, LOCKT lockt)
return (MultiRelease(MultiTableId, &tag, lockt, PAGE_LEVEL)); return (MultiRelease(MultiTableId, &tag, lockt, PAGE_LEVEL));
} }
#endif
/* ------------------ /* ------------------
* Release a relation in the multi-level lock table * Release a relation in the multi-level lock table
...@@ -335,7 +341,7 @@ MultiReleaseReln(LockInfo linfo, LOCKT lockt) ...@@ -335,7 +341,7 @@ MultiReleaseReln(LockInfo linfo, LOCKT lockt)
* *
* Returns: TRUE if successful, FALSE otherwise. * Returns: TRUE if successful, FALSE otherwise.
*/ */
bool static bool
MultiRelease(LockTableId tableId, MultiRelease(LockTableId tableId,
LOCKTAG *tag, LOCKTAG *tag,
LOCKT lockt, LOCKT lockt,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.17 1997/02/14 04:16:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.18 1997/08/19 21:33:29 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
* This is so that we can support more backends. (system-wide semaphore * This is so that we can support more backends. (system-wide semaphore
* sets run out pretty fast.) -ay 4/95 * sets run out pretty fast.) -ay 4/95
* *
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.17 1997/02/14 04:16:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.18 1997/08/19 21:33:29 momjian Exp $
*/ */
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>
...@@ -76,6 +76,9 @@ ...@@ -76,6 +76,9 @@
#include "storage/spin.h" #include "storage/spin.h"
#include "storage/proc.h" #include "storage/proc.h"
static void HandleDeadLock(int sig);
static PROC *ProcWakeup(PROC *proc, int errType);
/* /*
* timeout (in seconds) for resolving possible deadlock * timeout (in seconds) for resolving possible deadlock
*/ */
...@@ -401,6 +404,7 @@ ProcKill(int exitStatus, int pid) ...@@ -401,6 +404,7 @@ ProcKill(int exitStatus, int pid)
* Returns: a pointer to the queue or NULL * Returns: a pointer to the queue or NULL
* Side Effects: Initializes the queue if we allocated one * Side Effects: Initializes the queue if we allocated one
*/ */
#ifdef NOT_USED
PROC_QUEUE * PROC_QUEUE *
ProcQueueAlloc(char *name) ProcQueueAlloc(char *name)
{ {
...@@ -418,6 +422,7 @@ ProcQueueAlloc(char *name) ...@@ -418,6 +422,7 @@ ProcQueueAlloc(char *name)
} }
return(queue); return(queue);
} }
#endif
/* /*
* ProcQueueInit -- initialize a shared memory process queue * ProcQueueInit -- initialize a shared memory process queue
...@@ -536,7 +541,7 @@ ProcSleep(PROC_QUEUE *queue, ...@@ -536,7 +541,7 @@ ProcSleep(PROC_QUEUE *queue,
* remove the process from the wait queue and set its links invalid. * remove the process from the wait queue and set its links invalid.
* RETURN: the next process in the wait queue. * RETURN: the next process in the wait queue.
*/ */
PROC * static PROC *
ProcWakeup(PROC *proc, int errType) ProcWakeup(PROC *proc, int errType)
{ {
PROC *retProc; PROC *retProc;
...@@ -563,11 +568,13 @@ ProcWakeup(PROC *proc, int errType) ...@@ -563,11 +568,13 @@ ProcWakeup(PROC *proc, int errType)
/* /*
* ProcGetId -- * ProcGetId --
*/ */
#ifdef NOT_USED
int int
ProcGetId() ProcGetId()
{ {
return( MyProc->procId ); return( MyProc->procId );
} }
#endif
/* /*
* ProcLockWakeup -- routine for waking up processes when a lock is * ProcLockWakeup -- routine for waking up processes when a lock is
...@@ -631,7 +638,7 @@ ProcAddLock(SHM_QUEUE *elem) ...@@ -631,7 +638,7 @@ ProcAddLock(SHM_QUEUE *elem)
* up my semaphore. * up my semaphore.
* -------------------- * --------------------
*/ */
void static void
HandleDeadLock(int sig) HandleDeadLock(int sig)
{ {
LOCK *lock; LOCK *lock;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.6 1997/03/12 21:07:11 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.7 1997/08/19 21:33:33 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
#include "lib/qsort.h" #include "lib/qsort.h"
static void PageIndexTupleDeleteAdjustLinePointers(PageHeader phdr,
char *location, Size size);
static bool PageManagerShuffle = true; /* default is shuffle mode */ static bool PageManagerShuffle = true; /* default is shuffle mode */
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
...@@ -506,7 +509,7 @@ PageIndexTupleDelete(Page page, OffsetNumber offnum) ...@@ -506,7 +509,7 @@ PageIndexTupleDelete(Page page, OffsetNumber offnum)
* *
* This routine should never be called on an empty page. * This routine should never be called on an empty page.
*/ */
void static void
PageIndexTupleDeleteAdjustLinePointers(PageHeader phdr, PageIndexTupleDeleteAdjustLinePointers(PageHeader phdr,
char *location, char *location,
Size size) Size size)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.7 1997/08/18 20:53:18 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.8 1997/08/19 21:33:38 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/palloc.h" #include "utils/palloc.h"
static void smgrshutdown(int dummy);
typedef struct f_smgr { typedef struct f_smgr {
int (*smgr_init)(); /* may be NULL */ int (*smgr_init)(); /* may be NULL */
int (*smgr_shutdown)(); /* may be NULL */ int (*smgr_shutdown)(); /* may be NULL */
...@@ -100,7 +102,7 @@ smgrinit() ...@@ -100,7 +102,7 @@ smgrinit()
return (SM_SUCCESS); return (SM_SUCCESS);
} }
void static void
smgrshutdown(int dummy) smgrshutdown(int dummy)
{ {
int i; int i;
...@@ -373,6 +375,7 @@ smgrcommit() ...@@ -373,6 +375,7 @@ smgrcommit()
return (SM_SUCCESS); return (SM_SUCCESS);
} }
#ifdef NOT_USED
int int
smgrabort() smgrabort()
{ {
...@@ -387,6 +390,7 @@ smgrabort() ...@@ -387,6 +390,7 @@ smgrabort()
return (SM_SUCCESS); return (SM_SUCCESS);
} }
#endif
bool bool
smgriswo(int16 smgrno) smgriswo(int16 smgrno)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.12 1997/08/18 20:53:29 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.13 1997/08/19 21:33:54 momjian Exp $
* *
* NOTES * NOTES
* See acl.h. * See acl.h.
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
#include "parser/catalog_utils.h" #include "parser/catalog_utils.h"
#include "fmgr.h" #include "fmgr.h"
static int32 aclcheck(Acl *acl, AclId id, AclIdType idtype, AclMode mode);
/* /*
* Enable use of user relations in place of real system catalogs. * Enable use of user relations in place of real system catalogs.
*/ */
...@@ -257,7 +259,7 @@ in_group(AclId uid, AclId gid) ...@@ -257,7 +259,7 @@ in_group(AclId uid, AclId gid)
* Returns 1 if the 'id' of type 'idtype' has ACL entries in 'acl' to satisfy * Returns 1 if the 'id' of type 'idtype' has ACL entries in 'acl' to satisfy
* any one of the requirements of 'mode'. Returns 0 otherwise. * any one of the requirements of 'mode'. Returns 0 otherwise.
*/ */
int32 static int32
aclcheck(Acl *acl, AclId id, AclIdType idtype, AclMode mode) aclcheck(Acl *acl, AclId id, AclIdType idtype, AclMode mode)
{ {
register unsigned i; register unsigned i;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.6 1997/08/12 22:54:19 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.7 1997/08/19 21:34:02 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -43,6 +43,9 @@ ...@@ -43,6 +43,9 @@
#include "commands/async.h" #include "commands/async.h"
static Oid GetAppendOid(void);
static void ResetAppendOid(void);
/* ---------------- /* ----------------
* output functions * output functions
* ---------------- * ----------------
...@@ -317,7 +320,7 @@ BeginCommand(char *pname, ...@@ -317,7 +320,7 @@ BeginCommand(char *pname,
static Oid AppendOid; static Oid AppendOid;
void static void
ResetAppendOid(void) ResetAppendOid(void)
{ {
AppendOid = InvalidOid; AppendOid = InvalidOid;
...@@ -346,7 +349,7 @@ UpdateAppendOid(Oid newoid) ...@@ -346,7 +349,7 @@ UpdateAppendOid(Oid newoid)
AppendOid = MULTI_TUPLE_APPEND; AppendOid = MULTI_TUPLE_APPEND;
} }
Oid static Oid
GetAppendOid(void) GetAppendOid(void)
{ {
if (AppendOid == MULTI_TUPLE_APPEND) if (AppendOid == MULTI_TUPLE_APPEND)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.41 1997/08/14 16:11:15 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.42 1997/08/19 21:34:04 momjian Exp $
* *
* NOTES * NOTES
* this is the "main" module of the postgres backend and * this is the "main" module of the postgres backend and
...@@ -90,6 +90,8 @@ ...@@ -90,6 +90,8 @@
#include "libpq/pqsignal.h" #include "libpq/pqsignal.h"
#include "rewrite/rewriteHandler.h" /* for QueryRewrite() */ #include "rewrite/rewriteHandler.h" /* for QueryRewrite() */
static void quickdie(SIGNAL_ARGS);
/* ---------------- /* ----------------
* global variables * global variables
* ---------------- * ----------------
...@@ -720,7 +722,7 @@ handle_warn(SIGNAL_ARGS) ...@@ -720,7 +722,7 @@ handle_warn(SIGNAL_ARGS)
siglongjmp(Warn_restart, 1); siglongjmp(Warn_restart, 1);
} }
void static void
quickdie(SIGNAL_ARGS) quickdie(SIGNAL_ARGS)
{ {
elog(NOTICE, "I have been signalled by the postmaster."); elog(NOTICE, "I have been signalled by the postmaster.");
...@@ -1275,7 +1277,7 @@ PostgresMain(int argc, char *argv[]) ...@@ -1275,7 +1277,7 @@ PostgresMain(int argc, char *argv[])
*/ */
if (IsUnderPostmaster == false) { if (IsUnderPostmaster == false) {
puts("\nPOSTGRES backend interactive interface"); puts("\nPOSTGRES backend interactive interface");
puts("$Revision: 1.41 $ $Date: 1997/08/14 16:11:15 $"); puts("$Revision: 1.42 $ $Date: 1997/08/19 21:34:04 $");
} }
/* ---------------- /* ----------------
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.5 1996/11/10 03:02:54 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.6 1997/08/19 21:34:07 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#include "commands/command.h" #include "commands/command.h"
static char* CreateOperationTag(int operationType); static char* CreateOperationTag(int operationType);
static void ProcessQueryDesc(QueryDesc *queryDesc);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* CreateQueryDesc * CreateQueryDesc
...@@ -199,7 +201,7 @@ ProcessPortal(char* portalName, ...@@ -199,7 +201,7 @@ ProcessPortal(char* portalName,
* Read the comments for ProcessQuery() below... * Read the comments for ProcessQuery() below...
* ---------------------------------------------------------------- * ----------------------------------------------------------------
*/ */
void static void
ProcessQueryDesc(QueryDesc *queryDesc) ProcessQueryDesc(QueryDesc *queryDesc)
{ {
Query *parseTree; Query *parseTree;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.12 1997/08/12 20:15:54 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.13 1997/08/19 21:34:10 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
static char *getid(char *s, char *n); static char *getid(char *s, char *n);
static int32 aclitemeq(AclItem *a1, AclItem *a2); static int32 aclitemeq(AclItem *a1, AclItem *a2);
static int32 aclitemgt(AclItem *a1, AclItem *a2); static int32 aclitemgt(AclItem *a1, AclItem *a2);
static char *aclparse(char *s, AclItem *aip, unsigned *modechg);
#define ACL_IDTYPE_GID_KEYWORD "group" #define ACL_IDTYPE_GID_KEYWORD "group"
#define ACL_IDTYPE_UID_KEYWORD "user" #define ACL_IDTYPE_UID_KEYWORD "user"
...@@ -81,7 +82,7 @@ getid(char *s, char *n) ...@@ -81,7 +82,7 @@ getid(char *s, char *n)
* UID/GID, id type identifier and mode type values. * UID/GID, id type identifier and mode type values.
* - loads 'modechg' with the mode change flag. * - loads 'modechg' with the mode change flag.
*/ */
char * static char *
aclparse(char *s, AclItem *aip, unsigned *modechg) aclparse(char *s, AclItem *aip, unsigned *modechg)
{ {
HeapTuple htp; HeapTuple htp;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.14 1997/08/18 02:14:54 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.15 1997/08/19 21:34:18 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -68,7 +68,9 @@ static void _LOArrayRange(int st[], int endp[], int bsize, int srcfd, ...@@ -68,7 +68,9 @@ static void _LOArrayRange(int st[], int endp[], int bsize, int srcfd,
static void _ReadArray (int st[], int endp[], int bsize, int srcfd, int destfd, static void _ReadArray (int st[], int endp[], int bsize, int srcfd, int destfd,
ArrayType *array, int isDestLO, bool *isNull); ArrayType *array, int isDestLO, bool *isNull);
static ArrayCastAndSet(char *src, bool typbyval, int typlen, char *dest); static ArrayCastAndSet(char *src, bool typbyval, int typlen, char *dest);
static SanityCheckInput(int ndim, int n, int dim[], int lb[], int indx[]);
static int array_read(char *destptr, int eltsize, int nitems, char *srcptr);
static char *array_seek(char *ptr, int eltsize, int nitems);
/*--------------------------------------------------------------------- /*---------------------------------------------------------------------
* array_in : * array_in :
...@@ -1189,7 +1191,7 @@ _AdvanceBy1word(char *str, char **word) ...@@ -1189,7 +1191,7 @@ _AdvanceBy1word(char *str, char **word)
} }
#endif #endif
int static int
SanityCheckInput(int ndim, int n, int dim[], int lb[], int indx[]) SanityCheckInput(int ndim, int n, int dim[], int lb[], int indx[])
{ {
int i; int i;
...@@ -1261,7 +1263,7 @@ _ArrayClipCount(int stI[], int endpI[], ArrayType *array) ...@@ -1261,7 +1263,7 @@ _ArrayClipCount(int stI[], int endpI[], ArrayType *array)
return count; return count;
} }
char * static char *
array_seek(char *ptr, int eltsize, int nitems) array_seek(char *ptr, int eltsize, int nitems)
{ {
int i; int i;
...@@ -1273,7 +1275,7 @@ array_seek(char *ptr, int eltsize, int nitems) ...@@ -1273,7 +1275,7 @@ array_seek(char *ptr, int eltsize, int nitems)
return(ptr); return(ptr);
} }
int static int
array_read(char *destptr, int eltsize, int nitems, char *srcptr) array_read(char *destptr, int eltsize, int nitems, char *srcptr)
{ {
int i, inc, tmp; int i, inc, tmp;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.5 1997/03/02 01:34:37 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.6 1997/08/19 21:34:27 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -57,6 +57,8 @@ static void read_chunk(int chunk_no[], int C[], char a_chunk[], int srcfd, ...@@ -57,6 +57,8 @@ static void read_chunk(int chunk_no[], int C[], char a_chunk[], int srcfd,
static int write_chunk(struct varlena * a_chunk, int ofile); static int write_chunk(struct varlena * a_chunk, int ofile);
static int seek_and_read(int pos, int size, char buff[], int fp, int from); static int seek_and_read(int pos, int size, char buff[], int fp, int from);
#endif #endif
static int GetChunkSize(FILE *fd, int ndim, int dim[MAXDIM], int baseSize,
int d[MAXDIM]);
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* _ChunkArray --- * _ChunkArray ---
...@@ -119,7 +121,7 @@ int cfd = 0; ...@@ -119,7 +121,7 @@ int cfd = 0;
* returns the dimensions of the chunk in "d" * returns the dimensions of the chunk in "d"
*----------------------------------------------------------------------- *-----------------------------------------------------------------------
*/ */
int static int
GetChunkSize(FILE *fd, GetChunkSize(FILE *fd,
int ndim, int ndim,
int dim[MAXDIM], int dim[MAXDIM],
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.12 1997/08/12 22:54:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.13 1997/08/19 21:34:30 momjian Exp $
* *
* NOTES * NOTES
* This code is actually (almost) unused. * This code is actually (almost) unused.
...@@ -92,7 +92,7 @@ static int sec_tab[] = { ...@@ -92,7 +92,7 @@ static int sec_tab[] = {
* Function prototypes -- internal to this file only * Function prototypes -- internal to this file only
*/ */
void reltime2tm(int32 time, struct tm *tm); static void reltime2tm(int32 time, struct tm *tm);
#if FALSE #if FALSE
static int correct_unit(char unit[], int *unptr); static int correct_unit(char unit[], int *unptr);
...@@ -178,7 +178,7 @@ char *reltimeout(int32 time) ...@@ -178,7 +178,7 @@ char *reltimeout(int32 time)
#define TMODULO(t,q,u) {q = (t / u); \ #define TMODULO(t,q,u) {q = (t / u); \
if (q != 0) t -= (q * u);} if (q != 0) t -= (q * u);}
void static void
reltime2tm(int32 time, struct tm *tm) reltime2tm(int32 time, struct tm *tm)
{ {
TMODULO(time, tm->tm_year, 31536000); TMODULO(time, tm->tm_year, 31536000);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.10 1997/07/01 00:22:40 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.11 1997/08/19 21:34:32 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
#include "utils/datetime.h" #include "utils/datetime.h"
#include "access/xact.h" #include "access/xact.h"
static int date2tm(DateADT dateVal, int *tzp, struct tm *tm, double *fsec, char **tzn);
static int day_tab[2][12] = { static int day_tab[2][12] = {
{31,28,31,30,31,30,31,31,30,31,30,31}, {31,28,31,30,31,30,31,31,30,31,30,31},
{31,29,31,30,31,30,31,31,30,31,30,31} }; {31,29,31,30,31,30,31,31,30,31,30,31} };
...@@ -140,8 +143,6 @@ date_out(DateADT date) ...@@ -140,8 +143,6 @@ date_out(DateADT date)
return(result); return(result);
} /* date_out() */ } /* date_out() */
int date2tm(DateADT dateVal, int *tzp, struct tm *tm, double *fsec, char **tzn);
bool bool
date_eq(DateADT dateVal1, DateADT dateVal2) date_eq(DateADT dateVal1, DateADT dateVal2)
{ {
...@@ -330,7 +331,7 @@ abstime_date(AbsoluteTime abstime) ...@@ -330,7 +331,7 @@ abstime_date(AbsoluteTime abstime)
* that everything is GMT. So, convert to GMT, rotate to local time, * that everything is GMT. So, convert to GMT, rotate to local time,
* and then convert again to try to get the time zones correct. * and then convert again to try to get the time zones correct.
*/ */
int static int
date2tm(DateADT dateVal, int *tzp, struct tm *tm, double *fsec, char **tzn) date2tm(DateADT dateVal, int *tzp, struct tm *tm, double *fsec, char **tzn)
{ {
struct tm *tx; struct tm *tx;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.4 1996/12/14 07:56:05 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.5 1997/08/19 21:34:33 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -131,6 +131,7 @@ datumCopy(Datum value, Oid type, bool byVal, Size len) ...@@ -131,6 +131,7 @@ datumCopy(Datum value, Oid type, bool byVal, Size len)
* ONLY datums created by "datumCopy" can be freed! * ONLY datums created by "datumCopy" can be freed!
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#ifdef NOT_USED
void void
datumFree(Datum value, Oid type, bool byVal, Size len) datumFree(Datum value, Oid type, bool byVal, Size len)
{ {
...@@ -148,6 +149,7 @@ datumFree(Datum value, Oid type, bool byVal, Size len) ...@@ -148,6 +149,7 @@ datumFree(Datum value, Oid type, bool byVal, Size len)
pfree(s); pfree(s);
} }
} }
#endif
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* datumIsEqual * datumIsEqual
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.31 1997/07/29 16:09:38 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.32 1997/08/19 21:34:34 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -31,6 +31,24 @@ ...@@ -31,6 +31,24 @@
#endif #endif
#include "utils/builtins.h" #include "utils/builtins.h"
static int DecodeDate(char *str, int fmask, int *tmask, struct tm *tm);
static int DecodeNumber( int flen, char *field,
int fmask, int *tmask, struct tm *tm, double *fsec);
static int DecodeNumberField( int len, char *str,
int fmask, int *tmask, struct tm *tm, double *fsec);
static int DecodeSpecial(int field, char *lowtoken, int *val);
static int DecodeTime(char *str, int fmask, int *tmask,
struct tm *tm, double *fsec);
static int DecodeTimezone( char *str, int *tzp);
static int DecodeUnits(int field, char *lowtoken, int *val);
static int EncodeSpecialDateTime(DateTime dt, char *str);
static datetkn *datebsearch(char *key, datetkn *base, unsigned int nel);
static DateTime dt2local( DateTime dt, int timezone);
static void dt2time(DateTime dt, int *hour, int *min, double *sec);
static int j2day( int jd);
static int timespan2tm(TimeSpan span, struct tm *tm, float8 *fsec);
static int tm2timespan(struct tm *tm, double fsec, TimeSpan *span);
#define USE_DATE_CACHE 1 #define USE_DATE_CACHE 1
#define ROUND_ALL 0 #define ROUND_ALL 0
...@@ -50,7 +68,7 @@ char *days[] = {"Sunday", "Monday", "Tuesday", "Wednesday", ...@@ -50,7 +68,7 @@ char *days[] = {"Sunday", "Monday", "Tuesday", "Wednesday",
#define TMODULO(t,q,u) {q = ((t < 0)? ceil(t / u): floor(t / u)); \ #define TMODULO(t,q,u) {q = ((t < 0)? ceil(t / u): floor(t / u)); \
if (q != 0) t -= rint(q * u);} if (q != 0) t -= rint(q * u);}
void GetEpochTime( struct tm *tm); static void GetEpochTime( struct tm *tm);
#define UTIME_MINYEAR (1901) #define UTIME_MINYEAR (1901)
#define UTIME_MINMONTH (12) #define UTIME_MINMONTH (12)
...@@ -265,6 +283,7 @@ datetime_finite(DateTime *datetime) ...@@ -265,6 +283,7 @@ datetime_finite(DateTime *datetime)
} /* datetime_finite() */ } /* datetime_finite() */
#ifdef NOT_USED
bool bool
timespan_finite(TimeSpan *timespan) timespan_finite(TimeSpan *timespan)
{ {
...@@ -273,13 +292,13 @@ timespan_finite(TimeSpan *timespan) ...@@ -273,13 +292,13 @@ timespan_finite(TimeSpan *timespan)
return(! TIMESPAN_NOT_FINITE(*timespan)); return(! TIMESPAN_NOT_FINITE(*timespan));
} /* timespan_finite() */ } /* timespan_finite() */
#endif
/*---------------------------------------------------------- /*----------------------------------------------------------
* Relational operators for datetime. * Relational operators for datetime.
*---------------------------------------------------------*/ *---------------------------------------------------------*/
void static void
GetEpochTime( struct tm *tm) GetEpochTime( struct tm *tm)
{ {
struct tm *t0; struct tm *t0;
...@@ -1115,6 +1134,7 @@ timespan_text(TimeSpan *timespan) ...@@ -1115,6 +1134,7 @@ timespan_text(TimeSpan *timespan)
* Text type may not be null terminated, so copy to temporary string * Text type may not be null terminated, so copy to temporary string
* then call the standard input routine. * then call the standard input routine.
*/ */
#ifdef NOT_USED
TimeSpan * TimeSpan *
text_timespan(text *str) text_timespan(text *str)
{ {
...@@ -1134,7 +1154,7 @@ text_timespan(text *str) ...@@ -1134,7 +1154,7 @@ text_timespan(text *str)
return(result); return(result);
} /* text_timespan() */ } /* text_timespan() */
#endif
/* datetime_trunc() /* datetime_trunc()
* Extract specified field from datetime. * Extract specified field from datetime.
...@@ -2005,7 +2025,7 @@ j2date( int jd, int *year, int *month, int *day) ...@@ -2005,7 +2025,7 @@ j2date( int jd, int *year, int *month, int *day)
return; return;
} /* j2date() */ } /* j2date() */
int static int
j2day( int date) j2day( int date)
{ {
int day; int day;
...@@ -2188,7 +2208,7 @@ printf( "tm2datetime- time is %f %02d:%02d:%02d %f\n", time, tm->tm_hour, tm->tm ...@@ -2188,7 +2208,7 @@ printf( "tm2datetime- time is %f %02d:%02d:%02d %f\n", time, tm->tm_hour, tm->tm
/* timespan2tm() /* timespan2tm()
* Convert a timespan data type to a tm structure. * Convert a timespan data type to a tm structure.
*/ */
int static int
timespan2tm(TimeSpan span, struct tm *tm, float8 *fsec) timespan2tm(TimeSpan span, struct tm *tm, float8 *fsec)
{ {
double time; double time;
...@@ -2222,7 +2242,7 @@ printf( "timespan2tm- %d %f = %04d-%02d-%02d %02d:%02d:%02d %.2f\n", span.month, ...@@ -2222,7 +2242,7 @@ printf( "timespan2tm- %d %f = %04d-%02d-%02d %02d:%02d:%02d %.2f\n", span.month,
return 0; return 0;
} /* timespan2tm() */ } /* timespan2tm() */
int static int
tm2timespan( struct tm *tm, double fsec, TimeSpan *span) tm2timespan( struct tm *tm, double fsec, TimeSpan *span)
{ {
span->month = ((tm->tm_year*12)+tm->tm_mon); span->month = ((tm->tm_year*12)+tm->tm_mon);
...@@ -2238,7 +2258,7 @@ printf( "tm2timespan- %d %f = %04d-%02d-%02d %02d:%02d:%02d %.2f\n", span->month ...@@ -2238,7 +2258,7 @@ printf( "tm2timespan- %d %f = %04d-%02d-%02d %02d:%02d:%02d %.2f\n", span->month
} /* tm2timespan() */ } /* tm2timespan() */
DateTime static DateTime
dt2local(DateTime dt, int tz) dt2local(DateTime dt, int tz)
{ {
dt -= tz; dt -= tz;
...@@ -2252,7 +2272,7 @@ time2t(const int hour, const int min, const double sec) ...@@ -2252,7 +2272,7 @@ time2t(const int hour, const int min, const double sec)
return((((hour*60)+min)*60)+sec); return((((hour*60)+min)*60)+sec);
} /* time2t() */ } /* time2t() */
void static void
dt2time(DateTime jd, int *hour, int *min, double *sec) dt2time(DateTime jd, int *hour, int *min, double *sec)
{ {
double time; double time;
...@@ -2748,7 +2768,7 @@ printf( " %02d:%02d:%02d (%f)\n", tm->tm_hour, tm->tm_min, tm->tm_sec, *fsec); ...@@ -2748,7 +2768,7 @@ printf( " %02d:%02d:%02d (%f)\n", tm->tm_hour, tm->tm_min, tm->tm_sec, *fsec);
* Decode date string which includes delimiters. * Decode date string which includes delimiters.
* Insist on a complete set of fields. * Insist on a complete set of fields.
*/ */
int static int
DecodeDate(char *str, int fmask, int *tmask, struct tm *tm) DecodeDate(char *str, int fmask, int *tmask, struct tm *tm)
{ {
double fsec; double fsec;
...@@ -2835,7 +2855,7 @@ printf( "DecodeDate- illegal field %s value is %d\n", field[i], val); ...@@ -2835,7 +2855,7 @@ printf( "DecodeDate- illegal field %s value is %d\n", field[i], val);
* Only check the lower limit on hours, since this same code * Only check the lower limit on hours, since this same code
* can be used to represent time spans. * can be used to represent time spans.
*/ */
int static int
DecodeTime(char *str, int fmask, int *tmask, struct tm *tm, double *fsec) DecodeTime(char *str, int fmask, int *tmask, struct tm *tm, double *fsec)
{ {
char *cp; char *cp;
...@@ -2879,7 +2899,7 @@ DecodeTime(char *str, int fmask, int *tmask, struct tm *tm, double *fsec) ...@@ -2879,7 +2899,7 @@ DecodeTime(char *str, int fmask, int *tmask, struct tm *tm, double *fsec)
/* DecodeNumber() /* DecodeNumber()
* Interpret numeric field as a date value in context. * Interpret numeric field as a date value in context.
*/ */
int static int
DecodeNumber( int flen, char *str, int fmask, int *tmask, struct tm *tm, double *fsec) DecodeNumber( int flen, char *str, int fmask, int *tmask, struct tm *tm, double *fsec)
{ {
int val; int val;
...@@ -2985,7 +3005,7 @@ printf( "DecodeNumber- (2) match %d (%s) as year\n", val, str); ...@@ -2985,7 +3005,7 @@ printf( "DecodeNumber- (2) match %d (%s) as year\n", val, str);
/* DecodeNumberField() /* DecodeNumberField()
* Interpret numeric string as a concatenated date field. * Interpret numeric string as a concatenated date field.
*/ */
int static int
DecodeNumberField( int len, char *str, int fmask, int *tmask, struct tm *tm, double *fsec) DecodeNumberField( int len, char *str, int fmask, int *tmask, struct tm *tm, double *fsec)
{ {
char *cp; char *cp;
...@@ -3058,7 +3078,8 @@ printf( "DecodeNumberField- %s is time field fmask=%08x tmask=%08x\n", str, fmas ...@@ -3058,7 +3078,8 @@ printf( "DecodeNumberField- %s is time field fmask=%08x tmask=%08x\n", str, fmas
/* DecodeTimezone() /* DecodeTimezone()
* Interpret string as a numeric timezone. * Interpret string as a numeric timezone.
*/ */
int DecodeTimezone( char *str, int *tzp) static int
DecodeTimezone( char *str, int *tzp)
{ {
int tz; int tz;
int hr, min; int hr, min;
...@@ -3095,7 +3116,7 @@ int DecodeTimezone( char *str, int *tzp) ...@@ -3095,7 +3116,7 @@ int DecodeTimezone( char *str, int *tzp)
* Implement a cache lookup since it is likely that dates * Implement a cache lookup since it is likely that dates
* will be related in format. * will be related in format.
*/ */
int static int
DecodeSpecial(int field, char *lowtoken, int *val) DecodeSpecial(int field, char *lowtoken, int *val)
{ {
int type; int type;
...@@ -3351,7 +3372,7 @@ printf( " %02d:%02d:%02d\n", tm->tm_hour, tm->tm_min, tm->tm_sec); ...@@ -3351,7 +3372,7 @@ printf( " %02d:%02d:%02d\n", tm->tm_hour, tm->tm_min, tm->tm_sec);
* Decode text string using lookup table. * Decode text string using lookup table.
* This routine supports time interval decoding. * This routine supports time interval decoding.
*/ */
int static int
DecodeUnits(int field, char *lowtoken, int *val) DecodeUnits(int field, char *lowtoken, int *val)
{ {
int type; int type;
...@@ -3388,7 +3409,7 @@ DecodeUnits(int field, char *lowtoken, int *val) ...@@ -3388,7 +3409,7 @@ DecodeUnits(int field, char *lowtoken, int *val)
* Binary search -- from Knuth (6.2.1) Algorithm B. Special case like this * Binary search -- from Knuth (6.2.1) Algorithm B. Special case like this
* is WAY faster than the generic bsearch(). * is WAY faster than the generic bsearch().
*/ */
datetkn * static datetkn *
datebsearch(char *key, datetkn *base, unsigned int nel) datebsearch(char *key, datetkn *base, unsigned int nel)
{ {
register datetkn *last = base + nel - 1, *position; register datetkn *last = base + nel - 1, *position;
...@@ -3414,7 +3435,8 @@ datebsearch(char *key, datetkn *base, unsigned int nel) ...@@ -3414,7 +3435,8 @@ datebsearch(char *key, datetkn *base, unsigned int nel)
/* EncodeSpecialDateTime() /* EncodeSpecialDateTime()
* Convert reserved datetime data type to string. * Convert reserved datetime data type to string.
*/ */
int EncodeSpecialDateTime(DateTime dt, char *str) static int
EncodeSpecialDateTime(DateTime dt, char *str)
{ {
if (DATETIME_IS_RESERVED(dt)) { if (DATETIME_IS_RESERVED(dt)) {
if (DATETIME_IS_INVALID(dt)) { if (DATETIME_IS_INVALID(dt)) {
......
This diff is collapsed.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.2 1997/03/14 23:20:20 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.3 1997/08/19 21:34:40 momjian Exp $
* *
* XXX These are totally bogus. * XXX These are totally bogus.
* *
...@@ -65,6 +65,7 @@ areajoinsel(Oid opid, ...@@ -65,6 +65,7 @@ areajoinsel(Oid opid,
* below) a given box? * below) a given box?
*/ */
#ifdef NOT_USED
float64 float64
leftsel(Oid opid, leftsel(Oid opid,
Oid relid, Oid relid,
...@@ -78,7 +79,9 @@ leftsel(Oid opid, ...@@ -78,7 +79,9 @@ leftsel(Oid opid,
*result = 1.0 / 6.0; *result = 1.0 / 6.0;
return(result); return(result);
} }
#endif
#ifdef NOT_USED
float64 float64
leftjoinsel(Oid opid, leftjoinsel(Oid opid,
Oid relid, Oid relid,
...@@ -92,10 +95,12 @@ leftjoinsel(Oid opid, ...@@ -92,10 +95,12 @@ leftjoinsel(Oid opid,
*result = 1.0 / 6.0; *result = 1.0 / 6.0;
return(result); return(result);
} }
#endif
/* /*
* contsel -- How likely is a box to contain (be contained by) a given box? * contsel -- How likely is a box to contain (be contained by) a given box?
*/ */
#ifdef NOT_USED
float64 float64
contsel(Oid opid, contsel(Oid opid,
Oid relid, Oid relid,
...@@ -109,7 +114,9 @@ contsel(Oid opid, ...@@ -109,7 +114,9 @@ contsel(Oid opid,
*result = 1.0 / 10.0; *result = 1.0 / 10.0;
return(result); return(result);
} }
#endif
#ifdef NOT_USED
float64 float64
contjoinsel(Oid opid, contjoinsel(Oid opid,
Oid relid, Oid relid,
...@@ -123,3 +130,4 @@ contjoinsel(Oid opid, ...@@ -123,3 +130,4 @@ contjoinsel(Oid opid,
*result = 1.0 / 10.0; *result = 1.0 / 10.0;
return(result); return(result);
} }
#endif
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include "utils/palloc.h" #include "utils/palloc.h"
#include "utils/builtins.h" /* where the function declarations go */ #include "utils/builtins.h" /* where the function declarations go */
static int like(char *text, char *p);
/* /*
* interface routines called by the function manager * interface routines called by the function manager
*/ */
...@@ -139,7 +141,7 @@ bool textnlike(struct varlena *s, struct varlena *p) ...@@ -139,7 +141,7 @@ bool textnlike(struct varlena *s, struct varlena *p)
} }
/* $Revision: 1.5 $ /* $Revision: 1.6 $
** "like.c" A first attempt at a LIKE operator for Postgres95. ** "like.c" A first attempt at a LIKE operator for Postgres95.
** **
** Originally written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986. ** Originally written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
...@@ -214,7 +216,7 @@ DoMatch(register char *text, register char *p) ...@@ -214,7 +216,7 @@ DoMatch(register char *text, register char *p)
/* /*
** User-level routine. Returns TRUE or FALSE. ** User-level routine. Returns TRUE or FALSE.
*/ */
int static int
like(char *text, char *p) like(char *text, char *p)
{ {
if (p[0] == '%' && p[1] == '\0') if (p[0] == '%' && p[1] == '\0')
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.30 1997/08/12 22:54:32 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.31 1997/08/19 21:34:42 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "utils/builtins.h" #include "utils/builtins.h"
#include "access/xact.h" #include "access/xact.h"
static AbsoluteTime tm2abstime(struct tm *tm, int tz);
#define MIN_DAYNUM -24856 /* December 13, 1901 */ #define MIN_DAYNUM -24856 /* December 13, 1901 */
#define MAX_DAYNUM 24854 /* January 18, 2038 */ #define MAX_DAYNUM 24854 /* January 18, 2038 */
...@@ -170,7 +171,7 @@ printf( "datetime2tm- (localtime) %d.%02d.%02d %02d:%02d:%02d %s dst=%d\n", ...@@ -170,7 +171,7 @@ printf( "datetime2tm- (localtime) %d.%02d.%02d %02d:%02d:%02d %s dst=%d\n",
* Convert a tm structure to abstime. * Convert a tm structure to abstime.
* Note that tm has full year (not 1900-based) and 1-based month. * Note that tm has full year (not 1900-based) and 1-based month.
*/ */
AbsoluteTime static AbsoluteTime
tm2abstime( struct tm *tm, int tz) tm2abstime( struct tm *tm, int tz)
{ {
int day, sec; int day, sec;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.5 1997/08/18 20:53:41 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.6 1997/08/19 21:34:45 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -130,10 +130,12 @@ int namecpy(Name n1, Name n2) ...@@ -130,10 +130,12 @@ int namecpy(Name n1, Name n2)
return(0); return(0);
} }
#ifdef NOT_USED
int namecat(Name n1, Name n2) int namecat(Name n1, Name n2)
{ {
return(namestrcat(n1, n2->data)); /* n2 can't be any longer than n1 */ return(namestrcat(n1, n2->data)); /* n2 can't be any longer than n1 */
} }
#endif
int namecmp(Name n1, Name n2) int namecmp(Name n1, Name n2)
{ {
...@@ -149,6 +151,7 @@ namestrcpy(Name name, char *str) ...@@ -149,6 +151,7 @@ namestrcpy(Name name, char *str)
return(0); return(0);
} }
#ifdef NOT_USED
int namestrcat(Name name, char *str) int namestrcat(Name name, char *str)
{ {
int i; int i;
...@@ -165,6 +168,7 @@ int namestrcat(Name name, char *str) ...@@ -165,6 +168,7 @@ int namestrcat(Name name, char *str)
} }
return(0); return(0);
} }
#endif
int int
namestrcmp(Name name, char *str) namestrcmp(Name name, char *str)
...@@ -182,6 +186,7 @@ namestrcmp(Name name, char *str) ...@@ -182,6 +186,7 @@ namestrcmp(Name name, char *str)
* PRIVATE ROUTINES * * PRIVATE ROUTINES *
*****************************************************************************/ *****************************************************************************/
#ifdef NOT_USED
uint32 uint32
NameComputeLength(Name name) NameComputeLength(Name name)
{ {
...@@ -195,3 +200,4 @@ NameComputeLength(Name name) ...@@ -195,3 +200,4 @@ NameComputeLength(Name name)
} }
return (uint32)length; return (uint32)length;
} }
#endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.2 1996/11/06 06:49:53 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.3 1997/08/19 21:34:48 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include "access/relscan.h" #include "access/relscan.h"
#include "utils/builtins.h" /* where function decls go */ #include "utils/builtins.h" /* where function decls go */
static int my_varattno(Relation rd, char *a);
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* *
* ---------------------------------------------------------------- * ----------------------------------------------------------------
...@@ -107,7 +109,7 @@ bool oidnotin(Oid the_oid, char *compare) ...@@ -107,7 +109,7 @@ bool oidnotin(Oid the_oid, char *compare)
* If varattno (in parser/catalog_utils.h) ever is added to * If varattno (in parser/catalog_utils.h) ever is added to
* cinterface.a, this routine should go away * cinterface.a, this routine should go away
*/ */
int my_varattno(Relation rd, char *a) static int my_varattno(Relation rd, char *a)
{ {
int i; int i;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.12 1997/08/12 22:54:34 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.13 1997/08/19 21:34:51 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -134,6 +134,7 @@ ltoa(int32 l, char *a) ...@@ -134,6 +134,7 @@ ltoa(int32 l, char *a)
** stars ("*****") and returns zero. Normal return is the width ** stars ("*****") and returns zero. Normal return is the width
** of the output field (sometimes shorter than 'width'). ** of the output field (sometimes shorter than 'width').
*/ */
#ifdef NOT_USED
int int
ftoa(double value, char *ascii, int width, int prec1, char format) ftoa(double value, char *ascii, int width, int prec1, char format)
{ {
...@@ -286,6 +287,7 @@ ftoa(double value, char *ascii, int width, int prec1, char format) ...@@ -286,6 +287,7 @@ ftoa(double value, char *ascii, int width, int prec1, char format)
return (avail); return (avail);
#endif /* !BSD44_derived */ #endif /* !BSD44_derived */
} }
#endif
/* /*
** atof1 - ASCII TO FLOATING CONVERSION ** atof1 - ASCII TO FLOATING CONVERSION
...@@ -315,6 +317,7 @@ ftoa(double value, char *ascii, int width, int prec1, char format) ...@@ -315,6 +317,7 @@ ftoa(double value, char *ascii, int width, int prec1, char format)
** Side Effects: ** Side Effects:
** clobbers *val. ** clobbers *val.
*/ */
#ifdef NOT_USED
int int
atof1(char *str, double *val) atof1(char *str, double *val)
{ {
...@@ -404,3 +407,4 @@ atof1(char *str, double *val) ...@@ -404,3 +407,4 @@ atof1(char *str, double *val)
*val = v; *val = v;
return (0); return (0);
} }
#endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.17 1997/07/29 16:12:07 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.18 1997/08/19 21:34:54 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -81,6 +81,7 @@ byteain(char *inputText) ...@@ -81,6 +81,7 @@ byteain(char *inputText)
* BUGS: Extremely unportable as things shoved can be string * BUGS: Extremely unportable as things shoved can be string
* representations of structs, etc. * representations of structs, etc.
*/ */
#ifdef NOT_USED
struct varlena * struct varlena *
shove_bytes(unsigned char *stuff, int len) shove_bytes(unsigned char *stuff, int len)
{ {
...@@ -93,7 +94,7 @@ shove_bytes(unsigned char *stuff, int len) ...@@ -93,7 +94,7 @@ shove_bytes(unsigned char *stuff, int len)
len - sizeof(int32)); len - sizeof(int32));
return(result); return(result);
} }
#endif
/* /*
...@@ -202,7 +203,7 @@ textout(struct varlena *vlena) ...@@ -202,7 +203,7 @@ textout(struct varlena *vlena)
* returns the actual length of a text* (which may be less than * returns the actual length of a text* (which may be less than
* the VARSIZE of the text*) * the VARSIZE of the text*)
*/ */
#ifdef NOT_USED
int textlen (text* t) int textlen (text* t)
{ {
int i = 0; int i = 0;
...@@ -212,6 +213,7 @@ int textlen (text* t) ...@@ -212,6 +213,7 @@ int textlen (text* t)
i++; i++;
return i; return i;
} }
#endif
/* /*
* textcat - * textcat -
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.6 1996/12/04 03:06:09 bryanh Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.7 1997/08/19 21:34:58 momjian Exp $
* *
* Notes: * Notes:
* XXX This needs to use exception.h to handle recovery when * XXX This needs to use exception.h to handle recovery when
...@@ -34,6 +34,14 @@ ...@@ -34,6 +34,14 @@
#include "catalog/pg_type.h" /* for OID of int28 type */ #include "catalog/pg_type.h" /* for OID of int28 type */
#include "lib/dllist.h" #include "lib/dllist.h"
static void CatCacheRemoveCTup(CatCache *cache, Dlelem *e);
static Index CatalogCacheComputeHashIndex(struct catcache *cacheInP);
static Index CatalogCacheComputeTupleHashIndex(struct catcache *cacheInOutP,
Relation relation, HeapTuple tuple);
static void CatalogCacheInitializeCache(struct catcache *cache,
Relation relation);
static long comphash(long l, char *v);
/* ---------------- /* ----------------
* variables, macros and other stuff * variables, macros and other stuff
* *
...@@ -106,7 +114,7 @@ static long eqproc[] = { ...@@ -106,7 +114,7 @@ static long eqproc[] = {
#define CatalogCacheInitializeCache_DEBUG2 #define CatalogCacheInitializeCache_DEBUG2
#endif #endif
void static void
CatalogCacheInitializeCache(struct catcache *cache, CatalogCacheInitializeCache(struct catcache *cache,
Relation relation) Relation relation)
{ {
...@@ -249,12 +257,14 @@ CatalogCacheInitializeCache(struct catcache *cache, ...@@ -249,12 +257,14 @@ CatalogCacheInitializeCache(struct catcache *cache,
* XXX temporary function * XXX temporary function
* -------------------------------- * --------------------------------
*/ */
#ifdef NOT_USED
void void
CatalogCacheSetId(CatCache *cacheInOutP, int id) CatalogCacheSetId(CatCache *cacheInOutP, int id)
{ {
Assert(id == InvalidCatalogCacheId || id >= 0); Assert(id == InvalidCatalogCacheId || id >= 0);
cacheInOutP->id = id; cacheInOutP->id = id;
} }
#endif
/* ---------------- /* ----------------
* comphash -- * comphash --
...@@ -266,7 +276,7 @@ CatalogCacheSetId(CatCache *cacheInOutP, int id) ...@@ -266,7 +276,7 @@ CatalogCacheSetId(CatCache *cacheInOutP, int id)
* v is the attribute value ("Datum") * v is the attribute value ("Datum")
* ---------------- * ----------------
*/ */
long static long
comphash(long l, register char *v) comphash(long l, register char *v)
{ {
long i; long i;
...@@ -305,7 +315,7 @@ comphash(long l, register char *v) ...@@ -305,7 +315,7 @@ comphash(long l, register char *v)
* CatalogCacheComputeHashIndex * CatalogCacheComputeHashIndex
* -------------------------------- * --------------------------------
*/ */
Index static Index
CatalogCacheComputeHashIndex(struct catcache *cacheInP) CatalogCacheComputeHashIndex(struct catcache *cacheInP)
{ {
Index hashIndex; Index hashIndex;
...@@ -346,7 +356,7 @@ CatalogCacheComputeHashIndex(struct catcache *cacheInP) ...@@ -346,7 +356,7 @@ CatalogCacheComputeHashIndex(struct catcache *cacheInP)
* CatalogCacheComputeTupleHashIndex * CatalogCacheComputeTupleHashIndex
* -------------------------------- * --------------------------------
*/ */
Index static Index
CatalogCacheComputeTupleHashIndex(struct catcache *cacheInOutP, CatalogCacheComputeTupleHashIndex(struct catcache *cacheInOutP,
Relation relation, Relation relation,
HeapTuple tuple) HeapTuple tuple)
...@@ -410,7 +420,7 @@ CatalogCacheComputeTupleHashIndex(struct catcache *cacheInOutP, ...@@ -410,7 +420,7 @@ CatalogCacheComputeTupleHashIndex(struct catcache *cacheInOutP,
* CatCacheRemoveCTup * CatCacheRemoveCTup
* -------------------------------- * --------------------------------
*/ */
void static void
CatCacheRemoveCTup(CatCache *cache, Dlelem *elt) CatCacheRemoveCTup(CatCache *cache, Dlelem *elt)
{ {
CatCTup *ct; CatCTup *ct;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.3 1996/11/08 05:59:55 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.4 1997/08/19 21:35:06 momjian Exp $
* *
* Note - this code is real crufty... * Note - this code is real crufty...
* *
...@@ -31,6 +31,13 @@ ...@@ -31,6 +31,13 @@
#include "catalog/catname.h" /* XXX to support hacks below */ #include "catalog/catname.h" /* XXX to support hacks below */
#include "utils/syscache.h" /* XXX to support the hacks below */ #include "utils/syscache.h" /* XXX to support the hacks below */
static InvalidationEntry InvalidationEntryAllocate(uint16 size);
static void LocalInvalidInvalidate(LocalInvalid invalid, void (*function)());
static LocalInvalid LocalInvalidRegister(LocalInvalid invalid,
InvalidationEntry entry);
static void getmyrelids(void);
/* ---------------- /* ----------------
* private invalidation structures * private invalidation structures
* ---------------- * ----------------
...@@ -83,7 +90,7 @@ Oid MyAMOPRelationId = InvalidOid; ...@@ -83,7 +90,7 @@ Oid MyAMOPRelationId = InvalidOid;
* Allocates an invalidation entry. * Allocates an invalidation entry.
* -------------------------------- * --------------------------------
*/ */
InvalidationEntry static InvalidationEntry
InvalidationEntryAllocate(uint16 size) InvalidationEntryAllocate(uint16 size)
{ {
InvalidationEntryData *entryDataP; InvalidationEntryData *entryDataP;
...@@ -98,7 +105,7 @@ InvalidationEntryAllocate(uint16 size) ...@@ -98,7 +105,7 @@ InvalidationEntryAllocate(uint16 size)
* Returns a new local cache invalidation state containing a new entry. * Returns a new local cache invalidation state containing a new entry.
* -------------------------------- * --------------------------------
*/ */
LocalInvalid static LocalInvalid
LocalInvalidRegister(LocalInvalid invalid, LocalInvalidRegister(LocalInvalid invalid,
InvalidationEntry entry) InvalidationEntry entry)
{ {
...@@ -116,7 +123,7 @@ LocalInvalidRegister(LocalInvalid invalid, ...@@ -116,7 +123,7 @@ LocalInvalidRegister(LocalInvalid invalid,
* invalidation state. * invalidation state.
* -------------------------------- * --------------------------------
*/ */
void static void
LocalInvalidInvalidate(LocalInvalid invalid, void (*function)()) LocalInvalidInvalidate(LocalInvalid invalid, void (*function)())
{ {
InvalidationEntryData *entryDataP; InvalidationEntryData *entryDataP;
...@@ -230,7 +237,7 @@ RelationIdRegisterLocalInvalid(Oid relationId, Oid objectId) ...@@ -230,7 +237,7 @@ RelationIdRegisterLocalInvalid(Oid relationId, Oid objectId)
* getmyrelids * getmyrelids
* -------------------------------- * --------------------------------
*/ */
void static void
getmyrelids() getmyrelids()
{ {
HeapTuple tuple; HeapTuple tuple;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.2 1996/10/31 05:55:32 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.3 1997/08/19 21:35:11 momjian Exp $
* *
* NOTES * NOTES
* Eventually, the index information should go through here, too. * Eventually, the index information should go through here, too.
...@@ -434,6 +434,7 @@ get_typbyval(Oid typid) ...@@ -434,6 +434,7 @@ get_typbyval(Oid typid)
* not. Returns 1 if by value, 0 if by reference. * not. Returns 1 if by value, 0 if by reference.
* *
*/ */
#ifdef NOT_USED
char char
get_typalign(Oid typid) get_typalign(Oid typid)
{ {
...@@ -446,6 +447,7 @@ get_typalign(Oid typid) ...@@ -446,6 +447,7 @@ get_typalign(Oid typid)
else else
return ('i'); return ('i');
} }
#endif
/* /*
* get_typdefault - * get_typdefault -
...@@ -469,6 +471,7 @@ get_typdefault(Oid typid) ...@@ -469,6 +471,7 @@ get_typdefault(Oid typid)
* It returns the null char if the cache lookup fails... * It returns the null char if the cache lookup fails...
* *
*/ */
#ifdef NOT_USED
char char
get_typtype(Oid typid) get_typtype(Oid typid)
{ {
...@@ -482,4 +485,4 @@ get_typtype(Oid typid) ...@@ -482,4 +485,4 @@ get_typtype(Oid typid)
return('\0'); return('\0');
} }
} }
#endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.14 1997/08/19 04:44:21 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.15 1997/08/19 21:35:13 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -85,6 +85,12 @@ ...@@ -85,6 +85,12 @@
#include "catalog/index.h" #include "catalog/index.h"
#include "fmgr.h" #include "fmgr.h"
static void RelationFlushRelation(Relation *relationPtr,
bool onlyFlushReferenceCountZero);
static Relation RelationNameCacheGetRelation(char *relationName);
static void init_irels(void);
static void write_irels(void);
/* ---------------- /* ----------------
* defines * defines
* ---------------- * ----------------
...@@ -1075,7 +1081,7 @@ RelationIdCacheGetRelation(Oid relationId) ...@@ -1075,7 +1081,7 @@ RelationIdCacheGetRelation(Oid relationId)
* RelationNameCacheGetRelation * RelationNameCacheGetRelation
* -------------------------------- * --------------------------------
*/ */
Relation static Relation
RelationNameCacheGetRelation(char *relationName) RelationNameCacheGetRelation(char *relationName)
{ {
Relation rd; Relation rd;
...@@ -1185,6 +1191,7 @@ RelationNameGetRelation(char *relationName) ...@@ -1185,6 +1191,7 @@ RelationNameGetRelation(char *relationName)
* old "getreldesc" interface. * old "getreldesc" interface.
* ---------------- * ----------------
*/ */
#ifdef NOT_USED
Relation Relation
getreldesc(char *relationName) getreldesc(char *relationName)
{ {
...@@ -1197,6 +1204,7 @@ getreldesc(char *relationName) ...@@ -1197,6 +1204,7 @@ getreldesc(char *relationName)
return RelationNameGetRelation(relationName); return RelationNameGetRelation(relationName);
} }
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* cache invalidation support routines * cache invalidation support routines
...@@ -1221,7 +1229,7 @@ RelationClose(Relation relation) ...@@ -1221,7 +1229,7 @@ RelationClose(Relation relation)
* anything anymore. * anything anymore.
* -------------------------------- * --------------------------------
*/ */
void static void
RelationFlushRelation(Relation *relationPtr, RelationFlushRelation(Relation *relationPtr,
bool onlyFlushReferenceCountZero) bool onlyFlushReferenceCountZero)
{ {
...@@ -1606,7 +1614,7 @@ RelationInitialize(void) ...@@ -1606,7 +1614,7 @@ RelationInitialize(void)
/* pg_attnumind, pg_classnameind, pg_classoidind */ /* pg_attnumind, pg_classnameind, pg_classoidind */
#define Num_indices_bootstrap 3 #define Num_indices_bootstrap 3
void static void
init_irels(void) init_irels(void)
{ {
Size len; Size len;
...@@ -1746,7 +1754,7 @@ init_irels(void) ...@@ -1746,7 +1754,7 @@ init_irels(void)
} }
} }
void static void
write_irels(void) write_irels(void)
{ {
int len; int len;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.14 1997/08/12 22:54:46 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.15 1997/08/19 21:35:17 momjian Exp $
* *
* NOTE * NOTE
* XXX this code needs improvement--check for state violations and * XXX this code needs improvement--check for state violations and
...@@ -24,6 +24,11 @@ ...@@ -24,6 +24,11 @@
#include "utils/exc.h" #include "utils/exc.h"
#include "storage/ipc.h" #include "storage/ipc.h"
static void ExcUnCaught(Exception *excP, ExcDetail detail, ExcData data,
ExcMessage message);
static void ExcPrint(Exception *excP, ExcDetail detail, ExcData data,
ExcMessage message);
/* /*
* Global Variables * Global Variables
*/ */
...@@ -86,7 +91,7 @@ EnableExceptionHandling(bool on) ...@@ -86,7 +91,7 @@ EnableExceptionHandling(bool on)
ExceptionHandlingEnabled = on; ExceptionHandlingEnabled = on;
} }
void static void
ExcPrint(Exception *excP, ExcPrint(Exception *excP,
ExcDetail detail, ExcDetail detail,
ExcData data, ExcData data,
...@@ -129,12 +134,15 @@ ExcPrint(Exception *excP, ...@@ -129,12 +134,15 @@ ExcPrint(Exception *excP,
fflush(stderr); fflush(stderr);
} }
#ifdef NOT_USED
ExcProc * ExcProc *
ExcGetUnCaught(void) ExcGetUnCaught(void)
{ {
return (ExcUnCaughtP); return (ExcUnCaughtP);
} }
#endif
#ifdef NOT_USED
ExcProc * ExcProc *
ExcSetUnCaught(ExcProc *newP) ExcSetUnCaught(ExcProc *newP)
{ {
...@@ -144,8 +152,9 @@ ExcSetUnCaught(ExcProc *newP) ...@@ -144,8 +152,9 @@ ExcSetUnCaught(ExcProc *newP)
return (oldP); return (oldP);
} }
#endif
void static void
ExcUnCaught(Exception *excP, ExcUnCaught(Exception *excP,
ExcDetail detail, ExcDetail detail,
ExcData data, ExcData data,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.2 1996/11/08 06:00:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.3 1997/08/19 21:35:21 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -207,6 +207,7 @@ fmgr(Oid procedureId, ... ) ...@@ -207,6 +207,7 @@ fmgr(Oid procedureId, ... )
* *
* func_ptr, func_id, n_arguments, args... * func_ptr, func_id, n_arguments, args...
*/ */
#ifdef NOT_USED
char * char *
fmgr_ptr(func_ptr user_fn, Oid func_id, ...) fmgr_ptr(func_ptr user_fn, Oid func_id, ...)
{ {
...@@ -230,6 +231,7 @@ fmgr_ptr(func_ptr user_fn, Oid func_id, ...) ...@@ -230,6 +231,7 @@ fmgr_ptr(func_ptr user_fn, Oid func_id, ...)
return(fmgr_c(user_fn, func_id, n_arguments, &values, return(fmgr_c(user_fn, func_id, n_arguments, &values,
&isNull)); &isNull));
} }
#endif
/* /*
* This routine is not well thought out. When I get around to adding a * This routine is not well thought out. When I get around to adding a
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/hash/hashfn.c,v 1.2 1996/11/03 06:54:16 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/hash/hashfn.c,v 1.3 1997/08/19 21:35:33 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -125,6 +125,7 @@ tag_hash(int *key, int keysize) ...@@ -125,6 +125,7 @@ tag_hash(int *key, int keysize)
* instructions. If this routine is heavily used enough, it's * instructions. If this routine is heavily used enough, it's
* worth the ugly coding * worth the ugly coding
*/ */
#ifdef NOT_USED
long long
disk_hash(char *key) disk_hash(char *key)
{ {
...@@ -154,5 +155,5 @@ disk_hash(char *key) ...@@ -154,5 +155,5 @@ disk_hash(char *key)
} }
return(n); return(n);
} }
#endif
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.5 1997/04/27 19:20:37 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.6 1997/08/19 21:35:44 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -101,6 +101,7 @@ ExitPostgres(ExitStatus status) ...@@ -101,6 +101,7 @@ ExitPostgres(ExitStatus status)
* Exceptions: * Exceptions:
* none * none
*/ */
#ifdef NOT_USED
void void
AbortPostgres() AbortPostgres()
{ {
...@@ -115,6 +116,7 @@ AbortPostgres() ...@@ -115,6 +116,7 @@ AbortPostgres()
else else
exitpg(FatalExitStatus); exitpg(FatalExitStatus);
} }
#endif
/* ---------------- /* ----------------
* StatusBackendExit * StatusBackendExit
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.10 1997/08/12 22:54:54 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.11 1997/08/19 21:35:50 momjian Exp $
* *
* NOTES * NOTES
* InitPostgres() is the function called from PostgresMain * InitPostgres() is the function called from PostgresMain
...@@ -71,6 +71,11 @@ ...@@ -71,6 +71,11 @@
#include "port-protos.h" #include "port-protos.h"
#include "libpq/libpq-be.h" #include "libpq/libpq-be.h"
static void InitCommunication(void);
static void InitMyDatabaseId(void);
static void InitStdio(void);
static void InitUserid(void);
static IPCKey PostgresIpcKey; static IPCKey PostgresIpcKey;
...@@ -108,7 +113,7 @@ static IPCKey PostgresIpcKey; ...@@ -108,7 +113,7 @@ static IPCKey PostgresIpcKey;
* database directory but before we open any relations. * database directory but before we open any relations.
* -------------------------------- * --------------------------------
*/ */
void static void
InitMyDatabaseId() InitMyDatabaseId()
{ {
int dbfd; int dbfd;
...@@ -334,7 +339,7 @@ DoChdirAndInitDatabaseNameAndPath(char *name) { ...@@ -334,7 +339,7 @@ DoChdirAndInitDatabaseNameAndPath(char *name) {
* initializes crap associated with the user id. * initializes crap associated with the user id.
* -------------------------------- * --------------------------------
*/ */
void static void
InitUserid() InitUserid()
{ {
setuid(geteuid()); setuid(geteuid());
...@@ -351,7 +356,7 @@ InitUserid() ...@@ -351,7 +356,7 @@ InitUserid()
* This does not set MyBackendId. MyBackendTag is set, however. * This does not set MyBackendId. MyBackendTag is set, however.
* -------------------------------- * --------------------------------
*/ */
void static void
InitCommunication() InitCommunication()
{ {
char *postid; char *postid;
...@@ -460,7 +465,7 @@ InitCommunication() ...@@ -460,7 +465,7 @@ InitCommunication()
* they all seem to do stuff associated with io. * they all seem to do stuff associated with io.
* -------------------------------- * --------------------------------
*/ */
void static void
InitStdio() InitStdio()
{ {
DebugFileOpen(); DebugFileOpen();
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.4 1996/11/10 03:03:45 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.5 1997/08/19 21:35:54 momjian Exp $
* *
* NOTE * NOTE
* XXX This is a preliminary implementation which lacks fail-fast * XXX This is a preliminary implementation which lacks fail-fast
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
# include <string.h> # include <string.h>
#endif #endif
static void AllocPointerDump(AllocPointer pointer);
static int AllocSetIterate(AllocSet set,
void (*function)(AllocPointer pointer));
#undef AllocSetReset #undef AllocSetReset
#undef malloc #undef malloc
#undef free #undef free
...@@ -273,7 +277,7 @@ AllocSetRealloc(AllocSet set, AllocPointer pointer, Size size) ...@@ -273,7 +277,7 @@ AllocSetRealloc(AllocSet set, AllocPointer pointer, Size size)
* Exceptions: * Exceptions:
* BadArg if set is invalid. * BadArg if set is invalid.
*/ */
int static int
AllocSetIterate(AllocSet set, AllocSetIterate(AllocSet set,
void (*function)(AllocPointer pointer)) void (*function)(AllocPointer pointer))
{ {
...@@ -295,6 +299,7 @@ AllocSetIterate(AllocSet set, ...@@ -295,6 +299,7 @@ AllocSetIterate(AllocSet set,
return (count); return (count);
} }
#ifdef NOT_USED
int int
AllocSetCount(AllocSet set) AllocSetCount(AllocSet set)
{ {
...@@ -310,6 +315,7 @@ AllocSetCount(AllocSet set) ...@@ -310,6 +315,7 @@ AllocSetCount(AllocSet set)
} }
return count; return count;
} }
#endif
/* /*
* Private routines * Private routines
...@@ -367,7 +373,7 @@ AllocPointerGetNext(AllocPointer pointer) ...@@ -367,7 +373,7 @@ AllocPointerGetNext(AllocPointer pointer)
* XXX AllocPointerDump -- * XXX AllocPointerDump --
* Displays allocated pointer. * Displays allocated pointer.
*/ */
void static void
AllocPointerDump(AllocPointer pointer) AllocPointerDump(AllocPointer pointer)
{ {
printf("\t%-10ld@ %0#lx\n", ((long*)pointer)[-1], (long)pointer); /* XXX */ printf("\t%-10ld@ %0#lx\n", ((long*)pointer)[-1], (long)pointer); /* XXX */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment