Re: jsonb contains behaviour weirdness

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Alexander Korotkov <aekorotkov(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: jsonb contains behaviour weirdness
Date: 2014-09-12 18:34:23
Message-ID: 19539.1410546863@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <pg(at)heroku(dot)com> writes:
> On Fri, Sep 12, 2014 at 11:09 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-09-12 18:38:02 Re: jsonb contains behaviour weirdness
Previous Message Robert Haas 2014-09-12 18:28:40 Re: Support for N synchronous standby servers