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

Re: [HACKERS] Interval aggregate regression failure

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Michael Glaesemann <grzm(at)seespotcode(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-29 16:13:11
Message-ID: 200608291613.k7TGDBj14871@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Michael Glaesemann wrote:
> 
> On Aug 29, 2006, at 15:38 , Michael Glaesemann wrote:
> 
> > I think I've got it. I plan to update the regression tests this  
> > evening, but I wanted to post what I believe is a solution.
> 
> I've cleaned up the patch a bit in terms of whitespace, comments, and  
> parens. I've also updated the interval and horology regression tests.  
> The horology tests needed updating because I added 5 rows to  
> INTERVAL_TBL. I didn't check the math for every row of time(tz |  
> stamp | stamptz)/interval arithmetic in the horology tests as I think  
> problems in this area would have shown up before. Does that make  
> sense or it just rationalization on my part?
> 
> Both with and without --enable-integer-datetimes pass the regression  
> tests.

Uh, I came up with a cleaner one, I think.  I didn't test
--enable-integer-datetimes yet.

I tested a few of your examples:

	test=> select '41 mon 10:00:00'::interval / 10 as "pos";
	          pos
	------------------------
	 4 mons 3 days 01:00:00
	(1 row)

It basically rounds the remainders to full values if they are close to
full (+/- 0.000001).

-- 
  Bruce Momjian   bruce(at)momjian(dot)us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Attachment: /pgpatches/interval
Description: text/x-diff (2.1 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Michael GlaesemannDate: 2006-08-29 16:22:46
Subject: Re: [HACKERS] Interval aggregate regression failure (expected seems
Previous:From: Andrew DunstanDate: 2006-08-29 16:03:18
Subject: Re: would like to stop it auto-starting on boot on HP-UX

pgsql-patches by date

Next:From: Michael GlaesemannDate: 2006-08-29 16:22:46
Subject: Re: [HACKERS] Interval aggregate regression failure (expected seems
Previous:From: Bernd HelmleDate: 2006-08-29 15:53:03
Subject: Re: Updatable views

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