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

From Peter Geoghegan
Subject Re: jsonb and nested hstore
Date
Msg-id CAM3SWZSuf=9GPrcXHCcVBtnmk+rc_mq=p_qeuEkbYFvytS=dXg@mail.gmail.com
Whole thread Raw
In response to Re: jsonb and nested hstore  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, Feb 27, 2014 at 3:54 AM, Robert Haas <robertmhaas@gmail.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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Windows exit code 128 ... it's baaack
Next
From: "Wang, Jing"
Date:
Subject: Re: pg_dump reporing version of server & pg_dump as comments in the output