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 78C37D1F407 for ; Thu, 7 Aug 2003 21:50:47 +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 38409-04 for ; Thu, 7 Aug 2003 18:49:24 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id D2ADED1F405 for ; Thu, 7 Aug 2003 18:50:35 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h77LnmSa008868; Thu, 7 Aug 2003 17:49:48 -0400 (EDT) To: markw@osdl.org Cc: pgsql-interfaces@postgresql.org, osdldbt-general@lists.sourceforge.net Subject: Re: libpq ERROR: overflow on numeric ABS(value) ... In-reply-to: <200308072125.h77LP7o07576@mail.osdl.org> References: <200308072125.h77LP7o07576@mail.osdl.org> Comments: In-reply-to markw@osdl.org message dated "Thu, 07 Aug 2003 14:25:03 -0700" Date: Thu, 07 Aug 2003 17:49:47 -0400 Message-ID: <8867.1060292987@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/32 X-Sequence-Number: 4386 markw@osdl.org writes: > Hello, I need some help understanding an error message. I've got a > program using libpq where I do a: > DECLARE mycursor CURSOR FOR SELECT new_order(...) > FETCH ALL IN mycursor > and I get the resulting error from the FETCH more than half the time: > ERROR: overflow on numeric ABS(value) >= 10^4 for field with precision 4 scale 0 > My new_order function is a C library that returns an integer that > returns a number from 0 to 30. I'm betting on a bug in your C code. But we can't guess what without more details. regards, tom lane