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 555A4558.3070901@dunslane.net
Whole thread Raw
In response to Re: jsonb concatenate operator's semantics seem questionable  (Peter Geoghegan <pg@heroku.com>)
Responses Re: jsonb concatenate operator's semantics seem questionable
List pgsql-hackers
On 05/18/2015 03:21 PM, Peter Geoghegan wrote:


>> The only question worth discussing is whether we change the operator to
>> "+" (or, for that matter, something else).  I've seen your vote on this,
>> so, does anyone else have an opinion on "+" vs. "||"?  Preferably with a
>> justification with some kind of grounding?
> My argument has very good grounding. The "||" UPDATE idiom from hstore
> does not and cannot work in a practical way with jsonb's current ||
> operator (at least for the large majority of use cases). It could, it
> just doesn't. I don't want users to make the same association that I
> did, which, based on the total lack of documentation for the new
> operator, they easily could.
>


So you're arguing that we shouldn't call the operation in question || 
because it's pretty much the same, mutatis mutandis, as the hstore 
operation of the same name. You've lost me.

Right now I'm more convinced that I was at the start of this discussion 
that we have the name right, and when we get a recursive merge operation 
calling it something else will be right too.

I do agree that we need to be clearer in the docs about what the 
operation is and is not.

cheers

andrew



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Disabling trust/ident authentication configure option
Next
From: Robert Haas
Date:
Subject: Re: jsonb concatenate operator's semantics seem questionable