From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Disallow invalid path elements in jsonb_set |
Date: | 2015-10-04 17:48:41 |
Message-ID: | E1ZinOr-0002zh-NZ@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Disallow invalid path elements in jsonb_set
Null path elements and, where the object is an array, invalid integer
elements now cause an error.
Incorrect behaviour noted by Thom Brown, patch from Dmitry Dolgov.
Backpatch to 9.5 where jsonb_set was introduced
Branch
------
REL9_5_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/544ccf644288132f805260c4eb9fd12029c5cf8c
Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c | 5 ++++-
src/test/regress/expected/jsonb.out | 24 +++++++++---------------
src/test/regress/expected/jsonb_1.out | 24 +++++++++---------------
src/test/regress/sql/jsonb.sql | 3 +++
4 files changed, 25 insertions(+), 31 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-10-04 18:07:08 | pgsql: Fix some issues in new hashtable size calculations in nodeHash.c |
Previous Message | Peter Eisentraut | 2015-10-04 16:38:18 | pgsql: Group cluster_name and update_process_title settings together |