From: PegoraroF10 <marcos@f10.com.br>
To: pgsql-general@postgresql.org
Subject: Bug on version 12 ?
Date: Fri, 15 May 2020 08:08:34 -0700 (MST)
Message-ID: <1589555314264-0.post@n3.nabble.com> (raw)
select To_Json(Current_Timestamp);
returns "2020-05-15T14:49:44.266342+00:00" on version 11.7 or 12.3
So I have lots of JSONS which have timestamp on them.
select
JS ->> 'mydate'::text,
to_timestamp((JS ->> 'mydate'), 'YYYY-MM-DD HH24:MI:SS')
from (select '{"somefield": true, "otherfield": true, "mydate":
"2020-04-02T18:26:50.941531-03:00"}'::jsonb) j(JS)
This SQL works fine on 11.7 but not on 12.3 version.
ERROR: invalid value "T1" for "HH24"
Detail: Value must be an integer.
Where: SQL function "castimmutabletimestamp" statement 1
Is that a version 12 bug or a server configuration ?
--
Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
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: marcos@f10.com.br
Subject: Re: Bug on version 12 ?
In-Reply-To: <1589555314264-0.post@n3.nabble.com>
References: <1589555314264-0.post@n3.nabble.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