Re: BUG #15140: Incorrect jsonb_set behavoir

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #15140: Incorrect jsonb_set behavoir
Дата
Msg-id 2394.1522681369@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #15140: Incorrect jsonb_set behavoir  ("Ivan E. Panchenko" <i.panchenko@postgrespro.ru>)
Список pgsql-bugs
"Ivan E. Panchenko" <i.panchenko@postgrespro.ru> writes:
> Thanks for the workaround.  Nevertheless, this behavior looks 
> counter-intuitive, and I would vote for removing strictness from this 
> function.

That would amount to assuming that SQL NULL and JSON 'null' are
interchangeable, which isn't the case elsewhere, and I'm not sure
we want it to be the case here.  You can get the behavior you're
looking for with jsonb_set(..., COALESCE(fieldvalue, 'null')).

            regards, tom lane


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

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