From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: i.panchenko@postgrespro.ru
Subject: BUG #15140: Incorrect jsonb_set behavoir
Date: Mon, 02 Apr 2018 10:36:45 +0000
Message-ID: <152266540508.1442.16790414733320933622@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15140
Logged by: Ivan Panchenko
Email address: i.panchenko@postgrespro.ru
PostgreSQL version: 10.3
Operating system: any
Description:
First. Impossible to create a nested structure for a path with more than one
new keys.
postgres => select jsonb_set('{}'::jsonb, array['x', 'y'],
to_jsonb(1::text), true);
jsonb_set
-----------
{}
(1 строка)
Expected {"x": { "y" : "1" }}
Second. Setting a NULL value nullifies the whole JSON
postgres=> select jsonb_set('{}'::jsonb, array['x'], null, true);
jsonb_insert
--------------
(1 строка)
Expected { "x" : null }
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-bugs@postgresql.org
Cc: noreply@postgresql.org, i.panchenko@postgrespro.ru
Subject: Re: BUG #15140: Incorrect jsonb_set behavoir
In-Reply-To: <152266540508.1442.16790414733320933622@wrigleys.postgresql.org>
References: <152266540508.1442.16790414733320933622@wrigleys.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