From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Disallow jsonpath methods involving TZ in immutable functions |
Date: | 2024-02-10 17:24:48 |
Message-ID: | E1rYr5s-005ZdW-1X@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/469745468668917434dbef48eddad4f961880b3d
Modified Files
--------------
doc/src/sgml/func.sgml | 7 +-
src/backend/utils/adt/jsonpath_exec.c | 16 ++
src/test/regress/expected/jsonb_jsonpath.out | 260 ++++++++++++---------------
src/test/regress/sql/jsonb_jsonpath.sql | 33 +++-
4 files changed, 168 insertions(+), 148 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2024-02-11 08:36:13 | pgsql: Use extensible buffers to assemble command lines |
Previous Message | Tom Lane | 2024-02-09 17:29:54 | pgsql: Remove race condition in pg_get_expr(). |