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

From Peter Geoghegan
Subject Re: jsonb concatenate operator's semantics seem questionable
Date
Msg-id CAM3SWZRA49AhVnvMEiyCY8nUDYWte0dCh32=m+SCE02k4wA75g@mail.gmail.com
Whole thread Raw
In response to Re: jsonb concatenate operator's semantics seem questionable  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: jsonb concatenate operator's semantics seem questionable  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Mon, May 18, 2015 at 5:05 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
> As between || and + I'm personally moderately indifferent. I think you're
> representing some body of understanding about the effects of certain
> operators as being widespread when that's very far from clear.
>
> You really still haven't said what you want us to do. Mostly you have
> expressed your unhappiness without suggesting a path forward. That's not
> helpful.

I think I was very clear on what I see as a path forward. The
documentation and general presentation of the operator (e.g. advocacy
stuff) needs to make clear that it isn't suitable for "nested
assignment" in the same way that the hstore concatenate operator is. I
think it has been understood in this way by people so far. This is my
major concern.

So I think we should use the + operator to distance this from the
hstore concatenate operator, which *is* widely understood to be mostly
useful for "nested assignment". And I think that the documentation
should be updated to make the actual uses of the operator very clear.
Granted, the documentation for this new operator does not say anything
about "nested assignment" for the new concatenate operator as things
stand, but it says very little.

When I saw people getting excited about this new feature, I assumed
that it addressed what some people saw as the major omission in jsonb.
Unfortunately, it doesn't, and it behooves us to make sure that that
is understood. My complaint is mostly about the *positioning* of the
operator.
-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Making the regression tests halt to attach a debugger
Next
From: Andres Freund
Date:
Subject: Re: ERROR: cannot GetMultiXactIdMembers() during recovery