Fix broken jsonb_set() logic for replacing array elements.

Commit 0b62fd036 did a fairly sloppy job of refactoring setPath()
to support jsonb_insert() along with jsonb_set().  In its defense,
though, there was no regression test case exercising the case of
replacing an existing element in a jsonb array.

Per bug #14366 from Peng Sun.  Back-patch to 9.6 where bug was introduced.

Report: <20161012065349.1412.47...@wrigleys.postgresql.org>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9c4cc9e2c75e84a8267396be5cccbfe25b8f63f6

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c   | 12 ++++++------
src/test/regress/expected/jsonb.out |  6 ++++++
src/test/regress/sql/jsonb.sql      |  1 +
3 files changed, 13 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to