Re: [HACKERS] Are we sufficiently clear that jsonb containment is nested?

2015-10-29 Thread Peter Geoghegan
On Thu, Oct 29, 2015 at 4:03 PM, Tom Lane wrote: > After further thought I realized that part of the point you'd been > making was that people might fail to distinguish the behaviors of > containment and existence operators in this regard. So I think the > example needs to make that point explici

Re: [HACKERS] Are we sufficiently clear that jsonb containment is nested?

2015-10-29 Thread Tom Lane
Peter Geoghegan writes: > Robert seemed to want to keep the example short, which I took on > board, but I myself think that your more worked out treatment is > better. I think this revision makes my point very well. I recommend > committing it. After further thought I realized that part of the po

Re: [HACKERS] Are we sufficiently clear that jsonb containment is nested?

2015-10-29 Thread Peter Geoghegan
On Thu, Oct 29, 2015 at 2:02 PM, Tom Lane wrote: > After studying the proposed patch a bit more, I still think the example > is good, but the added text doesn't do much to explain your point. If > I get what your point is, which maybe I don't, I think the attached might > clarify it better. What

Re: [HACKERS] Are we sufficiently clear that jsonb containment is nested?

2015-10-29 Thread Tom Lane
Peter Geoghegan writes: > On Thu, Oct 29, 2015 at 1:16 PM, Tom Lane wrote: >> I think the existing text is largely my fault, so I'll do something with >> this. > Good. Thanks. After studying the proposed patch a bit more, I still think the example is good, but the added text doesn't do much to

Re: [HACKERS] Are we sufficiently clear that jsonb containment is nested?

2015-10-29 Thread Peter Geoghegan
On Thu, Oct 29, 2015 at 1:16 PM, Tom Lane wrote: > I think the existing text is largely my fault, so I'll do something with > this. Good. Thanks. >> I still think it would be a good idea to go back to 9.4. I have reason >> to believe that people are getting confused on this point. > > You didn't

Re: [HACKERS] Are we sufficiently clear that jsonb containment is nested?

2015-10-29 Thread Tom Lane
Peter Geoghegan writes: > On Fri, Jun 26, 2015 at 8:05 AM, Robert Haas wrote: >> I would be fine with adding a *compact* example of this kind to the >> table that begins section 8.14.3. I probably would not back-patch it, >> because the absence of that example is not an error in the >> documenta

Re: [HACKERS] Are we sufficiently clear that jsonb containment is nested?

2015-10-29 Thread Peter Geoghegan
On Fri, Jun 26, 2015 at 8:05 AM, Robert Haas wrote: > I would be fine with adding a *compact* example of this kind to the > table that begins section 8.14.3. I probably would not back-patch it, > because the absence of that example is not an error in the > documentation, but I will not complain i

Re: [HACKERS] Are we sufficiently clear that jsonb containment is nested?

2015-06-26 Thread Robert Haas
On Wed, Jun 24, 2015 at 5:53 PM, Peter Geoghegan wrote: > I worry that "8.14.3. jsonb Containment and Existence" is not > sufficiently clear in explaining that jsonb containment is nested. > I've seen anecdata suggesting that this is unclear to users. We do > say: > > """ > The general principle i

[HACKERS] Are we sufficiently clear that jsonb containment is nested?

2015-06-24 Thread Peter Geoghegan
I worry that "8.14.3. jsonb Containment and Existence" is not sufficiently clear in explaining that jsonb containment is nested. I've seen anecdata suggesting that this is unclear to users. We do say: """ The general principle is that the contained object must match the containing object as to str