X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id BA101D1D5D0 for ; Thu, 7 Aug 2003 23:53:26 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 42777-10 for ; Thu, 7 Aug 2003 20:52:04 -0300 (ADT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by svr1.postgresql.org (Postfix) with ESMTP id 8F152D1C514 for ; Thu, 7 Aug 2003 20:53:15 -0300 (ADT) Received: from osdl.org (markw@ibm-b.pdx.osdl.net [172.20.1.51]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id h77Nr6o12685; Thu, 7 Aug 2003 16:53:07 -0700 Message-Id: <200308072353.h77Nr6o12685@mail.osdl.org> Date: Thu, 7 Aug 2003 16:53:03 -0700 (PDT) From: markw@osdl.org Subject: Re: libpq ERROR: overflow on numeric ABS(value) ... To: tgl@sss.pgh.pa.us Cc: pgsql-interfaces@postgresql.org, osdldbt-general@lists.sourceforge.net In-Reply-To: <9052.1060294488@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/36 X-Sequence-Number: 4390 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? Thanks, Mark