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

Aleksander Alekseev <aleksander@timescale.com>

From: Aleksander Alekseev <aleksander@timescale.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-08-30T16:09:14Z
Lists: pgsql-hackers
Hi Tom,

Thanks for the quick reply.

> I don't see a lot of argument for treating tzdata changes differently
> from OS locale changes.

Got it. But in this case, what's your opinion on the differences between
date_trunc() and timezone()? Shouldn't date_trunc() be always IMMUTABLE as
well?

I can see pros and cons to be IMMUTABLE _or_ STABLE when dealing with time
zones, but at least PostgreSQL should be consistent in this, right?

-- 
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.