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

From Andrew Dunstan
Subject Re: jsonb and nested hstore
Date
Msg-id 52F2655F.1030408@dunslane.net
Whole thread Raw
In response to Re: jsonb and nested hstore  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: jsonb and nested hstore
List pgsql-hackers
On 02/05/2014 10:48 AM, Merlin Moncure wrote:
> On Wed, Feb 5, 2014 at 12:44 AM, Heikki Linnakangas
> <hlinnakangas@vmware.com> wrote:
>> send/recv functions are also needed for binary-format COPY. IMHO jsonb must
>> have send/recv functions. All other built-in types have them, except for
>> types like 'smgr', 'aclitem' and 'any*' that no-one should be using as
>> column types.
> Yes -- completely agree.  I also consider the hstore functionality (in
> particular, searching and access operators) to be essential
> functionality.
>
> I'm actually surprised we have an alternate binary wire format for
> jsonb at all; json is explicitly text and I'm not sure what the use
> case of sending the internal structure is.  Meaning, maybe jsonb
> send/recv should be a thin wrapper to sending the json string.   The
> hstore send/recv I think properly covers the case where client side
> binary wire format actors would want to manage performance critical
> cases that want to avoid parsing.
>
>

The whole reason we have jsonb is to avoid reparsing where possible. In 
fact, I'd rather have the send and recv functions in the jsonb code and 
have hstore's functions call them, so we don't duplicate code.

cheers

andrew




pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: jsonb and nested hstore
Next
From: Tom Lane
Date:
Subject: Re: Misaligned BufferDescriptors causing major performance problems on AMD