Re: [HACKERS] jsonb_set: update or upsert default?

2015-05-23 Thread Andrew Dunstan
On 05/23/2015 04:03 PM, Petr Jelinek wrote: On 23/05/15 17:59, David E. Wheeler wrote: On May 22, 2015, at 7:22 PM, Andrew Dunstan and...@dunslane.net wrote: The proposed flag for jsonb_set (the renamed jsonb_replace) in the patch I recently published is set to false, meaning that the

Re: [HACKERS] jsonb_set: update or upsert default?

2015-05-23 Thread Petr Jelinek
On 23/05/15 17:59, David E. Wheeler wrote: On May 22, 2015, at 7:22 PM, Andrew Dunstan and...@dunslane.net wrote: The proposed flag for jsonb_set (the renamed jsonb_replace) in the patch I recently published is set to false, meaning that the default behaviour is to require all elements of

Re: [HACKERS] jsonb_set: update or upsert default?

2015-05-23 Thread David E. Wheeler
On May 22, 2015, at 7:22 PM, Andrew Dunstan and...@dunslane.net wrote: The proposed flag for jsonb_set (the renamed jsonb_replace) in the patch I recently published is set to false, meaning that the default behaviour is to require all elements of the path including the last to be present.

[HACKERS] jsonb_set: update or upsert default?

2015-05-22 Thread Andrew Dunstan
The proposed flag for jsonb_set (the renamed jsonb_replace) in the patch I recently published is set to false, meaning that the default behaviour is to require all elements of the path including the last to be present. What that does is effectively UPDATE for jsonb. If the flag is true, then