File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 12
12
*
13
13
*
14
14
* IDENTIFICATION
15
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.5 1997/02/07 16:23:39 momjian Exp $
15
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.6 1997/04/09 02:20:32 vadim Exp $
16
16
*
17
17
*-------------------------------------------------------------------------
18
18
*/
@@ -291,6 +291,15 @@ getattnvals(Oid relid, AttrNumber attnum)
291
291
return (0 );
292
292
}
293
293
nvals = ((Form_pg_class ) GETSTRUCT (atp ))-> reltuples ;
294
+ /* Look above how nvals is used. - vadim 04/09/97 */
295
+ if ( nvals > 0 )
296
+ {
297
+ double selratio = 1.0 / (double )nvals ;
298
+
299
+ selratio *= (double )ATTNVALS_SCALE ;
300
+ nvals = (int ) ceil (selratio );
301
+ }
302
+
294
303
return (nvals );
295
304
}
296
305
You can’t perform that action at this time.
0 commit comments