diff options
author | Andrew Dunstan | 2024-02-10 17:12:39 +0000 |
---|---|---|
committer | Andrew Dunstan | 2024-02-10 17:12:39 +0000 |
commit | 469745468668917434dbef48eddad4f961880b3d (patch) | |
tree | 8518d9f17d7307bfacf766b08e0a801befde556d /doc/src | |
parent | ce571434ae7027462565706236a0c6fbdf603734 (diff) |
Disallow jsonpath methods involving TZ in immutable functions
Timezones are not immutable and so neither is any function that relies on
them. In commit 66ea94e8, we introduced a few methods which do casting
from one time to another and thus may involve the current timezone. To
preserve the immutability of jsonpath functions currently marked
immutable, disallow these methods from being called from non-TZ aware
functions.
Jeevan Chalke, per a report from Jian He.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 6788ba8ef4a..11d537b341c 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -18240,7 +18240,12 @@ ERROR: jsonpath member accessor can only be applied to an object <type>timestamptz</type>, and <type>time</type> to <type>timetz</type>. However, all but the first of these conversions depend on the current <xref linkend="guc-timezone"/> setting, and thus can only be performed - within timezone-aware <type>jsonpath</type> functions. + within timezone-aware <type>jsonpath</type> functions. Similarly, other + date/time-related methods that convert strings to date/time types + also do this casting, which may involve the current + <xref linkend="guc-timezone"/> setting. Therefore, these conversions can + also only be performed within timezone-aware <type>jsonpath</type> + functions. </para> </note> |