Re: jsonb contains behaviour weirdness - Mailing list pgsql-hackers

From Tom Lane
Subject Re: jsonb contains behaviour weirdness
Date
Msg-id 1182.1410804735@sss.pgh.pa.us
Whole thread Raw
In response to Re: jsonb contains behaviour weirdness  (Josh Berkus <josh@agliodbs.com>)
Responses Re: jsonb contains behaviour weirdness
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> On 09/12/2014 01:33 PM, Tom Lane wrote:
>> No, it's a bug, not a documentation deficiency.

> Hmmm?  Are you proposing that we should change how ARRAY @> ARRAY works
> for non-JSON data?

No.

> Or are you proposing that JSONARRAY @> JSONARRAY should work differently
> from ARRAY @> ARRAY?

And no.  It's a bug that jsonb array containment works differently from
regular array containment.  We understand the source of the bug, ie a
mistaken optimization.  I don't see why there's much need for discussion
about anything except whether removing the optimization altogether
(as Peter proposed) is the best fix, or whether we want to retain
some weaker form of it.

Personally I'd think that we should retain it for objects; Peter's
main argument against that was that the comment would be too complicated,
but that seems a bit silly from here.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: B-Tree support function number 3 (strxfrm() optimization)
Next
From: Tom Lane
Date:
Subject: Re: Triconsistent catalog declaration