BUG #15140: Incorrect jsonb_set behavoir

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #15140: Incorrect jsonb_set behavoir
Дата
Msg-id 152266540508.1442.16790414733320933622@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #15140: Incorrect jsonb_set behavoir  (Dmitry Dolgov <9erthalion6@gmail.com>)
Список pgsql-bugs
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 }


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #15112: Unable to run pg_upgrade with earthdistance extension
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: BUG #15140: Incorrect jsonb_set behavoir