* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/access/transam/clog.c,v 1.5 2001/10/25 05:49:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/clog.c,v 1.6 2001/10/25 20:37:29 tgl Exp $
*
*-------------------------------------------------------------------------
*/
TransactionId xid1;
TransactionId xid2;
- xid1 = (TransactionId) page1 *CLOG_XACTS_PER_PAGE;
-
+ xid1 = ((TransactionId) page1) * CLOG_XACTS_PER_PAGE;
xid1 += FirstNormalTransactionId;
- xid2 = (TransactionId) page2 *CLOG_XACTS_PER_PAGE;
-
+ xid2 = ((TransactionId) page2) * CLOG_XACTS_PER_PAGE;
xid2 += FirstNormalTransactionId;
return TransactionIdPrecedes(xid1, xid2);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.166 2001/10/25 05:49:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.167 2001/10/25 20:37:30 tgl Exp $
*
*
* INTERFACE ROUTINES
reltuples = 1000;
}
else
- reltuples = (double) relpages *NTUPLES_PER_PAGE(whichRel->rd_rel->relnatts);
+ reltuples = ((double) relpages) * NTUPLES_PER_PAGE(whichRel->rd_rel->relnatts);
}
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.23 2001/10/25 05:49:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.24 2001/10/25 20:37:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
{
int tupno = values[i].tupno;
- corr_xysum += (double) i *(double) tupno;
-
+ corr_xysum += ((double) i) * ((double) tupno);
dups_cnt++;
if (tupnoLink[tupno] == tupno)
{
* (values_cnt-1)*values_cnt*(2*values_cnt-1) / 6.
*----------
*/
- corr_xsum = (double) (values_cnt - 1) * (double) values_cnt / 2.0;
- corr_x2sum = (double) (values_cnt - 1) * (double) values_cnt *
- (double) (2 * values_cnt - 1) / 6.0;
+ corr_xsum = ((double) (values_cnt - 1)) *
+ ((double) values_cnt) / 2.0;
+ corr_x2sum = ((double) (values_cnt - 1)) *
+ ((double) values_cnt) * (double) (2 * values_cnt - 1) / 6.0;
/* And the correlation coefficient reduces to */
corrs[0] = (values_cnt * corr_xysum - corr_xsum * corr_xsum) /