Re: TimestampTz->Text->TimestampTz casting fails with DateStyle 'Postgres'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: TimestampTz->Text->TimestampTz casting fails with DateStyle 'Postgres'
Date: 2024-11-07 13:57:16
Message-ID: 3416600.1730987836@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Aleksander Alekseev <aleksander(at)timescale(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Aleksander Alekseev 2024-11-07 14:38:25 Re: TimestampTz->Text->TimestampTz casting fails with DateStyle 'Postgres'
Previous Message David G. Johnston 2024-11-07 13:38:07 Re: BUG #18694: DISCARD ALL does not reset execution counters for plpgsql functions