Re: Wierdness using SUM to add results of custom C - Mailing list pgsql-general

From Neil Conway
Subject Re: Wierdness using SUM to add results of custom C
Date
Msg-id 1014438999.349.9.camel@jiro
Whole thread Raw
In response to Wierdness using SUM to add results of custom C function.  (Konrad Scherer <kscherer@magma.ca>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Justin Clift
Date:
Subject: Re: game db
Next
From: Lamar Owen
Date:
Subject: Re: Cannot restart the postmaster