How many digits are printed with double precision?

From: Mathieu Dubois <mathieu(dot)dubois(at)limsi(dot)fr>
To: pgsql-novice(at)postgresql(dot)org
Subject: How many digits are printed with double precision?
Date: 2011-03-23 20:49:11
Message-ID: 4D8A5CC7.7020407@limsi.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello,

I'm using postgreSQL and python (PyGreSQL) and face a strange problem.

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).

Is it because postgreSQL only returns a fixed amount of digits or is the
mistake is coming from my INSERTion (something like a semiconscious
rounding).

Thanks in advance,
Mathieu

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2011-03-23 21:02:04 Re: How many digits are printed with double precision?
Previous Message Rob Richardson 2011-03-23 16:59:25 Re: Re: Not to start a flame war but what does Oracle have that Postgresql does not?