Fix volatility marking of timestamptz_trunc_zone.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 12 Nov 2022 18:29:41 +0000 (13:29 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 12 Nov 2022 18:29:52 +0000 (13:29 -0500)
It's safe to mark this as immutable, because it does not depend
on the timezone GUC setting.  Oversight in commit 600b04d6b.

(There's an argument that timezone definitions do change from
time to time, but we have not worried about that in marking
other timestamp-related functions; for example AT TIME ZONE
has always been considered immutable.  The situation is no
worse than our problems with time-varying locales, surely.)

Przemysław Sztoch

Discussion: https://postgr.es/m/eaa3fabe-50fc-bbe8-b096-ce62ddadab85@sztoch.pl

src/include/catalog/catversion.h
src/include/catalog/pg_proc.dat

index de6783a27b646c6df525ed86f76616a3d2c6c187..c6ef593207c227ce10b0c897379476b553974f67 100644 (file)
@@ -57,6 +57,6 @@
  */
 
 /*                         yyyymmddN */
-#define CATALOG_VERSION_NO 202210261
+#define CATALOG_VERSION_NO 202211121
 
 #endif
index 20f5aa56eab3c756ca1de4cab9a57037a4926224..9dbe9ec8017bd9399448c6638e4c41de496a98dc 100644 (file)
   proargtypes => 'text timestamptz', prosrc => 'timestamptz_trunc' },
 { oid => '1284',
   descr => 'truncate timestamp with time zone to specified units in specified time zone',
-  proname => 'date_trunc', provolatile => 's', prorettype => 'timestamptz',
+  proname => 'date_trunc', prorettype => 'timestamptz',
   proargtypes => 'text timestamptz text', prosrc => 'timestamptz_trunc_zone' },
 { oid => '1218', descr => 'truncate interval to specified units',
   proname => 'date_trunc', prorettype => 'interval',