Re: Bug on version 12 ? - Mailing list pgsql-general

From John W Higgins
Subject Re: Bug on version 12 ?
Date
Msg-id CAPhAwGwXJCKPdE=0S9dJDhq64v9=R0RSdnDQ3spULQEqJ_0Ubg@mail.gmail.com
Whole thread Raw
In response to Re: Bug on version 12 ?  (PegoraroF10 <marcos@f10.com.br>)
List pgsql-general


On Fri, May 15, 2020 at 9:38 AM PegoraroF10 <marcos@f10.com.br> wrote:
Ok Tom but then you cannot go back and forth, like this ...

select to_timestamp(jsonb_build_object('mydate',
current_timestamp)->>'mydate', 'YYYY-MM-DD HH24:MI:SS');

From here [1] - there are 2 green boxes on the page marked "Tip" - the second one is of interest here.

Apparently the portable format for your need would be

select to_timestamp('2020-04-02T18:26:50.941531-03:00', 'YYYY-MM-DDtHH24:MI:SS');

That works on both PG 11 and PG 12.

John W Higgins

pgsql-general by date:

Previous
From: PegoraroF10
Date:
Subject: Re: Bug on version 12 ?
Next
From: "Andreas 'ads' Scherbaum"
Date:
Subject: Re: Inherited an 18TB DB & need to backup