File tree Expand file tree Collapse file tree 3 files changed +11
-13
lines changed Expand file tree Collapse file tree 3 files changed +11
-13
lines changed Original file line number Diff line number Diff line change 13
13
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
14
14
* Portions Copyright (c) 1994, Regents of the University of California
15
15
*
16
- * $Header: /cvsroot/pgsql/src/backend/access/transam/clog.c,v 1.5 2001/10/25 05:49:22 momjian Exp $
16
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/clog.c,v 1.6 2001/10/25 20:37:29 tgl Exp $
17
17
*
18
18
*-------------------------------------------------------------------------
19
19
*/
@@ -936,11 +936,9 @@ CLOGPagePrecedes(int page1, int page2)
936
936
TransactionId xid1 ;
937
937
TransactionId xid2 ;
938
938
939
- xid1 = (TransactionId ) page1 * CLOG_XACTS_PER_PAGE ;
940
-
939
+ xid1 = ((TransactionId ) page1 ) * CLOG_XACTS_PER_PAGE ;
941
940
xid1 += FirstNormalTransactionId ;
942
- xid2 = (TransactionId ) page2 * CLOG_XACTS_PER_PAGE ;
943
-
941
+ xid2 = ((TransactionId ) page2 ) * CLOG_XACTS_PER_PAGE ;
944
942
xid2 += FirstNormalTransactionId ;
945
943
946
944
return TransactionIdPrecedes (xid1 , xid2 );
Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.166 2001/10/25 05:49:22 momjian Exp $
11
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.167 2001/10/25 20:37:30 tgl Exp $
12
12
*
13
13
*
14
14
* INTERFACE ROUTINES
@@ -1492,7 +1492,7 @@ UpdateStats(Oid relid, double reltuples)
1492
1492
reltuples = 1000 ;
1493
1493
}
1494
1494
else
1495
- reltuples = (double ) relpages * NTUPLES_PER_PAGE (whichRel -> rd_rel -> relnatts );
1495
+ reltuples = (( double ) relpages ) * NTUPLES_PER_PAGE (whichRel -> rd_rel -> relnatts );
1496
1496
}
1497
1497
1498
1498
/*
Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.23 2001/10/25 05:49:23 momjian Exp $
11
+ * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.24 2001/10/25 20:37:30 tgl Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -1244,8 +1244,7 @@ compute_scalar_stats(VacAttrStats *stats,
1244
1244
{
1245
1245
int tupno = values [i ].tupno ;
1246
1246
1247
- corr_xysum += (double ) i * (double ) tupno ;
1248
-
1247
+ corr_xysum += ((double ) i ) * ((double ) tupno );
1249
1248
dups_cnt ++ ;
1250
1249
if (tupnoLink [tupno ] == tupno )
1251
1250
{
@@ -1519,9 +1518,10 @@ compute_scalar_stats(VacAttrStats *stats,
1519
1518
* (values_cnt-1)*values_cnt*(2*values_cnt-1) / 6.
1520
1519
*----------
1521
1520
*/
1522
- corr_xsum = (double ) (values_cnt - 1 ) * (double ) values_cnt / 2.0 ;
1523
- corr_x2sum = (double ) (values_cnt - 1 ) * (double ) values_cnt *
1524
- (double ) (2 * values_cnt - 1 ) / 6.0 ;
1521
+ corr_xsum = ((double ) (values_cnt - 1 )) *
1522
+ ((double ) values_cnt ) / 2.0 ;
1523
+ corr_x2sum = ((double ) (values_cnt - 1 )) *
1524
+ ((double ) values_cnt ) * (double ) (2 * values_cnt - 1 ) / 6.0 ;
1525
1525
1526
1526
/* And the correlation coefficient reduces to */
1527
1527
corrs [0 ] = (values_cnt * corr_xysum - corr_xsum * corr_xsum ) /
You can’t perform that action at this time.
0 commit comments