pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: AI Rumman <rummandba@gmail.com>
Cc: pgsql-general General <pgsql-general@postgresql.org>
Subject: Re: CONCAT function adding extra characters
Date: Tue, 15 Jun 2021 15:07:41 -0400
Message-ID: <436968.1623784061@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGoODpdy0zyMbsOCb5n78yM4v2UvWeb2GT9WyCnH1YtSxkcYZA@mail.gmail.com>
References: <CAGoODpdy0zyMbsOCb5n78yM4v2UvWeb2GT9WyCnH1YtSxkcYZA@mail.gmail.com>

AI Rumman <rummandba@gmail.com> writes:
> I am using Postgresql 10 and seeing a strange behavior in CONCAT function
> when I am concatenating double precision and int with a separator.

> select concat('41.1'::double precision,':', 20);
>> Result:
>> 41.1000000000000014:20

What have you got extra_float_digits set to?

			regards, tom lane





view thread (9+ messages)  latest in thread

Message-ID: <436968.1623784061@sss.pgh.pa.us>
Permalink:  ../436968.1623784061@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/436968.1623784061@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, rummandba@gmail.com
  Subject: Re: CONCAT function adding extra characters
  In-Reply-To: <436968.1623784061@sss.pgh.pa.us>
  References: <CAGoODpdy0zyMbsOCb5n78yM4v2UvWeb2GT9WyCnH1YtSxkcYZA@mail.gmail.com> <436968.1623784061@sss.pgh.pa.us>

* 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