Re: jsonb and nested hstore

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Josh Berkus <josh(at)agliodbs(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Hannu Krosing <hannu(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: jsonb and nested hstore
Date: 2014-02-28 00:27:57
Message-ID: CAM3SWZSuf=9GPrcXHCcVBtnmk+rc_mq=p_qeuEkbYFvytS=dXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 27, 2014 at 3:54 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> So I tried to tease it out from looking at the patches. As nearly as
> I can tell, the reason for making jsonb use hstore's binary format is
> because then we can build indexes on jsonbfield::hstore, and the
> actual type conversion will be a no-op; and the reason for upgrading
> hstore to allow nested keys is so that jsonb can map onto it.

I think that a typed, nested hstore has considerable independent
value, and would have had just the same value 10 years ago, before
JSON existed. I'm told that broadly speaking most people would prefer
the interface to speak JSON, and I'd like to give people what they
want, but that's as far as it goes. While I see problems with some
aspects of the patches as implemented, I think that the reason that
the two types share a binary format is that they're basically the same
thing. It might be that certain facets of the nested hstore
implementation reflect a need to accommodate jsonb, but there are no
ones that I'm currently aware of that I find at all objectionable.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-02-28 01:31:29 Re: jsonb and nested hstore
Previous Message Wang, Jing 2014-02-28 00:27:50 Re: pg_dump reporing version of server & pg_dump as comments in the output