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

Laurenz Albe <laurenz.albe@cybertec.at>

From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Tom Lane <tgl@sss.pgh.pa.us>, Aleksander Alekseev <aleksander@timescale.com>
Cc: Michael Paquier <michael@paquier.xyz>, pgsql-bugs@lists.postgresql.org
Date: 2024-12-12T06:40:31Z
Lists: pgsql-bugs
On Wed, 2024-12-11 at 17:40 -0500, Tom Lane wrote:
> So it feels like we'd better do something about this, if we
> don't want to deprecate the Postgres datestyle entirely.

I agree that something should be done, but I'd have no problem
with deprecating the Postgres datestyle.  People who depend on
it can switch to using to_date() and to_timestamp(), which
shouldn't impose too much hardship if we give them enough time.

Yours,
Laurenz Albe



Commits

  1. Seek zone abbreviations in the IANA data before timezone_abbreviations.

  2. Make pg_interpret_timezone_abbrev() check sp->defaulttype too.