| From: | AI Rumman <rummandba(at)gmail(dot)com> |
|---|---|
| To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general General <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: CONCAT function adding extra characters |
| Date: | 2021-06-15 21:29:38 |
| Message-ID: | CAGoODpdoMXyghSeY_YbYAWN4L0vy7D6eswPTidjOi_ia8yRfUw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
I saw that problem when I was running the query from DBeaver.
Got my answer.
Thanks & Regards.
On Tue, Jun 15, 2021 at 12:18 PM Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
wrote:
>
>
> út 15. 6. 2021 v 21:07 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
>
>> AI Rumman <rummandba(at)gmail(dot)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?
>>
>>
> postgres=# set extra_float_digits to 3;
> SET
> postgres=# select concat('41.1'::double precision,':', 20);
> ┌────────────────────────┐
> │ concat │
> ╞════════════════════════╡
> │ 41.1000000000000014:20 │
> └────────────────────────┘
> (1 row)
>
> Pavel
>
>
>
>> regards, tom lane
>>
>>
>>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christophe Pettus | 2021-06-16 00:24:21 | hot_standby_feedback implementation |
| Previous Message | Sudhakaran Srinivasan | 2021-06-15 20:44:25 | Re: some questions regarding replication issues and timeline/history files |