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

Re: How many digits are printed with double precision?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mathieu Dubois <mathieu(dot)dubois(at)limsi(dot)fr>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How many digits are printed with double precision?
Date: 2011-03-23 21:02:04
Message-ID: 4355.1300914124@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Mathieu Dubois <mathieu(dot)dubois(at)limsi(dot)fr> writes:
> I have a double precision column in my DB (it's the time at which an 
> image was taken expressed in second from UNIX epoch). When I query the 
> value (SELECT time...) I get only 5 digits after the dot (while I 
> /suppose/ there are 6 digits). I have the same result when using 
> pgadmin. The results looks like the rounding of the desired time (which 
> I know by the filename).

See extra_float_digits.  Be aware that cranking that up produces digits
that are not 100% trustworthy.  If you are expecting exact results of
more than 15 places, you likely shouldn't be using float arithmetic.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Vibhor KumarDate: 2011-03-23 21:05:55
Subject: Re: EnterpriseDB OSX 9.0.2 PostgresPlus Installer
Previous:From: Mathieu DuboisDate: 2011-03-23 20:49:11
Subject: How many digits are printed with double precision?

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