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

From Peter Geoghegan
Subject Re: jsonb and nested hstore
Date
Msg-id CAM3SWZTMx=Q_nmJN5LEUPZwBRxTL0h=3OyZfkSW_o2UM7Qht9Q@mail.gmail.com
Whole thread Raw
In response to Re: jsonb and nested hstore  (Christophe Pettus <xof@thebuild.com>)
Responses Re: jsonb and nested hstore  (Christophe Pettus <xof@thebuild.com>)
List pgsql-hackers
On Thu, Feb 27, 2014 at 8:43 PM, Christophe Pettus <xof@thebuild.com> wrote:
>> I'm not the one opposed to putting jsonb stuff in the hstore module!
>
> My proposal is that we break the dependencies of jsonb (at least, at the user-visible level) on
> hstore2, thus allowing it in core successfully. jsonb || jsonb returning hstore seems like a bug
> to me, not a feature we should be supporting.

Of course it's a bug.

The only problem with that is now you have to move the implementation
of ||, plus a bunch of other hstore operators into core. That seems
like a more difficult direction to move in from a practical
perspective, and I'm not sure that you won't hit a snag elsewhere. But
you must do this in order to make what you describe work; obviously
you can't break jsonb's dependency on hstore if users must have hstore
installed to get a || operator. In short, jsonb and hstore are tied at
the hip (which I don't think is unreasonable), and if you insist on
having one in core, you almost need to have both there (with hstore
proper perhaps just consisting of stub functions and io routines).

I don't understand the aversion to putting jsonb in the hstore
extension. What's wrong with having the code live in an extension,
really? I suppose that putting it in core would be slightly preferable
given the strategic importance of jsonb, but it's not something that
I'd weigh too highly. Right now, I'm much more concerned about finding
*some* way of integrating jsonb that is broadly acceptable.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: jsonb and nested hstore
Next
From: Christophe Pettus
Date:
Subject: Re: jsonb and nested hstore