From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix broken jsonb_set() logic for replacing array elements.
Date: Thu, 13 Oct 2016 04:26:03 +0000
Message-ID: <E1buXal-00072l-7k@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
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.47858@wrigleys.postgresql.org>
Branch
------
REL9_6_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/0e9e64c07ed93fb2be4583adaea28205d3188a0e
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 instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix broken jsonb_set() logic for replacing array elements.
In-Reply-To: <E1buXal-00072l-7k@gemulon.postgresql.org>
References: <E1buXal-00072l-7k@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox