Re: [HACKERS] Interval aggregate regression failure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Michael Glaesemann <grzm(at)seespotcode(dot)net>, Michael Paesold <mpaesold(at)gmx(dot)at>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Interval aggregate regression failure
Date: 2006-08-31 18:29:46
Message-ID: 22369.1157048986@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> OK, here is a much nicer patch. The fix is to do no rounding, but to
> find the number of days before applying the factor adjustment.

You have forgotten the problem of the factor not being exactly
representable (eg, things like '10 days' * 0.1 not giving the expected
result). Also, as coded this is subject to integer-overflow risks
that weren't there before. That could be fixed, but it's still only
addressing a subset of the problems. I don't think you can fix them
all without rounding somewhere.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-08-31 18:31:35 Re: Thought provoking piece on NetBSD
Previous Message Joshua D. Drake 2006-08-31 18:18:27 Re: Thought provoking piece on NetBSD

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-08-31 18:36:28 Re: [PATCHES] Backend SSL configuration enhancement
Previous Message Guillaume Smet 2006-08-31 17:33:14 Re: [HACKERS] [PATCHES] log_statement output for protocol