Re: BUG #1609: Bug in interval datatype for 64 Bit timestamps - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: BUG #1609: Bug in interval datatype for 64 Bit timestamps
Date
Msg-id 200504211528.j3LFSxs21109@candle.pha.pa.us
Whole thread Raw
In response to Re: BUG #1609: Bug in interval datatype for 64 Bit timestamps  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane wrote:
> Oliver Siegmar <oliver@siegmar.net> writes:
> > On Thursday 21 April 2005 15:57, Tom Lane wrote:
> >> If it is only the float case, some imprecision is to be expected.
>
> > So everything is okay?
>
> Well, it's not necessarily *wrong*, but maybe we could improve it.
> The code currently assumes it can print 10 fractional digits in the
> float case, which is overly optimistic once you get a large number
> of days in the "days" component.  Maybe we should add some code
> to back off the precision depending on the number of days?

Well, it seems strange to change the display based on the number of
days, but on the other hand this is how exponential numbers are
displayed, with an X.YYYY EZZ so I suppose it does make sense to
suppress some of the fractional seconds for a large number of days.

I assume we would have to document this behavior.  How do we determine
the range to adjust?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1609: Bug in interval datatype for 64 Bit timestamps
Next
From: Richard Huxton
Date:
Subject: Re: BUG #1610: rewrite rule and sequence