Re: [BUGS] BUG #1927: incorrect timestamp returned

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: postgres(at)saparev(dot)com, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #1927: incorrect timestamp returned
Date: 2005-10-07 21:49:46
Message-ID: 9761.1128721786@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2005-10-08 02:46:44 Re: [BUGS] BUG #1927: incorrect timestamp returned
Previous Message Bruce Momjian 2005-10-07 21:18:46 Re: [BUGS] BUG #1927: incorrect timestamp returned

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-10-08 02:46:44 Re: [BUGS] BUG #1927: incorrect timestamp returned
Previous Message Bruce Momjian 2005-10-07 21:18:46 Re: [BUGS] BUG #1927: incorrect timestamp returned