Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8c3e8a8

Browse files
committed
From: Tatsuo Ishii <t-ishii@sra.co.jp> Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef NOT_USED" for current. I have tested these patches in that the postgres binaries are identical.
1 parent 1efa3f4 commit 8c3e8a8

Some content is hidden

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

42 files changed

+136
-136
lines changed

src/backend/access/nbtree/nbtree.c

Lines changed: 2 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/nbtree.c,v 1.35 1999/02/13 23:14:36 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.36 1999/02/21 03:48:27 scrappy Exp $
1212
*
1313
* NOTES
1414
* This file contains only the public interface routines.
@@ -372,7 +372,7 @@ btinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation
372372
pfree(btitem);
373373
pfree(itup);
374374

375-
#if 0
375+
#ifdef NOT_USED
376376
/* adjust any active scans that will be affected by this insertion */
377377
_bt_adjscans(rel, &(res->pointerData), BT_INSERT);
378378
#endif

src/backend/access/nbtree/nbtsearch.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.40 1999/02/13 23:14:36 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.41 1999/02/21 03:48:27 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -613,7 +613,7 @@ _bt_compare(Relation rel,
613613
if (!P_RIGHTMOST(opaque))
614614
elog(ERROR, "_bt_compare: invalid comparison to high key");
615615

616-
#if 0
616+
#ifdef NOT_USED
617617

618618
/*
619619
* We just have to belive that right answer will not break
@@ -1398,7 +1398,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
13981398
* maxoff). Scanning in BackwardScanDirection is not
13991399
* understandable at all. Well - new stuff. - vadim 12/06/96
14001400
*/
1401-
#if 0
1401+
#ifdef NOT_USED
14021402
if (PageIsEmpty(page) || start > maxoff)
14031403
{
14041404
ItemPointerSet(current, blkno, maxoff);
@@ -1444,7 +1444,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
14441444
* empty why do scanning in ForwardScanDirection ??? Well - new
14451445
* stuff. - vadim 12/06/96
14461446
*/
1447-
#if 0
1447+
#ifdef NOT_USED
14481448
if (PageIsEmpty(page))
14491449
{
14501450
ItemPointerSet(current, blkno, FirstOffsetNumber);

src/backend/access/nbtree/nbtsort.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
*
77
* IDENTIFICATION
8-
* $Id: nbtsort.c,v 1.36 1999/02/13 23:14:36 momjian Exp $
8+
* $Id: nbtsort.c,v 1.37 1999/02/21 03:48:27 scrappy Exp $
99
*
1010
* NOTES
1111
*
@@ -397,7 +397,7 @@ _bt_tapeclear(BTTapeBlock *tape)
397397
{
398398
/* blow away the contents of the old file */
399399
_bt_taperewind(tape);
400-
#if 0
400+
#ifdef NOT_USED
401401
FileSync(tape->bttb_fd);
402402
#endif
403403
FileTruncate(tape->bttb_fd, 0);
@@ -781,7 +781,7 @@ _bt_blnewpage(Relation index, Buffer *buf, Page *page, int flags)
781781
BTPageOpaque opaque;
782782

783783
*buf = _bt_getbuf(index, P_NEW, BT_WRITE);
784-
#if 0
784+
#ifdef NOT_USED
785785
printf("\tblk=%d\n", BufferGetBlockNumber(*buf));
786786
#endif
787787
*page = BufferGetPage(*buf);
@@ -962,7 +962,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
962962
if (PageAddItem(npage, PageGetItem(opage, ii),
963963
ii->lp_len, n, LP_USED) == InvalidOffsetNumber)
964964
elog(FATAL, "btree: failed to add item to the page in _bt_sort (1)");
965-
#if 0
965+
#ifdef NOT_USED
966966
#if defined(FASTBUILD_DEBUG) && defined(FASTBUILD_MERGE)
967967
{
968968
bool isnull;
@@ -1048,7 +1048,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
10481048
off = OffsetNumberNext(last_off);
10491049
if (PageAddItem(npage, (Item) bti, btisz, off, LP_USED) == InvalidOffsetNumber)
10501050
elog(FATAL, "btree: failed to add item to the page in _bt_sort (2)");
1051-
#if 0
1051+
#ifdef NOT_USED
10521052
#if defined(FASTBUILD_DEBUG) && defined(FASTBUILD_MERGE)
10531053
{
10541054
bool isnull;
@@ -1382,7 +1382,7 @@ _bt_upperbuild(Relation index)
13821382
/* for each page... */
13831383
do
13841384
{
1385-
#if 0
1385+
#ifdef NOT_USED
13861386
printf("\t\tblk=%d\n", blk);
13871387
#endif
13881388
rbuf = _bt_getbuf(index, blk, BT_READ);

src/backend/access/transam/transam.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.23 1999/02/13 23:14:46 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.24 1999/02/21 03:48:28 scrappy Exp $
1111
*
1212
* NOTES
1313
* This file contains the high level access-method interface to the
@@ -300,7 +300,7 @@ TransactionLogUpdate(TransactionId transactionId, /* trans id to update */
300300
static void
301301
TransRecover(Relation logRelation)
302302
{
303-
#if 0
303+
#ifdef NOT_USED
304304
/* ----------------
305305
* first get the last recorded transaction in the log.
306306
* ----------------

src/backend/catalog/pg_proc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.25 1999/02/13 23:14:58 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.26 1999/02/21 03:48:32 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -172,7 +172,7 @@ ProcedureCreate(char *procedureName,
172172
{
173173
elog(NOTICE, "ProcedureCreate: type '%s' is not yet defined",
174174
returnTypeName);
175-
#if 0
175+
#ifdef NOT_USED
176176
elog(NOTICE, "ProcedureCreate: creating a shell for type '%s'",
177177
returnTypeName);
178178
#endif

src/backend/commands/vacuum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.95 1999/02/13 23:15:11 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.96 1999/02/21 03:48:33 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1463,7 +1463,7 @@ vc_vaconeind(VPageList vpl, Relation indrel, int num_tuples)
14631463

14641464
if ((vp = vc_tidreapped(heapptr, vpl)) != (VPageDescr) NULL)
14651465
{
1466-
#if 0
1466+
#ifdef NOT_USED
14671467
elog(DEBUG, "<%x,%x> -> <%x,%x>",
14681468
ItemPointerGetBlockNumber(&(res->index_iptr)),
14691469
ItemPointerGetOffsetNumber(&(res->index_iptr)),

src/backend/executor/execMain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
*
2828
* IDENTIFICATION
29-
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.77 1999/02/13 23:15:17 momjian Exp $
29+
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.78 1999/02/21 03:48:36 scrappy Exp $
3030
*
3131
*-------------------------------------------------------------------------
3232
*/
@@ -1519,7 +1519,7 @@ lreplace:;
15191519
ExecARUpdateTriggers(estate, tupleid, tuple);
15201520
}
15211521

1522-
#if 0
1522+
#ifdef NOT_USED
15231523
static HeapTuple
15241524
ExecAttrDefault(Relation rel, HeapTuple tuple)
15251525
{

src/backend/executor/execQual.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.43 1999/02/13 23:15:18 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.44 1999/02/21 03:48:39 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1609,7 +1609,7 @@ ExecTargetList(List *targetlist,
16091609
curNode < nNodes;
16101610
curNode++, fjTlist = lnext(fjTlist))
16111611
{
1612-
#if 0 /* what is this?? */
1612+
#ifdef NOT_USED /* what is this?? */
16131613
Node *outernode = lfirst(fjTlist);
16141614

16151615
fjRes = (Resdom *) outernode->iterexpr;

src/backend/executor/nodeAppend.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.17 1999/02/13 23:15:21 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.18 1999/02/21 03:48:40 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -332,7 +332,7 @@ ExecInitAppend(Append *node, EState *estate, Plan *parent)
332332
*/
333333
appendstate->as_whichplan = 0;
334334
exec_append_initialize_next(node);
335-
#if 0
335+
#ifdef NOT_USED
336336
result = (List *) initialized[0];
337337
#endif
338338
return TRUE;

src/backend/executor/nodeIndexscan.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.32 1999/02/13 23:15:24 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.33 1999/02/21 03:48:40 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -469,7 +469,7 @@ ExecIndexMarkPos(IndexScan *node)
469469
indexScanDescs = indexstate->iss_ScanDescs;
470470
scanDesc = indexScanDescs[indexPtr];
471471

472-
#if 0
472+
#ifdef NOT_USED
473473
IndexScanMarkPosition(scanDesc);
474474
#endif
475475
index_markpos(scanDesc);
@@ -498,7 +498,7 @@ ExecIndexRestrPos(IndexScan *node)
498498
indexScanDescs = indexstate->iss_ScanDescs;
499499
scanDesc = indexScanDescs[indexPtr];
500500

501-
#if 0
501+
#ifdef NOT_USED
502502
IndexScanRestorePosition(scanDesc);
503503
#endif
504504
index_restrpos(scanDesc);

src/backend/optimizer/path/allpaths.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.42 1999/02/18 05:26:19 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.43 1999/02/21 03:48:41 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -192,7 +192,7 @@ make_one_rel_by_joins(Query *root, List *rels, int levels_needed)
192192

193193
root->join_rel_list = rels = joined_rels;
194194

195-
#if 0
195+
#ifdef NOT_USED
196196
/*
197197
* * for each expensive predicate in each path in each distinct
198198
* rel, * consider doing pullup -- JMH

src/backend/optimizer/path/indxpath.c

Lines changed: 2 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/indxpath.c,v 1.51 1999/02/18 00:49:18 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.52 1999/02/21 03:48:44 scrappy Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1317,7 +1317,7 @@ index_innerjoin(Query *root, RelOptInfo *rel, List *clausegroup_list,
13171317
pathnode->path.loc_restrictinfo = set_difference(copyObject((Node *) rel->restrictinfo),
13181318
clausegroup);
13191319

1320-
#if 0 /* fix xfunc */
1320+
#ifdef NOT_USED /* fix xfunc */
13211321
/* add in cost for expensive functions! -- JMH, 7/7/92 */
13221322
if (XfuncMode != XFUNC_OFF)
13231323
{

src/backend/optimizer/path/orindxpath.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.20 1999/02/13 23:16:21 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.21 1999/02/21 03:48:45 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -125,7 +125,7 @@ create_or_index_paths(Query *root,
125125
pathnode->path.loc_restrictinfo = set_difference(copyObject((Node *) rel->restrictinfo),
126126
lcons(clausenode, NIL));
127127

128-
#if 0 /* fix xfunc */
128+
#ifdef NOT_USED /* fix xfunc */
129129
/* add in cost for expensive functions! -- JMH, 7/7/92 */
130130
if (XfuncMode != XFUNC_OFF)
131131
{

src/backend/optimizer/plan/createplan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.48 1999/02/15 02:04:55 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.49 1999/02/21 03:48:45 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -130,7 +130,7 @@ create_plan(Path *best_path)
130130
pages = 1;
131131
plan_node->plan_tupperpage = tuples / pages;
132132

133-
#if 0 /* fix xfunc */
133+
#ifdef NOT_USED /* fix xfunc */
134134
/* sort clauses by cost/(1-selectivity) -- JMH 2/26/92 */
135135
if (XfuncMode != XFUNC_OFF)
136136
{

src/backend/optimizer/plan/planmain.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.33 1999/02/15 03:22:12 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.34 1999/02/21 03:48:49 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -259,7 +259,7 @@ subplanner(Query *root,
259259

260260
final_rel = make_one_rel(root, root->base_rel_list);
261261

262-
#if 0 /* fix xfunc */
262+
#ifdef NOT_USED /* fix xfunc */
263263

264264
/*
265265
* Perform Predicate Migration on each path, to optimize and correctly
@@ -443,7 +443,7 @@ make_groupPlan(List **tlist,
443443

444444
if (IsA(expr, Var))
445445
{
446-
#if 0 /* subplanVar->resdom->resno expected to
446+
#ifdef NOT_USED /* subplanVar->resdom->resno expected to
447447
* be = te->resdom->resno */
448448
TargetEntry *subplanVar;
449449

src/backend/optimizer/plan/planner.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.44 1999/02/13 23:16:32 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.45 1999/02/21 03:48:49 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -542,7 +542,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
542542
tlist = lnext(tlist);
543543
tletype = exprType(thenode);
544544

545-
#if 0 /* fix me */
545+
#ifdef NOT_USED /* fix me */
546546
/* this is tedious */
547547
if (IsA(thenode, Var))
548548
tletype = (Oid) ((Var *) thenode)->vartype;

0 commit comments

Comments
 (0)