Re: jsonb and nested hstore - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: jsonb and nested hstore
Date
Msg-id CAM3SWZS-wu0JB7FT1DZ4EkQR6DOoPKSuOtpLbS0gQw1Os-_pFg@mail.gmail.com
Whole thread Raw
In response to Re: jsonb and nested hstore  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: jsonb and nested hstore  (Peter Geoghegan <pg@heroku.com>)
Re: jsonb and nested hstore  (Alexander Korotkov <aekorotkov@gmail.com>)
Re: jsonb and nested hstore  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-hackers
On Mon, Mar 10, 2014 at 3:00 AM, Alexander Korotkov
<aekorotkov@gmail.com> wrote:
> I din't get comment about "leftmost" element. There is absolutely no
> distinguish between array elements. All elements are extracted into same
> keys independent of their indexes. It seems to have no change since I wrote
> hstore_hash_ops.  Could you share test case to illustrate what you mean?

I don't have time to post that at the moment, but offhand I *think*
your confusion may be due to the fact that the json_hash_ops opclass
(as I call it) was previously consistent with the behavior of the
other GIN opclass (the default). The problem is that they (well, at
least the default GIN and GiST opclasses) were inconsistent with how
the containment operator behaved in respect of jsonb array elements
generally.

Here is the commit on our feature branch where I fixed the problem for
the default GIN opclass:

https://github.com/feodor/postgres/commit/6f5e4fe9fc34f9512919b1c8b6a54952ab288640s

If it doesn't explain the problem, you may still wish to comment on
the correctness of this fix. I am still waiting on feedback from Oleg
and Teodor.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Mel Gorman
Date:
Subject: Database/kernel community topic at Collaboration Summit 2014
Next
From: Peter Geoghegan
Date:
Subject: Re: jsonb and nested hstore