pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Rob Sargent <robjsargent@gmail.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: floating point output
Date: Wed, 4 Sep 2019 21:14:32 -0700
Message-ID: <59e104ff-bb89-25d4-2c50-9e15b4655980@aklaver.com> (raw)
In-Reply-To: <2e1865c7-9ef3-e27f-e323-1659a5f129fc@gmail.com>
References: <2e1865c7-9ef3-e27f-e323-1659a5f129fc@gmail.com>

On 9/4/19 5:23 PM, Rob Sargent wrote:
> I've found the description of floating point types (here 
> <https://www.postgresql.org/docs/10/datatype-numeric.html#DATATYPE-FLOAT;), 
> but I'm looking for the rationale of the output format, particularly 
> with respect to total digits presented (variable in a single select's 
> output) and the dropping of a trailing zero (to some implying a loss of 
> precision).  Is the code my only guide here?

Some examples would help explain your concerns.

Bottom line, if you want precision use numeric.

> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (7+ messages)  latest in thread

Message-ID: <59e104ff-bb89-25d4-2c50-9e15b4655980@aklaver.com>
Permalink:  ../59e104ff-bb89-25d4-2c50-9e15b4655980@aklaver.com/
Also on:    postgresql.org/message-id/59e104ff-bb89-25d4-2c50-9e15b4655980@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, robjsargent@gmail.com
  Subject: Re: floating point output
  In-Reply-To: <59e104ff-bb89-25d4-2c50-9e15b4655980@aklaver.com>
  References: <2e1865c7-9ef3-e27f-e323-1659a5f129fc@gmail.com> <59e104ff-bb89-25d4-2c50-9e15b4655980@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox