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

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Petr Jelinek <petr(at)2ndquadrant(dot)com>
Cc: David Steele <david(at)pgmasters(dot)net>, Vitaly Burovoy <vitaly(dot)burovoy(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATH] Jsonb, insert a new value into an array at arbitrary position
Date: 2016-03-17 11:58:55
Message-ID: CA+q6zcXgrT=jZc0aP=9RsCPCBb+whVrkDat7E7Prk7HZsa9weQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I still don't like that this works on path leading to an object given
that we can't fulfill the promise of inserting to an arbitrary position
there.

I'm thinking about this following way - `jsonb_insert` is just a function
to insert a new value, which has specific options to enforce arbitrary
position in case of jsonb array. I don't think this can confuse someone
since it's not something like `jsonb_insert_at_position` function. But of
course, if I'm wrong we can easy change the function name and make it
available only for arrays.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2016-03-17 11:59:42 Re: Combining Aggregates
Previous Message David Rowley 2016-03-17 11:53:04 Re: Combining Aggregates