9
9
*
10
10
*
11
11
* IDENTIFICATION
12
- * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.7 1996/11/0805:55:49 momjian Exp $
12
+ * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.8 1996/11/0806:24:58 bryanh Exp $
13
13
*
14
14
* DESCRIPTION
15
15
* The "DefineFoo" routines take the parse tree and pick out the
@@ -117,8 +117,6 @@ compute_full_attributes(const List *parameters, int32 *byte_pct_p,
117
117
* outin_ratio_p = OUTIN_RATIO ;
118
118
119
119
foreach (pl , (List * )parameters ) {
120
- int count ;
121
- char * ptr ;
122
120
ParamString * param = (ParamString * )lfirst (pl );
123
121
124
122
if (strcasecmp (param -> name ,"iscachable" )== 0 ) {
@@ -136,14 +134,17 @@ compute_full_attributes(const List *parameters, int32 *byte_pct_p,
136
134
*/
137
135
* byte_pct_p = atoi (param -> val );
138
136
}else if (strcasecmp (param -> name ,"perbyte_cpu" )== 0 ) {
139
- count = 0 ;
140
137
if (sscanf (param -> val ,"%d" ,perbyte_cpu_p )== 0 ) {
138
+ int count ;
139
+ char * ptr ;
141
140
for (ptr = param -> val ;* ptr != '\0' ;ptr ++ )
142
141
if (* ptr == '!' )count ++ ;
142
+ * perbyte_cpu_p = (int )pow (10.0 , (double )count );
143
143
}
144
- * perbyte_cpu_p = (int )pow (10.0 , (double )count );
145
144
}else if (strcasecmp (param -> name ,"percall_cpu" )== 0 ) {
146
145
if (sscanf (param -> val ,"%d" ,percall_cpu_p )== 0 ) {
146
+ int count ;
147
+ char * ptr ;
147
148
for (count = 0 ,ptr = param -> val ;* ptr != '\0' ;ptr ++ )
148
149
if (* ptr == '!' )count ++ ;
149
150
* percall_cpu_p = (int )pow (10.0 , (double )count );