On Fri, 2002-02-22 at 21:07, Konrad Scherer wrote:
> The C function returns the correct result all the time but the sum
> returns the wrong result all the time. It mostly returns 23, but it
> returned 24 once!
Can you reproduce the results? You said it returned incorrect data once
-- has it only happened a single time, or does it happen on some regular
basis?
Are you sure that the C function always returns the right results? IMHO
the most likely culprit is a bug in your C function. You might want to
run postgres under gdb (compile with debugging; start up a single
'postgres' process in interactive mode w/o postmaster), and step through
the query to see where the bug comes from.
Cheers,
Neil
--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC