Re: Wanted: jsonb on-disk representation documentation - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Wanted: jsonb on-disk representation documentation
Date
Msg-id CAM3SWZRfgaYu7F9PD_vgioPLfvd-fZabFv5aLqtZq8aySqb2CA@mail.gmail.com
Whole thread Raw
In response to Re: Wanted: jsonb on-disk representation documentation  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Wanted: jsonb on-disk representation documentation
List pgsql-hackers
On Wed, May 7, 2014 at 12:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>  * Jsonb Keys and string array elements are treated equivalently when
>  * serialized to text index storage.  One day we may wish to create an opclass
>  * that only indexes values, but for now keys and values are stored in GIN
>  * indexes in a way that doesn't really consider their relationship to each
>  * other.
>
> Is this an obsolete speculation about writing jsonb_hash_ops, or is there
> still something worth preserving there?  If so, what?

This is not obsolete. It would equally apply to a GiST opclass that
wanted to support our current definition of existence. Array elements
are keys simply by virtue of being strings, but otherwise are treated
as values. See the large comment block within gin_extract_jsonb().

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers
Next
From: Tom Lane
Date:
Subject: Re: Wanted: jsonb on-disk representation documentation