Re: JSONB in-place updates?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: JSONB in-place updates?
Дата
Msg-id CAB7nPqRoPuGTM-bM5YY+p=bA94vPF802i=Bz2khvmXQEYCvUuQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: JSONB in-place updates?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
On Tue, Apr 15, 2014 at 5:16 AM, Josh Berkus <josh@agliodbs.com> wrote:
> On 04/14/2014 09:27 AM, kelas wrote:
>> Are there any plans to add "in-place at-depth" update operator for JSONB
>> type, e.g.:
>>
>> UPDATE test SET attrs->'anwser' = 42 where attrs->'answer' = 41
>>
>
> Plans, yes.  But not until 9.5, or maybe as an extension.
A custom function of the type find_and_modify(jsonb_data, key_name,
new_value) combined with the uniqueness of jsonb keys would be a good
workaround for now.
Regards,
-- 
Michael



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: assertion failure 9.3.4
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add TAP tests for client programs