Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit22d9e91

Browse files
committed
Fix a couple of places where lack of parenthesization of a cast
causes pgindent to make weird formatting decisions. Easiest fixseems to be to put in the extra parens...
1 parent73c5ad9 commit22d9e91

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

‎src/backend/access/transam/clog.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
1414
* Portions Copyright (c) 1994, Regents of the University of California
1515
*
16-
* $Header: /cvsroot/pgsql/src/backend/access/transam/clog.c,v 1.5 2001/10/2505:49:22 momjian Exp $
16+
* $Header: /cvsroot/pgsql/src/backend/access/transam/clog.c,v 1.6 2001/10/2520:37:29 tgl Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -936,11 +936,9 @@ CLOGPagePrecedes(int page1, int page2)
936936
TransactionIdxid1;
937937
TransactionIdxid2;
938938

939-
xid1= (TransactionId)page1*CLOG_XACTS_PER_PAGE;
940-
939+
xid1= ((TransactionId)page1)*CLOG_XACTS_PER_PAGE;
941940
xid1+=FirstNormalTransactionId;
942-
xid2= (TransactionId)page2*CLOG_XACTS_PER_PAGE;
943-
941+
xid2= ((TransactionId)page2)*CLOG_XACTS_PER_PAGE;
944942
xid2+=FirstNormalTransactionId;
945943

946944
returnTransactionIdPrecedes(xid1,xid2);

‎src/backend/catalog/index.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/catalog/index.c,v 1.166 2001/10/2505:49:22 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.167 2001/10/2520:37:30 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -1492,7 +1492,7 @@ UpdateStats(Oid relid, double reltuples)
14921492
reltuples=1000;
14931493
}
14941494
else
1495-
reltuples= (double)relpages*NTUPLES_PER_PAGE(whichRel->rd_rel->relnatts);
1495+
reltuples= ((double)relpages)*NTUPLES_PER_PAGE(whichRel->rd_rel->relnatts);
14961496
}
14971497

14981498
/*

‎src/backend/commands/analyze.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.23 2001/10/2505:49:23 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.24 2001/10/2520:37:30 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1244,8 +1244,7 @@ compute_scalar_stats(VacAttrStats *stats,
12441244
{
12451245
inttupno=values[i].tupno;
12461246

1247-
corr_xysum+= (double)i*(double)tupno;
1248-
1247+
corr_xysum+= ((double)i)* ((double)tupno);
12491248
dups_cnt++;
12501249
if (tupnoLink[tupno]==tupno)
12511250
{
@@ -1519,9 +1518,10 @@ compute_scalar_stats(VacAttrStats *stats,
15191518
*(values_cnt-1)*values_cnt*(2*values_cnt-1) / 6.
15201519
*----------
15211520
*/
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;
15251525

15261526
/* And the correlation coefficient reduces to */
15271527
corrs[0]= (values_cnt*corr_xysum-corr_xsum*corr_xsum) /

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp