David Rowley <david.rowley@2ndquadrant.com> writes:
> Well, that's quite surprising. It appears to be a bug in
> numeric_poly_combine for machines without a working int128 type. The
> parameters in accum_sum_copy are in the incorrect order.
Ouch.
> The very minimal fix is attached, but I'll need to go look at where
> the tests for this have gone.
coverage.postgresql.org shows that numeric_poly_serialize/combine()
aren't exercised at all by the regression tests. Which is embarrassing
for this case, but I'm a bit leery of trying to insist on 100% coverage.
It might be a plan to insist on buildfarm coverage for anything with
platform-varying code in it, in which case there's at least one
other undertested bit of HAVE_INT128 code in numeric.c.
regards, tom lane