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

From Tom Lane
Subject Re: jsonb contains behaviour weirdness
Date
Msg-id 19539.1410546863@sss.pgh.pa.us
Whole thread Raw
In response to Re: jsonb contains behaviour weirdness  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
Peter Geoghegan <pg@heroku.com> writes:
> On Fri, Sep 12, 2014 at 11:09 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'm confused.  Are you proposing to return to sort + de-dup of JSON
>> arrays?  Surely that is completely broken.  Arrays are ordered.

> Sorry, my earlier remarks were premature. In fact, that alteration
> only applied to existence, not containment. However, arrays are
> ordered for the purposes of equality, but not containment.

My remarks were also premature, because looking back at the referenced
commit, I see what it removed was a sort and de-dup as a preliminary step
in containment comparisons, not as a generic alteration of array contents.
So that was sane enough, though I concur with Heikki's opinion that it
likely failed to be a performance win.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Support for N synchronous standby servers
Next
From: Peter Geoghegan
Date:
Subject: Re: jsonb contains behaviour weirdness