Re: jsonb concatenate operator's semantics seem questionable - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: jsonb concatenate operator's semantics seem questionable
Date
Msg-id 555A366F.1070408@dunslane.net
Whole thread Raw
In response to Re: jsonb concatenate operator's semantics seem questionable  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
On 05/18/2015 02:45 PM, Josh Berkus wrote:
> On 05/18/2015 11:34 AM, Peter Geoghegan wrote:
>> I'm not necessarily attached to "+". I just want to make this
>> different to hstore's "||" operator. There should be a similar idiom
>> with jsonb, but that can come later.
> This argument still makes no sense to me.  Hstore is not nested. If
> anything, the behavior of || in hstore suggests that we *should* use ||
> for shallow append in JSONB.
>

Yeah, I agree. To me "concatenation" seems a wrong designation of what 
is effectively a recursive merge.

I have no objection to us making much clearer in the docs exactly what's 
happening with ||.

cheers

andrew



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: jsonb concatenate operator's semantics seem questionable
Next
From: Josh Berkus
Date:
Subject: Re: jsonb concatenate operator's semantics seem questionable