Skip site navigation (1) Skip section navigation (2)

Re: Decimal digits in timeofday()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nicola Larosa <nico(at)tekNico(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Decimal digits in timeofday()
Date: 2001-10-24 19:51:24
Message-ID: 22087.1003953084@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Nicola Larosa <nico(at)tekNico(dot)net> writes:
> There's a cute little bug somewhere.

Only that the default display precision for float8 is 15 digits.

regression=#  SELECT date_part('epoch', now());
    date_part
------------------
 1003952920.01861
(1 row)

regression=# select '1003952920.01861'::float8;
      float8
------------------
 1003952920.01861
(1 row)

regression=# select '1003952920.018612'::float8;
      float8
------------------
 1003952920.01861
(1 row)

regression=# select '1003952920.018612'::float8 - 1003952920.0;
      ?column?
--------------------
 0.0186120271682739
(1 row)

regression=#

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2001-10-24 22:41:38
Subject: Re: New default ignored by pre-exising insert rulesets.
Previous:From: Tom LaneDate: 2001-10-24 17:02:46
Subject: Re: Bug #490: Can't compile PostgreSQL 7.1.3 with Solaris 2.6

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group