Re: libpq ERROR: overflow on numeric ABS(value) ...

From: markw(at)osdl(dot)org
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-interfaces(at)postgresql(dot)org, osdldbt-general(at)lists(dot)sourceforge(dot)net
Subject: Re: libpq ERROR: overflow on numeric ABS(value) ...
Date: 2003-08-07 23:53:03
Message-ID: 200308072353.h77Nr6o12685@mail.osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On 7 Aug, Tom Lane wrote:
> markw(at)osdl(dot)org writes:
>>>> DECLARE mycursor CURSOR FOR SELECT new_order(...)
>>>> FETCH ALL IN mycursor
>>>> ERROR: overflow on numeric ABS(value) >= 10^4 for field with precision 4 scale 0

Ok, found the offending statement:
UPDATE stock
SET s_quantity = s_quantity - 4
WHERE s_i_id = 28472
AND s_w_id = 2

s_quantity is defined as NUMERIC(4). So does this means s_quantity must
be a positive number? Should I use a different data type?

Thanks,
Mark

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message markw 2003-08-08 00:02:12 Re: libpq ERROR: overflow on numeric ABS(value) ...
Previous Message markw 2003-08-07 22:23:23 Re: libpq ERROR: overflow on numeric ABS(value) ...