*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.35 1999/02/13 23:14:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.36 1999/02/21 03:48:27 scrappy Exp $
*
* NOTES
* This file contains only the public interface routines.
pfree(btitem);
pfree(itup);
-#if 0
+#ifdef NOT_USED
/* adjust any active scans that will be affected by this insertion */
_bt_adjscans(rel, &(res->pointerData), BT_INSERT);
#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.40 1999/02/13 23:14:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.41 1999/02/21 03:48:27 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
if (!P_RIGHTMOST(opaque))
elog(ERROR, "_bt_compare: invalid comparison to high key");
-#if 0
+#ifdef NOT_USED
/*
* We just have to belive that right answer will not break
* maxoff). Scanning in BackwardScanDirection is not
* understandable at all. Well - new stuff. - vadim 12/06/96
*/
-#if 0
+#ifdef NOT_USED
if (PageIsEmpty(page) || start > maxoff)
{
ItemPointerSet(current, blkno, maxoff);
* empty why do scanning in ForwardScanDirection ??? Well - new
* stuff. - vadim 12/06/96
*/
-#if 0
+#ifdef NOT_USED
if (PageIsEmpty(page))
{
ItemPointerSet(current, blkno, FirstOffsetNumber);
*
*
* IDENTIFICATION
- * $Id: nbtsort.c,v 1.36 1999/02/13 23:14:36 momjian Exp $
+ * $Id: nbtsort.c,v 1.37 1999/02/21 03:48:27 scrappy Exp $
*
* NOTES
*
{
/* blow away the contents of the old file */
_bt_taperewind(tape);
-#if 0
+#ifdef NOT_USED
FileSync(tape->bttb_fd);
#endif
FileTruncate(tape->bttb_fd, 0);
BTPageOpaque opaque;
*buf = _bt_getbuf(index, P_NEW, BT_WRITE);
-#if 0
+#ifdef NOT_USED
printf("\tblk=%d\n", BufferGetBlockNumber(*buf));
#endif
*page = BufferGetPage(*buf);
if (PageAddItem(npage, PageGetItem(opage, ii),
ii->lp_len, n, LP_USED) == InvalidOffsetNumber)
elog(FATAL, "btree: failed to add item to the page in _bt_sort (1)");
-#if 0
+#ifdef NOT_USED
#if defined(FASTBUILD_DEBUG) && defined(FASTBUILD_MERGE)
{
bool isnull;
off = OffsetNumberNext(last_off);
if (PageAddItem(npage, (Item) bti, btisz, off, LP_USED) == InvalidOffsetNumber)
elog(FATAL, "btree: failed to add item to the page in _bt_sort (2)");
-#if 0
+#ifdef NOT_USED
#if defined(FASTBUILD_DEBUG) && defined(FASTBUILD_MERGE)
{
bool isnull;
/* for each page... */
do
{
-#if 0
+#ifdef NOT_USED
printf("\t\tblk=%d\n", blk);
#endif
rbuf = _bt_getbuf(index, blk, BT_READ);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.23 1999/02/13 23:14:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.24 1999/02/21 03:48:28 scrappy Exp $
*
* NOTES
* This file contains the high level access-method interface to the
static void
TransRecover(Relation logRelation)
{
-#if 0
+#ifdef NOT_USED
/* ----------------
* first get the last recorded transaction in the log.
* ----------------
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.25 1999/02/13 23:14:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.26 1999/02/21 03:48:32 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
{
elog(NOTICE, "ProcedureCreate: type '%s' is not yet defined",
returnTypeName);
-#if 0
+#ifdef NOT_USED
elog(NOTICE, "ProcedureCreate: creating a shell for type '%s'",
returnTypeName);
#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.95 1999/02/13 23:15:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.96 1999/02/21 03:48:33 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
if ((vp = vc_tidreapped(heapptr, vpl)) != (VPageDescr) NULL)
{
-#if 0
+#ifdef NOT_USED
elog(DEBUG, "<%x,%x> -> <%x,%x>",
ItemPointerGetBlockNumber(&(res->index_iptr)),
ItemPointerGetOffsetNumber(&(res->index_iptr)),
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.77 1999/02/13 23:15:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.78 1999/02/21 03:48:36 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
ExecARUpdateTriggers(estate, tupleid, tuple);
}
-#if 0
+#ifdef NOT_USED
static HeapTuple
ExecAttrDefault(Relation rel, HeapTuple tuple)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.43 1999/02/13 23:15:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.44 1999/02/21 03:48:39 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
curNode < nNodes;
curNode++, fjTlist = lnext(fjTlist))
{
-#if 0 /* what is this?? */
+#ifdef NOT_USED /* what is this?? */
Node *outernode = lfirst(fjTlist);
fjRes = (Resdom *) outernode->iterexpr;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.17 1999/02/13 23:15:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.18 1999/02/21 03:48:40 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
*/
appendstate->as_whichplan = 0;
exec_append_initialize_next(node);
-#if 0
+#ifdef NOT_USED
result = (List *) initialized[0];
#endif
return TRUE;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.32 1999/02/13 23:15:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.33 1999/02/21 03:48:40 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
indexScanDescs = indexstate->iss_ScanDescs;
scanDesc = indexScanDescs[indexPtr];
-#if 0
+#ifdef NOT_USED
IndexScanMarkPosition(scanDesc);
#endif
index_markpos(scanDesc);
indexScanDescs = indexstate->iss_ScanDescs;
scanDesc = indexScanDescs[indexPtr];
-#if 0
+#ifdef NOT_USED
IndexScanRestorePosition(scanDesc);
#endif
index_restrpos(scanDesc);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.42 1999/02/18 05:26:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.43 1999/02/21 03:48:41 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
root->join_rel_list = rels = joined_rels;
-#if 0
+#ifdef NOT_USED
/*
* * for each expensive predicate in each path in each distinct
* rel, * consider doing pullup -- JMH
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.51 1999/02/18 00:49:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.52 1999/02/21 03:48:44 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
pathnode->path.loc_restrictinfo = set_difference(copyObject((Node *) rel->restrictinfo),
clausegroup);
-#if 0 /* fix xfunc */
+#ifdef NOT_USED /* fix xfunc */
/* add in cost for expensive functions! -- JMH, 7/7/92 */
if (XfuncMode != XFUNC_OFF)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.20 1999/02/13 23:16:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.21 1999/02/21 03:48:45 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
pathnode->path.loc_restrictinfo = set_difference(copyObject((Node *) rel->restrictinfo),
lcons(clausenode, NIL));
-#if 0 /* fix xfunc */
+#ifdef NOT_USED /* fix xfunc */
/* add in cost for expensive functions! -- JMH, 7/7/92 */
if (XfuncMode != XFUNC_OFF)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.48 1999/02/15 02:04:55 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.49 1999/02/21 03:48:45 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
pages = 1;
plan_node->plan_tupperpage = tuples / pages;
-#if 0 /* fix xfunc */
+#ifdef NOT_USED /* fix xfunc */
/* sort clauses by cost/(1-selectivity) -- JMH 2/26/92 */
if (XfuncMode != XFUNC_OFF)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.33 1999/02/15 03:22:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.34 1999/02/21 03:48:49 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
final_rel = make_one_rel(root, root->base_rel_list);
-#if 0 /* fix xfunc */
+#ifdef NOT_USED /* fix xfunc */
/*
* Perform Predicate Migration on each path, to optimize and correctly
if (IsA(expr, Var))
{
-#if 0 /* subplanVar->resdom->resno expected to
+#ifdef NOT_USED /* subplanVar->resdom->resno expected to
* be = te->resdom->resno */
TargetEntry *subplanVar;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.44 1999/02/13 23:16:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.45 1999/02/21 03:48:49 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
tlist = lnext(tlist);
tletype = exprType(thenode);
-#if 0 /* fix me */
+#ifdef NOT_USED /* fix me */
/* this is tedious */
if (IsA(thenode, Var))
tletype = (Oid) ((Var *) thenode)->vartype;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.39 1999/02/20 19:02:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.40 1999/02/21 03:48:54 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
pathnode->path_cost = cost_seqscan(relid,
rel->pages, rel->tuples);
/* add in expensive functions cost! -- JMH, 7/7/92 */
-#if 0
+#ifdef NOT_USED
if (XfuncMode != XFUNC_OFF)
{
pathnode->path_cost += xfunc_get_path_cost(pathnode);
index->pages,
index->tuples,
false);
-#if 0
+#ifdef NOT_USED
/* add in expensive functions cost! -- JMH, 7/7/92 */
if (XfuncMode != XFUNC_OFF)
{
index->tuples,
false);
-#if 0
+#ifdef NOT_USED
/* add in expensive functions cost! -- JMH, 7/7/92 */
if (XfuncMode != XFUNC_OFF)
{
outer_rel->width),
IsA(inner_path, IndexPath));
/* add in expensive function costs -- JMH 7/7/92 */
-#if 0
+#ifdef NOT_USED
if (XfuncMode != XFUNC_OFF)
pathnode->path_cost += xfunc_get_path_cost((Path *) pathnode);
#endif
outerwidth,
innerwidth);
/* add in expensive function costs -- JMH 7/7/92 */
-#if 0
+#ifdef NOT_USED
if (XfuncMode != XFUNC_OFF)
{
pathnode->path_cost += xfunc_get_path_cost((Path *) pathnode);
outersize, innersize,
outerwidth, innerwidth);
/* add in expensive function costs -- JMH 7/7/92 */
-#if 0
+#ifdef NOT_USED
if (XfuncMode != XFUNC_OFF)
{
pathnode->path_cost += xfunc_get_path_cost((Path *) pathnode);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.25 1999/02/13 23:16:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.26 1999/02/21 03:48:54 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
(char *) constFlags[n],
(char *) nIndexKeys,
(char *) indexrelid);
-#if 0
+#ifdef NOT_USED
/*
* So cool guys! Npages for x > 10 and x < 20 is twice as
* npages for x > 10! - vadim 04/09/97
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.27 1999/02/15 05:56:05 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.28 1999/02/21 03:48:55 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/*
* this function is not making sense. - ay 10/94
*/
-#if 0
+#ifdef NOT_USED
List *element = NIL;
List *result = NIL;
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: analyze.c,v 1.99 1999/02/13 23:16:51 momjian Exp $
+ * $Id: analyze.c,v 1.100 1999/02/21 03:48:59 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
break;
case CONSTR_UNIQUE:
-#if FALSE
+#ifdef NOT_USED
if (constraint->name == NULL)
constraint->name = makeTableName(stmt->relname, "key", NULL);
#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.55 1999/02/13 23:17:03 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.56 1999/02/21 03:49:00 scrappy Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
elog(ERROR,"Operator '%s' not implemented for row expressions",opr);
}
-#if FALSE
+#ifdef NOT_USED
while ((largs != NIL) && (rargs != NIL))
{
larg = lfirst(largs);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.10 1998/12/04 15:34:30 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.11 1999/02/21 03:49:03 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
} /* PreferredType() */
-#if FALSE
+#ifdef NOT_USED
Oid
PromoteTypeToNext(Oid inType)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.17 1999/02/13 23:17:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.18 1999/02/21 03:49:03 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
resdomno_target = attnameAttNum(pstate->p_target_relation, target_colname);
attrtype_target = attnumTypeId(pstate->p_target_relation, resdomno_target);
-#if FALSE
+#ifdef NOT_USED
if ((attrtype_id != attrtype_target)
|| (get_atttypmod(rte->relid, resdomno_id) !=
get_atttypmod(pstate->p_target_relation->rd_id, resdomno_target)))
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.10 1999/02/13 23:17:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.11 1999/02/21 03:49:13 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "utils/elog.h"
#include "fmgr.h"
-#if FALSE
+#ifdef NOT_USED
extern char *pg_pathname;
void *
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-#if 0
+#ifdef NOT_USED
#include "sendmail.h"
#include "pathnames.h"
#endif
* causing nast effects.
**************************************************************/
-/*static char _id[] = "$Id: snprintf.c,v 1.20 1999/02/06 21:51:03 tgl Exp $";*/
+/*static char _id[] = "$Id: snprintf.c,v 1.21 1999/02/21 03:49:08 scrappy Exp $";*/
static char *end;
static int SnprfOverflow;
static void
dopr_outch(int c)
{
-#if 0
+#ifdef NOT_USED
if (iscntrl(c) && c != '\n' && c != '\t')
{
c = '@' + (c & 0x1F);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.25 1999/02/13 23:17:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.26 1999/02/21 03:49:17 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
"rules not allowed for insert or delete events to an attribute");
}
-#if 0
+#ifdef NOT_USED
/*
* on retrieve to class.attribute do instead nothing is converted to
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.35 1999/02/13 23:17:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.36 1999/02/21 03:49:18 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/* propagate a known type forward, if available */
if (itype != InvalidOid)
((TargetEntry *) lfirst(prev_target))->resdom->restype = itype;
-#if FALSE
+#ifdef NOT_USED
else
{
((TargetEntry *) lfirst(prev_target))->resdom->restype = UNKNOWNOID;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.48 1999/02/13 23:17:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.49 1999/02/21 03:49:21 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
if (IsUnderPostmaster)
{
SpinAcquire(BufMgrLock);
-#if 0
+#ifdef NOT_USED
for (i = 0; i < NBuffers; ++i, ++buf)
{
elog(NOTICE, "[%02d] (freeNext=%d, freePrev=%d, relname=%s, \
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.43 1999/02/21 01:41:46 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.44 1999/02/21 03:49:22 scrappy Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
MemSet(&item, 0, XID_TAGSIZE);
TransactionIdStore(MyProc->xid, &item.tag.xid);
item.tag.lock = MAKE_OFFSET(findlock);
-#if 0
+#ifdef NOT_USED
item.tag.pid = pid;
#endif
MemSet(&item, 0, XID_TAGSIZE);
TransactionIdStore(proc->xid, &item.tag.xid);
item.tag.lock = MAKE_OFFSET(findlock);
-#if 0
+#ifdef NOT_USED
item.tag.pid = pid;
#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.103 1999/02/18 06:00:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.104 1999/02/21 03:49:27 scrappy Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
#include "utils/ps_status.h"
#include "utils/temprel.h"
-#if FALSE
+#ifdef NOT_USED
#include "nodes/relation.h"
#endif
-#if 0
+#ifdef NOT_USED
#include "optimizer/xfunc.h"
#endif
-#if FALSE
+#ifdef NOT_USED
#include "nodes/plannodes.h"
#endif
-#if FALSE
+#ifdef NOT_USED
#include "nodes/memnodes.h"
#endif
break;
case 'x':
-#if 0 /* planner/xfunc.h */
+#ifdef NOT_USED /* planner/xfunc.h */
/*
* control joey hellerstein's expensive function
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
- puts("$Revision: 1.103 $ $Date: 1999/02/18 06:00:49 $\n");
+ puts("$Revision: 1.104 $ $Date: 1999/02/21 03:49:27 $\n");
}
/* ----------------
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.29 1999/02/13 23:19:07 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.30 1999/02/21 03:49:27 scrappy Exp $
*
* NOTES
* This code is actually (almost) unused.
#define ABSTIMEMIN(t1, t2) abstimele((t1),(t2)) ? (t1) : (t2)
#define ABSTIMEMAX(t1, t2) abstimelt((t1),(t2)) ? (t2) : (t1)
-#if FALSE
+#ifdef NOT_USED
static char *unit_tab[] = {
"second", "seconds", "minute", "minutes",
"hour", "hours", "day", "days", "week", "weeks",
static void reltime2tm(int32 time, struct tm * tm);
-#if FALSE
+#ifdef NOT_USED
static int correct_unit(char *unit, int *unptr);
static int correct_dir(char *direction, int *signptr);
return;
} /* reltime2tm() */
-#if FALSE
+#ifdef NOT_USED
int
dummyfunc()
{
} /* isreltime() */
#endif
-#if FALSE
+#ifdef NOT_USED
int
dummyfunc()
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.28 1999/02/13 23:19:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.29 1999/02/21 03:49:30 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
static int date2tm(DateADT dateVal, int *tzp, struct tm * tm, double *fsec, char **tzn);
-#if 0
+#ifdef NOT_USED
static int day_tab[2][12] = {
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};
elog(ERROR, "Unrecognized date external representation %s", str);
}
-#if 0
+#ifdef NOT_USED
if (tm->tm_year < 0 || tm->tm_year > 32767)
elog(ERROR, "date_in: year must be limited to values 0 through 32767 in '%s'", str);
if (tm->tm_mon < 1 || tm->tm_mon > 12)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.40 1999/02/13 23:19:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.41 1999/02/21 03:49:30 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
cp++;
if (*cp == LDELIM)
{
-#if FALSE
+#ifdef NOT_USED
/* nested delimiters with only one point? */
if (npts <= 1)
return FALSE;
#ifdef GEODEBUG
printf("line_construct_pp- line is vertical\n");
#endif
-#if FALSE
+#ifdef NOT_USED
result->m = DBL_MAX;
#endif
#ifdef GEODEBUG
printf("line_construct_pp- line is horizontal\n");
#endif
-#if FALSE
+#ifdef NOT_USED
result->m = 0.0;
#endif
result->B = -1.0;
result->C = pt->y - m * pt->x;
-#if FALSE
+#ifdef NOT_USED
result->m = m;
#endif
#ifdef GEODEBUG
printf("line_construct_pp- line is vertical\n");
#endif
-#if FALSE
+#ifdef NOT_USED
result->m = DBL_MAX;
#endif
#ifdef GEODEBUG
printf("line_construct_pp- line is horizontal\n");
#endif
-#if FALSE
+#ifdef NOT_USED
result->m = 0.0;
#endif
else
{
/* use "mx - y + yinter = 0" */
-#if FALSE
+#ifdef NOT_USED
result->A = (pt1->y - pt2->y) / (pt1->x - pt2->x);
#endif
result->A = (pt2->y - pt1->y) / (pt2->x - pt1->x);
printf("line_construct_pp- line is neither vertical nor horizontal (diffs x=%.*g, y=%.*g\n",
digits8, (pt2->x - pt1->x), digits8, (pt2->y - pt1->y));
#endif
-#if FALSE
+#ifdef NOT_USED
result->m = result->A;
#endif
}
bool
line_parallel(LINE *l1, LINE *l2)
{
-#if FALSE
+#ifdef NOT_USED
return FPeq(l1->m, l2->m);
#endif
if (FPzero(l1->B))
bool
line_perp(LINE *l1, LINE *l2)
{
-#if FALSE
+#ifdef NOT_USED
if (l1->m)
return FPeq(l2->m / l1->m, -1.0);
else if (l2->m)
bool
line_vertical(LINE *line)
{
-#if FALSE
+#ifdef NOT_USED
return FPeq(line->A, -1.0) && FPzero(line->B);
#endif
return FPzero(line->B);
bool
line_horizontal(LINE *line)
{
-#if FALSE
+#ifdef NOT_USED
return FPzero(line->m);
#endif
return FPzero(line->A);
if (line_parallel(l1, l2))
return NULL;
-#if FALSE
+#ifdef NOT_USED
if (line_vertical(l1))
result = point_construct(l2->m * l1->C + l2->C, l1->C);
else if (line_vertical(l2))
if (line_vertical(l1))
{
-#if FALSE
+#ifdef NOT_USED
x = l1->C;
y = -((l2->A * x + l2->C) / l2->B);
#endif
}
else if (line_vertical(l2))
{
-#if FALSE
+#ifdef NOT_USED
x = l2->C;
y = -((l1->A * x + l1->C) / l1->B);
#endif
}
else
{
-#if FALSE
+#ifdef NOT_USED
x = (l2->B * l1->C - l1->B * l2->C) / (l2->A * l1->B - l1->A * l2->B);
y = -((l1->A * x + l1->C) / l1->B);
#endif
|| (*s != '\0'))
elog(ERROR, "Bad lseg external representation '%s'", str);
-#if FALSE
+#ifdef NOT_USED
lseg->m = point_sl(&lseg->p[0], &lseg->p[1]);
#endif
result->p[1].x = pt2->x;
result->p[1].y = pt2->y;
-#if FALSE
+#ifdef NOT_USED
result->m = point_sl(pt1, pt2);
#endif
lseg->p[1].x = pt2->x;
lseg->p[1].y = pt2->y;
-#if FALSE
+#ifdef NOT_USED
lseg->m = point_sl(pt1, pt2);
#endif
}
bool
lseg_parallel(LSEG *l1, LSEG *l2)
{
-#if FALSE
+#ifdef NOT_USED
return FPeq(l1->m, l2->m);
#endif
return (FPeq(point_sl(&(l1->p[0]), &(l1->p[1])),
}
else
{
-#if FALSE
+#ifdef NOT_USED
m = (-1) * (lseg->p[1].y - lseg->p[0].y) /
(lseg->p[1].x - lseg->p[0].x);
#endif
double invm;
result = palloc(sizeof(Point));
-#if FALSE
+#ifdef NOT_USED
if (FPeq(line->A, -1.0) && FPzero(line->B))
{ /* vertical */
}
result->y = pt->y;
return result;
-#if FALSE
+#ifdef NOT_USED
}
else if (FPzero(line->m))
{ /* horizontal */
return result;
}
/* drop a perpendicular and find the intersection point */
-#if FALSE
+#ifdef NOT_USED
invm = -1.0 / line->m;
#endif
/* invert and flip the sign on the slope to get a perpendicular */
return plist_same(polya->npts, polya->p, polyb->p);
-#if FALSE
+#ifdef NOT_USED
for (i = 0; i < polya->npts; i++)
{
if ((polya->p[i].x != polyb->p[i].x)
* Determine if polygon A contains polygon B by determining if A's
* bounding box contains B's bounding box.
*-----------------------------------------------------------------*/
-#if FALSE
+#ifdef NOT_USED
bool
poly_contain(POLYGON *polya, POLYGON *polyb)
{
* Determine if polygon A is contained by polygon B by determining
* if A's bounding box is contained by B's bounding box.
*-----------------------------------------------------------------*/
-#if FALSE
+#ifdef NOT_USED
bool
poly_contained(POLYGON *polya, POLYGON *polyb)
{
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nabstime.c,v 1.52 1999/02/13 23:19:24 momjian Exp $
+ * $Id: nabstime.c,v 1.53 1999/02/21 03:49:32 scrappy Exp $
*
*/
#include
CTimeZone = -tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */
CDayLight = (tm->tm_isdst > 0);
-#if 0
+#ifdef NOT_USED
/*
* XXX is there a better way to get local timezone string w/o
* tzname? - tgl 97/03/18
/*
* Edmund Mergl
*
- * $Id: oracle_compat.c,v 1.16 1998/09/01 04:32:45 momjian Exp $
+ * $Id: oracle_compat.c,v 1.17 1999/02/21 03:49:32 scrappy Exp $
*
*/
ret = (text *) palloc(VARHDRSZ + m);
VARSIZE(ret) = VARHDRSZ + m;
-#if FALSE
+#ifdef NOT_USED
memcpy(VARDATA(ret), ptr - VARSIZE(ret) + m, m);
#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.24 1999/02/13 23:19:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.25 1999/02/21 03:49:33 scrappy Exp $
*
* NOTES
* Eventually, the index information should go through here, too.
else
{
/* don't throw an error anymore; we want to continue... */
-#if FALSE
+#ifdef NOT_USED
elog(ERROR, "can't look up operator %d\n", opno);
#endif
return NULL;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.58 1999/02/13 23:19:44 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.59 1999/02/21 03:49:36 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
static void formrdesc(char *relationName, u_int natts,
FormData_pg_attribute *att);
-#if 0 /* See comments at line 1304 */
+#ifdef NOT_USED /* See comments at line 1304 */
static void RelationFlushIndexes(Relation *r, Oid accessMethodId);
#endif
FreeTriggerDesc(relation);
-#if 0
+#ifdef NOT_USED
if (relation->rd_rules)
{
int j;
void
RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId)
{
-#if 0
+#ifdef NOT_USED
/*
* 25 aug 1992: mao commented out the ht walk below. it should be
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.170 1999/02/13 23:20:38 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.171 1999/02/21 03:49:39 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
settings.opt.align = 0;
break;
case 'a':
-#if 0 /* this no longer does anything */
+#ifdef NOT_USED /* this no longer does anything */
fe_setauthsvc(optarg, errbuf);
#endif
break;
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeMaterial.h,v 1.9 1999/02/13 23:21:26 momjian Exp $
+ * $Id: nodeMaterial.h,v 1.10 1999/02/21 03:49:44 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
extern void ExecEndMaterial(Material *node);
extern void ExecMaterialReScan(Material *node, ExprContext *exprCtxt, Plan *parent);
-#if 0
+#ifdef NOT_USED
extern List ExecMaterialMarkPos(Material *node);
extern void ExecMaterialRestrPos(Material *node);
extern char *crypt_getpwdfilename(void);
extern char *crypt_getpwdreloadfilename(void);
-#if 0
+#ifdef NOT_USED
extern MsgType crypt_salt(const char *user);
#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.93 1999/02/18 06:01:00 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.94 1999/02/21 03:49:52 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
* send an empty query to test for startup.
*/
-#if 0
+#ifdef NOT_USED
/*
* Send a blank query to make sure everything works; in particular,
/*
- * $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.29 1999/02/03 21:18:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.30 1999/02/21 03:49:55 scrappy Exp $
*/
#include /* faked on sunos */
LSEG seg1,
seg2;
-#if FALSE
+#ifdef NOT_USED
LINE *ln;
#endif
found = true;
}
-#if FALSE
+#ifdef NOT_USED
ln = line_construct_pp(&seg2.p[0], &seg2.p[1]);
retval = interpt_sl(&seg1, ln);
#endif