Re: Wanted: jsonb on-disk representation documentation

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Wanted: jsonb on-disk representation documentation
Date: 2014-05-07 19:27:15
Message-ID: CAM3SWZRfgaYu7F9PD_vgioPLfvd-fZabFv5aLqtZq8aySqb2CA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 7, 2014 at 12:08 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-05-07 19:27:37 Re: Wanted: jsonb on-disk representation documentation
Previous Message Peter Geoghegan 2014-05-07 19:18:55 Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers