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

Поиск
Список
Период
Сортировка
От Dmitry Dolgov
Тема Re: [PATH] Jsonb, insert a new value into an array at arbitrary position
Дата
Msg-id CA+q6zcW9PJc_NSQYnfaSuFfd+_y9o34SuV8BuTYAxOrgiJddLg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATH] Jsonb, insert a new value into an array at arbitrary position  (Vitaly Burovoy <vitaly.burovoy@gmail.com>)
Ответы Re: [PATH] Jsonb, insert a new value into an array at arbitrary position  (Vitaly Burovoy <vitaly.burovoy@gmail.com>)
Re: [PATH] Jsonb, insert a new value into an array at arbitrary position  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On 31 March 2016 at 17:31, Vitaly Burovoy <vitaly.burovoy@gmail.com> wrote:
it is logical to insert new value if "before", then current value, then new
value if "after".

Oh, I see now. There is a slightly different logic: `v` is a current value and `newval` is a new value.
So basically we insert a current item in case of "after", then a new value (if it's not a delete operation),
then a current item in case of "before". But I agree, this code can be more straightforward. I've attached
a new version, pls take a look (it contains the same logic that you've mentioned).
Вложения

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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: PATCH: index-only scans with partial indexes
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Relation extension scalability