Re: libpq ERROR: overflow on numeric ABS(value) ...
| От | Tom Lane | 
|---|---|
| Тема | Re: libpq ERROR: overflow on numeric ABS(value) ... | 
| Дата | |
| Msg-id | 9052.1060294488@sss.pgh.pa.us обсуждение исходный текст | 
| Ответ на | Re: libpq ERROR: overflow on numeric ABS(value) ... (markw@osdl.org) | 
| Ответы | Re: libpq ERROR: overflow on numeric ABS(value) ... Re: libpq ERROR: overflow on numeric ABS(value) ... | 
| Список | pgsql-interfaces | 
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
		
	В списке pgsql-interfaces по дате отправления: