Re: Patch: shouldn't timezone(text, timestamp[tz]) be STABLE?

Aleksander Alekseev <aleksander@timescale.com>

From: Aleksander Alekseev <aleksander@timescale.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2021-09-01T09:19:47Z
Lists: pgsql-hackers

Attachments

Hi Tom,

> No, because date_trunc depends on the current timezone setting,
> or at least its stable variants do.

Once again, many thanks for your answers!

> I wasn't excited enough about it personally to change it, and I'm
> still not --- but if you want to, send a patch.

Here is the patch.

-- 
Best regards,
Aleksander Alekseev

Commits

  1. Fix actively-misleading comments about the contents of struct pg_tm.

  2. Fix bogus timetz_zone() results for DYNTZ abbreviations.

  3. Make timetz_zone() stable, and correct a bug for DYNTZ abbreviations.