Skip to content

Commit 20ad43b

Browse files
committed
Mark functions as static and ifdef NOT_USED as appropriate.
1 parent 5690933 commit 20ad43b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+188
-175
lines changed

src/backend/access/index/istrat.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.44 2000/05/30 04:24:32 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.45 2000/06/08 22:36:51 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -207,6 +207,7 @@ StrategyEvaluationIsValid(StrategyEvaluation evaluation)
207207

208208
#endif
209209

210+
#ifdef NOT_USED
210211
/* ----------------
211212
* StrategyTermEvaluate
212213
* ----------------
@@ -262,7 +263,7 @@ StrategyTermEvaluate(StrategyTerm term,
262263

263264
return result;
264265
}
265-
266+
#endif
266267

267268
/* ----------------
268269
* RelationGetStrategy
@@ -340,6 +341,7 @@ RelationGetStrategy(Relation relation,
340341
return strategy;
341342
}
342343

344+
#ifdef NOT_USED
343345
/* ----------------
344346
* RelationInvokeStrategy
345347
* ----------------
@@ -463,6 +465,7 @@ RelationInvokeStrategy(Relation relation,
463465

464466

465467
}
468+
#endif
466469

467470
/* ----------------
468471
* OperatorRelationFillScanKeyEntry

src/backend/access/nbtree/nbtinsert.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.58 2000/05/30 04:24:33 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.59 2000/06/08 22:36:52 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -30,6 +30,8 @@ static OffsetNumber _bt_pgaddtup(Relation rel, Buffer buf, int keysz, ScanKey it
3030
static bool _bt_goesonpg(Relation rel, Buffer buf, Size keysz, ScanKey scankey, BTItem afteritem);
3131
static void _bt_updateitem(Relation rel, Size keysz, Buffer buf, BTItem oldItem, BTItem newItem);
3232
static bool _bt_isequal(TupleDesc itupdesc, Page page, OffsetNumber offnum, int keysz, ScanKey scankey);
33+
static int32 _bt_tuplecompare(Relation rel, Size keysz, ScanKey scankey,
34+
IndexTuple tuple1, IndexTuple tuple2);
3335

3436
/*
3537
* _bt_doinsert() -- Handle insertion of a single btitem in the tree.
@@ -1360,7 +1362,7 @@ _bt_goesonpg(Relation rel,
13601362
* return -1, 0, or +1
13611363
*
13621364
*/
1363-
int32
1365+
static int32
13641366
_bt_tuplecompare(Relation rel,
13651367
Size keysz,
13661368
ScanKey scankey,

src/backend/access/transam/xact.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.65 2000/05/30 00:49:41 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.66 2000/06/08 22:36:54 momjian Exp $
1212
*
1313
* NOTES
1414
* Transaction aborts can now occur two ways:
@@ -901,6 +901,7 @@ StartTransaction()
901901

902902
}
903903

