From: Tom Lane <tgl@sss.pgh.pa.us>
To: Aleksander Alekseev <aleksander@timescale.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: TimestampTz->Text->TimestampTz casting fails with DateStyle 'Postgres'
Date: Thu, 07 Nov 2024 08:57:16 -0500
Message-ID: <3416600.1730987836@sss.pgh.pa.us> (raw)
In-Reply-To: <CAJ7c6TOATjJqvhnYsui0=CO5XFMF4dvTGH+skzB--jNhqSQu5g@mail.gmail.com>
References: <CAJ7c6TOATjJqvhnYsui0=CO5XFMF4dvTGH+skzB--jNhqSQu5g@mail.gmail.com>
Aleksander Alekseev <aleksander@timescale.com> writes:
> =# set datestyle to 'Postgres';
> SET
> =# SELECT '1000-01-01'::timestamptz::text::timestamptz;
> ERROR: invalid input syntax for type timestamp with time zone: "Wed
> Jan 01 00:00:00 1000 LMT"
> If I understand correctly, text->timestamptz doesn't understand the
> 'LMT' timezone.
So it seems. In a quick experiment, it seemed like just treating LMT
as a noise word on input might be enough, but I don't have time today
to poke at it further.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, aleksander@timescale.com, pgsql-bugs@lists.postgresql.org
Subject: Re: TimestampTz->Text->TimestampTz casting fails with DateStyle 'Postgres'
In-Reply-To: <3416600.1730987836@sss.pgh.pa.us>
* 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