pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: markw@osdl.org
Cc: pgsql-interfaces@postgresql.org
Cc: osdldbt-general@lists.sourceforge.net
Subject: Re: libpq ERROR: overflow on numeric ABS(value) ...
Date: Thu, 07 Aug 2003 18:14:48 -0400
Message-ID: <9052.1060294488@sss.pgh.pa.us> (raw)
In-Reply-To: <200308072156.h77LuUo16238@mail.osdl.org>
References: <200308072156.h77LuUo16238@mail.osdl.org>

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

> Does it make sense that is throws the error on the FETCH instead of the
> previous statement?

Sure: the cursor won't actually be executed until you fetch from it.

Since there's no NUMERIC datatypes in the cursor operation, it's a
dead certainty that the cursor itself is not where the error is being
thrown.  I see that your function issues a bunch of inserts and updates
internally; presumably the problem is that one of those is trying to
store bogus data into a table.  I'd suggest turning on that DEBUG code
you've sprinkled in there and looking to see which statement gets the
error ...

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <9052.1060294488@sss.pgh.pa.us>
Permalink:  ../9052.1060294488@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9052.1060294488@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, markw@osdl.org, osdldbt-general@lists.sourceforge.net
  Subject: Re: libpq ERROR: overflow on numeric ABS(value) ...
  In-Reply-To: <9052.1060294488@sss.pgh.pa.us>

* 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