jsonb_set() strictness considered harmful to data

Поиск
Список
Период
Сортировка
От Floris Van Nee
Тема jsonb_set() strictness considered harmful to data
Дата
Msg-id 1571560798575.47024@Optiver.com
обсуждение исходный текст
Ответ на Re: jsonb_set() strictness considered harmful to data  (Ariadne Conill <ariadne@dereferenced.org>)
Ответы Re: jsonb_set() strictness considered harmful to data  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Re: jsonb_set() strictness considered harmful to data  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Список pgsql-general

FWIW I've been bitten by this 'feature' more than once as well, accidentally erasing a column. Now I usually write js = jsonb_set(js, coalesce(new_column, 'null'::jsonb)) to prevent erasing the whole column, and instead setting the value to a jsonb null value, but I also found the STRICT behavior very surprising at first..


-Floris

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: releasing space
Следующее
От: Steve Atkins
Дата:
Сообщение: Re: jsonb_set() strictness considered harmful to data