Re: Patch: shouldn't timezone(text, timestamp[tz]) be STABLE? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch: shouldn't timezone(text, timestamp[tz]) be STABLE?
Date
Msg-id 3065164.1630943352@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch: shouldn't timezone(text, timestamp[tz]) be STABLE?  (Aleksander Alekseev <aleksander@timescale.com>)
List pgsql-hackers
Aleksander Alekseev <aleksander@timescale.com> writes:
>> Anyway, attached is a revised patch that gets rid of the antique
>> code, and it produces correct results AFAICT.

> I tested your patch against the current master branch 78aa616b on
> MacOS Catalina. I have nothing to add to the patch.

Thanks.  Pushed, along with a quick-and-dirty patch to resolve the
DYNTZ problem in the back branches.

>> I'm fairly unhappy now that we don't have any
>> regression test coverage for this function.

> Yep, that's unfortunate. I see several tests for `AT TIME ZONE`
> syntax, which is a syntax sugar to timezone() with timestamp[tz]
> arguments. But considering how `timetz` type is broken in the first
> place [1], I'm not surprised few people feel motivated to do anything
> related to it. Do you think there is a possibility that one day we may
> be brave enough to get rid of this type?

I'm afraid not, seeing that it's required by the SQL standard.

I thought about adding tests based on the CLT example I showed upthread,
and just accepting the need for two variant result files.  Maybe we
should do that.  However, it still wouldn't be a great test, because
it would not prove that the DST switchover happens at the right time of
year, or indeed at all.  So for the moment I didn't.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: [BUG] Failed Assertion in ReorderBufferChangeMemoryUpdate()
Next
From: Rahila Syed
Date:
Subject: Re: Column Filtering in Logical Replication