Re: 8.3 vs HEAD difference in Interval output?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Ron Mayer" <rm_pg(at)cheapcomplexdevices(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Kevin Grittner" <Kgrittn(dot)CCAP(dot)Courts(at)wicourts(dot)gov>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 8.3 vs HEAD difference in Interval output?
Date: 2008-09-15 22:13:03
Message-ID: 48CE979F.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:

> I find the results on 8.3.3 with integer timestamps surprising:

Even more surprising is the behavior for interval(1) here:

ccdev=# select '1 year 2 mons 3 days 04:05:06.64321'::interval;
interval
-------------------------------------
1 year 2 mons 3 days 04:05:06.64321
(1 row)

ccdev=# select '1 year 2 mons 3 days 04:05:06.64321'::interval(1);
interval
----------------------------------
1 year 2 mons 3 days 04:05:06.60
(1 row)

ccdev=# select '1 year 2 mons 3 days 04:05:06.64321'::interval(2);
interval
----------------------------------
1 year 2 mons 3 days 04:05:06.64
(1 row)

ccdev=# select '1 year 2 mons 3 days 04:05:06.64321'::interval(3);
interval
-----------------------------------
1 year 2 mons 3 days 04:05:06.643
(1 row)

etc.

That trailing zero should be considered a bug.

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ron Mayer 2008-09-15 22:15:04 Re: 8.3 vs HEAD difference in Interval output?
Previous Message Kevin Grittner 2008-09-15 22:03:08 Re: 8.3 vs HEAD difference in Interval output?