From: | markw(at)osdl(dot)org |
---|---|
To: | tgl(at)sss(dot)pgh(dot)pa(dot)us |
Cc: | pgsql-interfaces(at)postgresql(dot)org, osdldbt-general(at)lists(dot)sourceforge(dot)net |
Subject: | Re: libpq ERROR: overflow on numeric ABS(value) ... |
Date: | 2003-08-07 21:56:27 |
Message-ID: | 200308072156.h77LuUo16238@mail.osdl.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
On 7 Aug, Tom Lane wrote:
> markw(at)osdl(dot)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.
>
Does it make sense that is throws the error on the FETCH instead of the
previous statement? I've attached the table definitions, create
function statement, and the C stored function. Does that help?
Thanks,
Mark
Attachment | Content-Type | Size |
---|---|---|
create_tables.sql | text/plain | 2.6 KB |
new_order.sql | text/plain | 777 bytes |
funcs.c | text/plain | 27.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-08-07 22:14:48 | Re: libpq ERROR: overflow on numeric ABS(value) ... |
Previous Message | Tom Lane | 2003-08-07 21:49:47 | Re: libpq ERROR: overflow on numeric ABS(value) ... |