Re: WIP Patch: Add a function that returns binary JSONB as a bytea - Mailing list pgsql-hackers

From David Fetter
Subject Re: WIP Patch: Add a function that returns binary JSONB as a bytea
Date
Msg-id 20181102222434.GM12677@fetter.org
Whole thread Raw
In response to Re: WIP Patch: Add a function that returns binary JSONB as a bytea  (Stephen Frost <sfrost@snowman.net>)
Responses Re: WIP Patch: Add a function that returns binary JSONB as a bytea  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Wed, Oct 31, 2018 at 11:18:46AM -0400, Stephen Frost wrote:
> Greetings,
> 
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
> > Stephen Frost <sfrost@snowman.net> writes:
> > > * Tom Lane (tgl@sss.pgh.pa.us) wrote:
> > >> I dunno, I do not think it's a great idea to expose jsonb's internal
> > >> format to the world.  We intentionally did not do that when the type
> > >> was first defined --- that's why its binary I/O format isn't already
> > >> like this --- and I don't see that the tradeoffs have changed since then.
> > 
> > > I disagree- it's awfully expensive to go back and forth between string
> > > and a proper representation.
> > 
> > Has anyone put any effort into making jsonb_out() faster?  I think that
> > that would be way more productive.  Nobody is going to want to write
> > code to convert jsonb's internal form into whatever their application
> > uses; particularly not dealing with numeric fields.
> 
> I'm all for making jsonb_out() faster, but even a faster jsonb_out()
> isn't going to be faster than shoveling the jsonb across.

Would it be completely batty to try store JSONB on disk in wire format
and optimize accesses, indexing, etc. around that?

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: WIP Patch: Add a function that returns binary JSONB as a bytea
Next
From: Andres Freund
Date:
Subject: Re: WIP Patch: Add a function that returns binary JSONB as a bytea