Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-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


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2006-08-31 18:31:35
Subject: Re: Thought provoking piece on NetBSD
Previous:From: Joshua D. DrakeDate: 2006-08-31 18:18:27
Subject: Re: Thought provoking piece on NetBSD

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group