Greg Stark <gsst...@mit.edu> writes: > On Sun, Aug 23, 2009 at 6:11 PM, Grzegorz Jaskiewicz<g...@pointblue.com.pl> > wrote: >> http://zlew.org/postgresql_static_check/scan-build-2009-08-23-5/report-MAVb5D.html#EndPath >> for a very positive one - at least from strict language point of view. >> >> consider: float f = 100000000; f++; printf("%f\n", f);
> I believe the maximum value of the numbers involved here is the sample > size which is currently capped at 10,000. But I'm not exactly sure. No, the maximum value is somewhere around the maximum number of rows in a table, which is on the rough order of 4e12, which is several orders of magnitude below the threshold at which counting in a double becomes inaccurate. It is, however, above the point at which counting in an int32 will overflow. So the alternative would be to assume that we have a working int64 data type, which doesn't strike me as an improvement in the portability of the code. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers