BUG #15140: Incorrect jsonb_set behavoir

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: i(dot)panchenko(at)postgrespro(dot)ru
Subject: BUG #15140: Incorrect jsonb_set behavoir
Date: 2018-04-02 10:36:45
Message-ID: 152266540508.1442.16790414733320933622@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15140
Logged by: Ivan Panchenko
Email address: i(dot)panchenko(at)postgrespro(dot)ru
PostgreSQL version: 10.3
Operating system: any

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);
(1 строка)

Expected {"x": { "y" : "1" }}

Second. Setting a NULL value nullifies the whole JSON

postgres=> select jsonb_set('{}'::jsonb, array['x'], null, true);

(1 строка)

Expected { "x" : null }


Browse pgsql-bugs by date

  From Date Subject
Next Message Dmitry Dolgov 2018-04-02 12:04:12 Re: BUG #15140: Incorrect jsonb_set behavoir
Previous Message Andres Freund 2018-03-31 00:19:46 Re: BUG #14941: Vacuum crashes