From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add a non-strict version of jsonb_set
Date: Fri, 17 Jan 2020 01:23:09 +0000
Message-ID: <E1isGLt-0007wJ-Al@gemulon.postgresql.org> (raw)
Add a non-strict version of jsonb_set
jsonb_set_lax() is the same as jsonb_set, except that it takes and extra
argument that specifies what to do if the value argument is NULL. The
default is 'use_json_null'. Other possibilities are 'raise_exception',
'return_target' and 'delete_key', all these behaviours having been
suggested as reasonable by various users.
Discussion: https://postgr.es/m/375873e2-c957-3a8d-64f9-26c43c2b16e7@2ndQuadrant.com
Reviewed by: Pavel Stehule
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/a83586b5543b948f9e621462537a7303b113c482
Modified Files
--------------
doc/src/sgml/func.sgml | 23 +++++++++++++
src/backend/catalog/system_views.sql | 9 +++++
src/backend/utils/adt/jsonfuncs.c | 64 ++++++++++++++++++++++++++++++++++++
src/include/catalog/pg_proc.dat | 3 ++
src/test/regress/expected/jsonb.out | 57 ++++++++++++++++++++++++++++++++
src/test/regress/sql/jsonb.sql | 20 +++++++++++
6 files changed, 176 insertions(+)
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: Add a non-strict version of jsonb_set
In-Reply-To: <E1isGLt-0007wJ-Al@gemulon.postgresql.org>
References: <E1isGLt-0007wJ-Al@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