Re: [HACKERS] jsonb_delete with arrays

2017-01-18 Thread Magnus Hagander
On Wed, Jan 18, 2017 at 5:49 AM, Michael Paquier wrote: > On Tue, Jan 17, 2017 at 8:45 PM, Magnus Hagander > wrote: > > On Tue, Jan 17, 2017 at 8:25 AM, Michael Paquier < > michael.paqu...@gmail.com> > > wrote: > >> On Sun, Dec 18, 2016 at 1:27

Re: [HACKERS] jsonb_delete with arrays

2017-01-17 Thread Michael Paquier
On Tue, Jan 17, 2017 at 8:45 PM, Magnus Hagander wrote: > On Tue, Jan 17, 2017 at 8:25 AM, Michael Paquier > wrote: >> On Sun, Dec 18, 2016 at 1:27 AM, Dmitry Dolgov <9erthali...@gmail.com> >> wrote: >> > * use variadic arguments for

Re: [HACKERS] jsonb_delete with arrays

2017-01-17 Thread Magnus Hagander
On Tue, Jan 17, 2017 at 8:25 AM, Michael Paquier wrote: > On Sun, Dec 18, 2016 at 1:27 AM, Dmitry Dolgov <9erthali...@gmail.com> > wrote: > > Speaking about implementation of `jsonb_delete_array` - it's fine, but I > > would like to suggest two modifications: > > > > *

Re: [HACKERS] jsonb_delete with arrays

2017-01-16 Thread Michael Paquier
On Sun, Dec 18, 2016 at 1:27 AM, Dmitry Dolgov <9erthali...@gmail.com> wrote: > Speaking about implementation of `jsonb_delete_array` - it's fine, but I > would like to suggest two modifications: > > * create a separate helper function for jsonb delete operation, to use it in > both `jsonb_delete`

Re: [HACKERS] jsonb_delete with arrays

2016-12-17 Thread Dmitry Dolgov
> Attached is an implantation of jsonb_delete that instead of taking a single key to remove accepts an array of keys Since I already saw this patch, here is my small review. Speaking about implementation of `jsonb_delete_array` - it's fine, but I would like to suggest two modifications: *

Re: [HACKERS] jsonb_delete with arrays

2016-11-20 Thread Magnus Hagander
On Mon, Nov 21, 2016 at 5:05 AM, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > On 15 November 2016 at 22:53, Magnus Hagander > wrote: > > Attached is an implantation of jsonb_delete that instead of taking a > single key to remove accepts an array of keys (it still does

Re: [HACKERS] jsonb_delete with arrays

2016-11-20 Thread Dmitry Dolgov
> On 15 November 2016 at 22:53, Magnus Hagander wrote: > Attached is an implantation of jsonb_delete that instead of taking a single key to remove accepts an array of keys (it still does just keys, so it's using the - operator, it's not like the path delete function that also

[HACKERS] jsonb_delete with arrays

2016-11-15 Thread Magnus Hagander
Attached is an implantation of jsonb_delete that instead of taking a single key to remove accepts an array of keys (it still does just keys, so it's using the - operator, it's not like the path delete function that also takes an array, but uses a different operator). In some simple testing of