pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: markw@osdl.org
To: tgl@sss.pgh.pa.us
Cc: pgsql-interfaces@postgresql.org
Cc: osdldbt-general@lists.sourceforge.net
Subject: Re: libpq ERROR: overflow on numeric ABS(value) ...
Date: Thu, 7 Aug 2003 17:02:12 -0700 (PDT)
Message-ID: <200308080002.h7802Fo15143@mail.osdl.org> (raw)
In-Reply-To: <200308072353.h77Nr6o12685@mail.osdl.org>

On  7 Aug, To: tgl@sss.pgh.pa.us wrote:
> On  7 Aug, Tom Lane wrote:
>> markw@osdl.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?

Oh wait, I got it figured out.  I'm getting smaller than -9999...  :(



view thread (7+ messages)

Message-ID: <200308080002.h7802Fo15143@mail.osdl.org>
Permalink:  ../200308080002.h7802Fo15143@mail.osdl.org/
Also on:    postgresql.org/message-id/200308080002.h7802Fo15143@mail.osdl.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: markw@osdl.org, tgl@sss.pgh.pa.us, osdldbt-general@lists.sourceforge.net
  Subject: Re: libpq ERROR: overflow on numeric ABS(value) ...
  In-Reply-To: <200308080002.h7802Fo15143@mail.osdl.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox