Re: [PATH] Jsonb, insert a new value into an array at arbitrary position

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: [PATH] Jsonb, insert a new value into an array at arbitrary position
Дата
Msg-id 5703EAFC.8020008@sigaev.ru
обсуждение исходный текст
Ответ на Re: [PATH] Jsonb, insert a new value into an array at arbitrary position  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: [PATH] Jsonb, insert a new value into an array at arbitrary position
Список pgsql-hackers
> I've been asked to look at and comment on the SQL API of the feature. I think
> it's basically sound, although there is one thing that's not clear from the
> regression tests: what happens if we're inserting into an object and the key
> already exists? e.g.:
>
> select jsonb_insert('{"a": {"b": "value"}}', '{a, b}', '"new_value"');
>
> I think this should be forbidden, i.e. the function shouldn't ever overwrite an
> existing value. If that's not handled it should be, and either way there should
> be a regression test for it.

I'm agree about covering this case by tests, but I think it should be allowed.
In this case it will work exactly as jsbonb_set
-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Move PinBuffer and UnpinBuffer to atomics
Следующее
От: Rod Taylor
Дата:
Сообщение: LOCK TABLE .. DEFERRABLE