From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix jsonb replace and delete on scalars and empty structures
Date: Wed, 13 May 2015 17:56:49 +0000
Message-ID: <E1Ysatl-0002me-9J@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Fix jsonb replace and delete on scalars and empty structures
These operations now error out if attempted on scalars, and simply
return the input if attempted on empty arrays or objects. Along the way
we remove the unnecessary cloning of the input when it's known to be
unchanged. Regression tests covering these cases are added.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/3f2cec797ecceb7467e365410506c0817f9d0163
Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c | 88 +++++++++++++--------------------
src/test/regress/expected/jsonb.out | 57 +++++++++++++++++++++
src/test/regress/expected/jsonb_1.out | 57 +++++++++++++++++++++
src/test/regress/sql/jsonb.sql | 16 ++++++
4 files changed, 165 insertions(+), 53 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: andrew@dunslane.net
Subject: Re: pgsql: Fix jsonb replace and delete on scalars and empty structures
In-Reply-To: <E1Ysatl-0002me-9J@gemulon.postgresql.org>
References: <E1Ysatl-0002me-9J@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