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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Patch: shouldn't timezone(text, timestamp[tz]) be STABLE?
Date: 2021-08-30 15:07:31
Message-ID: 1351842.1630336051@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Aleksander Alekseev <aleksander(at)timescale(dot)com> writes:
>> [ why is timetz_zone volatile? ]

Ah ... after a bit of digging in the git history, I found this [1]:

Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Branch: master Release: REL8_1_BR [35979e6c3] 2005-09-09 06:51:12 +0000

Given its current definition that depends on time(NULL), timetz_zone
is certainly no longer immutable, but must indeed be marked volatile.
I wonder if it should use the value of now() (that is, transaction
start time) so that it could be marked stable. But it's probably not
important enough to be worth changing the code for ... indeed, I'm not
even going to force an initdb for this catalog change, seeing that we
just did one a few hours ago.

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

regards, tom lane

[1] https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=35979e6c3

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message hubert depesz lubaczewski 2021-08-30 15:18:30 Pg stuck at 100% cpu, for multiple days
Previous Message vignesh C 2021-08-30 15:05:09 Re: Added schema level support for publication.