From: Adrian Klaver <adrian.klaver@aklaver.com>
To: AI Rumman <rummandba@gmail.com>
To: pgsql-general General <pgsql-general@postgresql.org>
Subject: Re: CONCAT function adding extra characters
Date: Tue, 15 Jun 2021 12:07:30 -0700
Message-ID: <675f0952-cca1-2e8a-b0fe-ad36ca4f3548@aklaver.com> (raw)
In-Reply-To: <CAGoODpdy0zyMbsOCb5n78yM4v2UvWeb2GT9WyCnH1YtSxkcYZA@mail.gmail.com>
References: <CAGoODpdy0zyMbsOCb5n78yM4v2UvWeb2GT9WyCnH1YtSxkcYZA@mail.gmail.com>
On 6/15/21 11:55 AM, AI Rumman wrote:
> 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
>
>
> Value 41.1 which double precision converts to 41.1000000014.
>
> Is that expected?
Aah, too quick on the trigger.
Also:
Is there a home brewed version of CONCAT() in the search_path?
>
> Thanks.
--
Adrian Klaver
adrian.klaver@aklaver.com
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, rummandba@gmail.com
Subject: Re: CONCAT function adding extra characters
In-Reply-To: <675f0952-cca1-2e8a-b0fe-ad36ca4f3548@aklaver.com>
References: <CAGoODpdy0zyMbsOCb5n78yM4v2UvWeb2GT9WyCnH1YtSxkcYZA@mail.gmail.com> <675f0952-cca1-2e8a-b0fe-ad36ca4f3548@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