Robert Haas  wrote:
 
> Hmm... it is true that average will produce the same results on any
> ordering of the same set of input values, though.
 
Not exactly.  For floating point approximations you get a more
accurate sum (and therefore a more accurate average) if you add the
values in ascending order of absolute value.  Depending on the data,
it can make quite a difference.
 
-Kevin


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to