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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Aleksander Alekseev <aleksander@timescale.com>, Michael Paquier <michael@paquier.xyz>, pgsql-bugs@lists.postgresql.org
Date: 2024-12-12T23:36:39Z
Lists: pgsql-bugs
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> 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.

It's not like to_timestamp doesn't have the same problem...

Anyway, I've started a -hackers thread about this issue at [1].
Whatever we do probably deserves wider discussion than it will
get on pgsql-bugs.

			regards, tom lane

[1] https://www.postgresql.org/message-id/957280.1734046384%40sss.pgh.pa.us



Commits

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

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