Re: Documentation, window functions

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <robertmhaas(at)gmail(dot)com>,<db(at)zigo(dot)dhs(dot)org>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Documentation, window functions
Date: 2010-09-26 18:59:57
Message-ID: 4C9F51DD0200002500035DF5@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2010-09-26 19:01:38 Re: Congratulations on leaving CVS
Previous Message Marios Vodas 2010-09-26 18:36:33 Re: C function to return tuple