Re: CONCAT function adding extra characters - Mailing list pgsql-general

From Adrian Klaver
Subject Re: CONCAT function adding extra characters
Date
Msg-id 8021f42a-4193-f741-85ab-b6966e220880@aklaver.com
Whole thread Raw
In response to CONCAT function adding extra characters  (AI Rumman <rummandba@gmail.com>)
List pgsql-general
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?

No.

What OS and version of same?

How was Postgres installed?

> 
> Thanks.


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: CONCAT function adding extra characters
Next
From: Adrian Klaver
Date:
Subject: Re: CONCAT function adding extra characters