904+
#ifdef NOT_USED
904905
/* ---------------
905906
* Tell me if we are currently in progress
906907
* ---------------
@@ -910,6 +911,7 @@ CurrentXactInProgress()
910911
{
911912
return CurrentTransactionState->state == TRANS_INPROGRESS;
912913
}
914+
#endif
913915

914916
/* --------------------------------
915917
* CommitTransaction

src/backend/catalog/index.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.113 2000/05/30 04:24:35 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.114 2000/06/08 22:36:59 momjian Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -75,6 +75,7 @@ static void DefaultBuild(Relation heapRelation, Relation indexRelation,
7575
IndexStrategy indexStrategy, uint16 parameterCount,
7676
Datum *parameter, FuncIndexInfoPtr funcInfo, PredInfo *predInfo);
7777
static Oid IndexGetRelation(Oid indexId);
78+
static bool activate_index(Oid indexId, bool activate);
7879

7980
static bool reindexing = false;
8081
extern bool
@@ -2044,7 +2045,7 @@ IndexIsUniqueNoCache(Oid indexId)
20442045
* status per index
20452046
* ---------------------------------
20462047
*/
2047-
bool
2048+
static bool
20482049
activate_index(Oid indexId, bool activate)
20492050
{
20502051
if (!activate) /* Currently does nothing */

src/backend/commands/async.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.64 2000/06/07 04:09:34 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.65 2000/06/08 22:37:01 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -193,14 +193,11 @@ Async_Listen(char *relname, int pid)
193193
{
194194
Relation lRel;
195195
TupleDesc tdesc;
196-
HeapScanDesc scan;
197196
HeapTuple tuple,
198197
newtup;
199198
Datum values[Natts_pg_listener];
200199
char nulls[Natts_pg_listener];
201-
Datum d;
202200
int i;
203-
bool isnull;
204201
TupleDesc tupDesc;
205202

206203
if (Trace_notify)

src/backend/commands/comment.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ static void CommentAggregate(char *aggregate, char *aggtype, char *comment);
4949
static void CommentProc(char *function, List *arguments, char *comment);
5050
static void CommentOperator(char *opname, List *arguments, char *comment);
5151
static void CommentTrigger(char *trigger, char *relation, char *comments);
52+
static void CreateComments(Oid oid, char *comment);
5253

5354
/*------------------------------------------------------------------
5455
* CommentObject --
@@ -120,7 +121,7 @@ CommentObject(int objtype, char *objname, char *objproperty,
120121
*------------------------------------------------------------------
121122
*/
122123

123-
void
124+
static void
124125
CreateComments(Oid oid, char *comment)
125126
{
126127

src/backend/commands/trigger.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.68 2000/05/30 00:49:43 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.69 2000/06/08 22:37:01 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -38,6 +38,9 @@ static HeapTuple GetTupleForTrigger(EState *estate, ItemPointer tid,
3838
static HeapTuple ExecCallTriggerFunc(Trigger *trigger,
3939
TriggerData *trigdata);
4040

41+
static void DeferredTriggerSaveEvent(Relation rel, int event,
42+
HeapTuple oldtup, HeapTuple newtup);
43+
4144

4245
void
4346
CreateTrigger(CreateTrigStmt *stmt)
@@ -1776,7 +1779,7 @@ DeferredTriggerSetState(ConstraintsSetStmt *stmt)
17761779
* Called by ExecAR...Triggers() to add the event to the queue.
17771780
* ----------
17781781
*/
1779-
void
1782+
static void
17801783
DeferredTriggerSaveEvent(Relation rel, int event,
17811784
HeapTuple oldtup, HeapTuple newtup)
17821785
{

src/backend/executor/nodeTidscan.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.7 2000/05/30 00:49:45 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.8 2000/06/08 22:37:03 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -20,7 +20,6 @@
2020
* ExecTidReScan rescans the tid relation.
2121
* ExecEndTidScan releases all storage.
2222
* ExecTidMarkPos marks scan position.
23-
* ExecTidRestrPos restores scan position.
2423
*
2524
*/
2625
#include "postgres.h"
@@ -353,6 +352,7 @@ ExecTidMarkPos(TidScan *node)
353352
tidstate->tss_MarkTidPtr = tidstate->tss_TidPtr;
354353
}
355354

355+
#ifdef NOT_USED
356356
/* ----------------------------------------------------------------
357357
* ExecTidRestrPos
358358
*
@@ -370,6 +370,7 @@ ExecTidRestrPos(TidScan *node)
370370
tidstate = node->tidstate;
371371
tidstate->tss_TidPtr = tidstate->tss_MarkTidPtr;
372372
}
373+
#endif
373374

374375
/* ----------------------------------------------------------------
375376
* ExecInitTidScan

src/backend/lib/dllist.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.17 2000/04/12 17:15:10 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.18 2000/06/08 22:37:05 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -109,11 +109,13 @@ DLGetTailVal(Dllist *l)
109109

110110
#endif
111111

112+
#ifdef NOT_USED
112113
Dlelem *
113114
DLGetPred(Dlelem *e) /* get predecessor */
114115
{
115116
return e ? e->dle_prev : 0;
116117
}
118+
#endif
117119

118120
Dlelem *
119121
DLGetSucc(Dlelem *e) /* get successor */

src/backend/nodes/nodeFuncs.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.11 2000/01/26 05:56:31 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.12 2000/06/08 22:37:07 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -98,6 +98,7 @@ replace_opid(Oper *oper)
9898
* constant (CONST, PARAM) nodes
9999
*****************************************************************************/
100100

101+
#ifdef NOT_USED
101102
/*
102103
* non_null -
103104
* Returns t if the node is a non-null constant, e.g., if the node has a
@@ -113,3 +114,5 @@ non_null(Expr *c)
113114
else
114115
return false;
115116
}
117+
#endif
118+

src/backend/optimizer/path/clausesel.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.37 2000/05/31 15:38:53 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.38 2000/06/08 22:37:09 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -40,6 +40,9 @@ typedef struct RangeQueryClause
4040

4141
static void addRangeClause(RangeQueryClause **rqlist, Node *clause,
4242
int flag, bool isLTsel, Selectivity s2);
43+
static Selectivity clause_selectivity(Query *root,
44+
Node *clause,
45+
int varRelid);
4346

4447

4548
/****************************************************************************
@@ -357,7 +360,7 @@ addRangeClause(RangeQueryClause **rqlist, Node *clause,
357360
* When varRelid is 0, all variables are treated as variables. This
358361
* is appropriate for ordinary join clauses and restriction clauses.
359362
*/
360-
Selectivity
363+
static Selectivity
361364
clause_selectivity(Query *root,
362365
Node *clause,
363366
int varRelid)

src/backend/optimizer/plan/createplan.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.90 2000/05/23 16:56:36 tgl Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.91 2000/06/08 22:37:11 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -74,6 +74,7 @@ static Material *make_material(List *tlist, Oid nonameid, Plan *lefttree,
7474
int keycount);
7575
static void copy_path_costsize(Plan *dest, Path *src);
7676
static void copy_plan_costsize(Plan *dest, Plan *src);
77+
static SeqScan *make_seqscan(List *qptlist, List *qpqual, Index scanrelid);
7778

7879
/*
7980
* create_plan
@@ -1119,7 +1120,7 @@ make_noname(List *tlist,
11191120
}
11201121

11211122

1122-
SeqScan *
1123+
static SeqScan *
11231124
make_seqscan(List *qptlist,
11241125
List *qpqual,
11251126
Index scanrelid)

src/backend/optimizer/prep/prepqual.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.25 2000/04/14 00:19:17 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.26 2000/06/08 22:37:14 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -223,6 +223,7 @@ cnfify(Expr *qual, bool removeAndFlag)
223223
return (List *) newqual;
224224
}
225225

226+
#ifdef NOT_USED
226227
/*
227228
* dnfify
228229
* Convert a qualification to disjunctive normal form by applying
@@ -233,7 +234,7 @@ cnfify(Expr *qual, bool removeAndFlag)
233234
* We do not offer a 'removeOrFlag' in this case; the usages are
234235
* different.
235236
*/
236-
Expr *
237+
static Expr *
237238
dnfify(Expr *qual)
238239
{
239240
Expr *newqual;
@@ -259,6 +260,7 @@ dnfify(Expr *qual)
259260

260261
return newqual;
261262
}
263+
#endif
262264

263265
/*--------------------
264266
* The parser regards AND and OR as purely binary operators, so a qual like

src/backend/optimizer/util/joininfo.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.26 2000/02/06 03:27:33 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.27 2000/06/08 22:37:16 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -17,6 +17,7 @@
1717

1818
#include "optimizer/joininfo.h"
1919

20+
static JoinInfo *joininfo_member(List *join_relids, List *joininfo_list);
2021

2122
/*
2223
* joininfo_member
@@ -32,7 +33,7 @@
3233
* exists.
3334
*
3435
*/
35-
JoinInfo *
36+
static JoinInfo *
3637
joininfo_member(List *join_relids, List *joininfo_list)
3738
{
3839
List *i;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy