Re: Anomaly with SUM().

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Anthony Best <abest(at)digitalflex(dot)net>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Anomaly with SUM().
Date: 2003-08-08 19:21:01
Message-ID: 20030808121849.M77201-100000@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 8 Aug 2003, Anthony Best wrote:

> I've noticed that the SUM() seems to overflow under some situations.
>
> The only difference is the order that the data is retrived from the
> database.

Is amount a float type column (float4 or float8)? If so, you're probably
just running into issues with float precision problems. Changing the
order of the operations can change the final value of a sequence of
operations on float.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-08-08 19:28:56 Re: Anomaly with SUM().
Previous Message Anthony Best 2003-08-08 19:01:01 Anomaly with SUM().