pgsql: Disallow jsonpath methods involving TZ in immutable functions

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема pgsql: Disallow jsonpath methods involving TZ in immutable functions
Дата
Msg-id E1rYr5s-005ZdW-1X@gemulon.postgresql.org
обсуждение исходный текст
Список 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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Remove race condition in pg_get_expr().
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Use extensible buffers to assemble command lines