On Sun, Apr 24, 2016 at 3:02 PM, Sehrope Sarkuni <sehr...@jackdb.com> wrote:
> It'd be nice to have a stable text representation of a jsonb value with > minimal whitespace. The latter would also save a few bytes per record in > text output formats, on the wire, and in backups (ex: COPY ... TO STDOUT). > > Attached is a *very* work in progress patch that adds a > jsonb_compact(jsonb)::text function. It generates a text representation > without extra whitespace but does not yet try to enforce a stable order of > the properties within a jsonb value. > > This doesn't impact backups unless you do away with the function and change the output i/o function for the type. In that scenario the function is no longer necessary. David J.