Re: jsonb and nested hstore

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Oleg Bartunov <obartunov(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Geoghegan <pg(at)heroku(dot)com>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: jsonb and nested hstore
Date: 2014-03-07 16:35:41
Message-ID: 5319F55D.3000604@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 03/06/2014 11:33 PM, Bruce Momjian wrote:
> On Thu, Mar 6, 2014 at 09:50:56PM +0400, Oleg Bartunov wrote:
>> Hi there,
>>
>> Looks like consensus is done. I and Teodor are not happy with it, but
>> what we can do :) One thing I want to do is to reserve our
>> contribution to the flagship feature (jsonb), particularly, "binary
>> storage for nested structures and indexing. Their work was sponsored
>> by Engine Yard".
> OK, if we are going with an unchanged hstore in contrib and a new JSONB,
> there is no reason to wack around JSONB to be binary compatible with the
> old hstore format. What sacrifices did we need to make to have JSBONB
> be binary compatible with hstore, can those sacrifices be removed, and
> can that be done in time for 9.4?
>

IIRC The sacrifice was one bit in the header (i.e. in the first int
after the varlena header). We could now repurpose that (for example if
we ever decided to use a new format).

Oleg and Teodor made most of the adjustments on the hstore(2) side (e.g.
providing for scalar roots, providing for json typing of scalars so
everything isn't just a string).

Can the architecture be changed? No. If we think it's not good enough we
would have to kiss jsonb goodbye for 9.4 and go back to the drawing
board. But I haven't seen any such suggestion from anyone who has been
reviewing it (e.g. Andres or Peter).

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2014-03-07 16:39:38 Re: extension_control_path
Previous Message Merlin Moncure 2014-03-07 16:08:53 Re: jsonb and nested hstore