Re: [BUGS] BUG #1927: incorrect timestamp returned - Mailing list pgsql-patches

From Tom Lane
Subject Re: [BUGS] BUG #1927: incorrect timestamp returned
Date
Msg-id 9761.1128721786@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #1927: incorrect timestamp returned  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [BUGS] BUG #1927: incorrect timestamp returned  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I have gone through the code and identified all the places that need
> JROUND, basically places where we do complex calculations that include
> fsec (fractional seconds).  This only affects timestamp=double backends,
> not timestamp=int64.

I'm not sure I like this approach.  What you've essentially done is to
remove any possibility of getting more than six digits of fractional
precision out of a "double" timestamp --- and impose nontrivial
calculation overhead to make sure that double doesn't have any extra
precision.

I think it'd probably be better to just fix the rounding during display.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [BUGS] BUG #1927: incorrect timestamp returned
Next
From: Bruce Momjian
Date:
Subject: Re: [BUGS] BUG #1927: incorrect timestamp returned