Re: Don't understand error?

From: James David Smith <james(dot)david(dot)smith(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Don't understand error?
Date: 2014-04-14 14:02:27
Message-ID: CAMu32ACqnWLGTEy9qD0=pBmoP4NiDpOQsxrQHHY2Z5a1Qf+-Dw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi Tom,

Yes, I thought the same. Glad to know that I might be along the right
lines. I've started taking parameters out one-by-one to try and find
the culprit. Yes, there are a variety of numbers stored as NUMERIC in
various places. For example:

0.23423424234
5.6434535
10.2131

etc.

Then there are various multiplications and divisions occurring in
fairly complex formulas.

I guess I just slowly work through the code and try to figure out
which bit of the maths is causing the error?

Cheers

James

On 14 April 2014 14:58, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> James David Smith <james(dot)david(dot)smith(at)gmail(dot)com> writes:
>> When I run my SQL for 50 people it's fine. 1 person is fine. A
>> thousand people it's fine. But when I try and run it for the whole
>> dataset I'm given this error:
>
>> ERROR: value out of range: underflow
>> ****************Error *******************
>> Error: Value out of range: underflow
>> SQL state: 22003
>
> This looks like an arithmetic problem not a SQL problem. Is your
> calculation working with very small floating-point values anywhere?
>
> regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2014-04-14 14:24:19 Re: Don't understand error?
Previous Message Tom Lane 2014-04-14 13:58:35 Re: Don't understand error?