Re: jsonb and nested hstore

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Christophe Pettus <xof(at)thebuild(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: jsonb and nested hstore
Date: 2014-02-28 14:57:31
Message-ID: 20140228145731.GJ2921@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Robert Haas (robertmhaas(at)gmail(dot)com) wrote:
> Taken individually, none of those decisions seem crazy, but taken
> together it's pretty weird. Instead of inventing a new type (jsonb)
> designed from the ground up to do what we want, we're, well, we're
> doing what Christophe says: creating our own proprietary hierarchical
> type and then making the hierarchical type everyone else uses depend
> on it. Described in those terms, it's hard for me to believe that
> anyone here thinks that's not a strange thing to do.

I was taking a slightly different perspective on it, though the devil is
almost certainly in the details. I'll be the first to admit that I've
not looked in detail at the patch either and so I've been trying to
avoid commenting on implementation specifics, but I was seeing this from
the perspective that we are building a single hierarchical typed data
store and then providing two interfaces to it. The way we're getting
there is a little awkward, in hindsight, and we'd like to have backwards
compatibility for one of the interfaces (and its on-disk storage), but
I'm not entirely sure that we'd actually end up in a different place
when we reach the end of this road.

Had we implemented jsonb first and then added hstore to it, would much
be different from the result we're getting here beyond the names of the
functions and the backwards-compatibility for the older on-disk format?
Are we really paying a high cost to support that older format?

The specific issues mentioned on this thread look more like bugs to be
addressed or additional operators which need to be implemented for
jsonb (imv, that should really be done for 9.4, but we have this
deadline looming...) along with perhaps dropping the implicit cast
between json and hstore (is there really a need for it..?).

Thanks,

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Karol Trzcionka 2014-02-28 14:59:41 Re: [HACKERS] GSoC 2014 - mentors, students and admins
Previous Message Andrew Dunstan 2014-02-28 14:50:00 Re: jsonb and nested hstore