Re: BUG #1609: Bug in interval datatype for 64 Bit timestamps

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Oliver Siegmar <oliver(at)siegmar(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1609: Bug in interval datatype for 64 Bit timestamps
Date: 2005-04-21 15:28:59
Message-ID: 200504211528.j3LFSxs21109@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

Tom Lane wrote:
> Oliver Siegmar <oliver(at)siegmar(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Richard Huxton 2005-04-21 15:57:51 Re: BUG #1610: rewrite rule and sequence
Previous Message Tom Lane 2005-04-21 15:10:08 Re: BUG #1609: Bug in interval datatype for 64 Bit timestamps

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2005-04-21 22:15:48 Minor Comment updates
Previous Message Tom Lane 2005-04-21 15:10:08 Re: BUG #1609: Bug in interval datatype for 64 Bit timestamps