Re: Add jsonb_compact(...) for whitespace-free jsonb to text

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Sehrope Sarkuni <sehrope(at)jackdb(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add jsonb_compact(...) for whitespace-free jsonb to text
Date: 2016-04-26 18:25:54
Message-ID: CAHyXU0wbqTyT5S0+MRHz9UE0MPoSjHgQTM+eKXgXKGCRTOQj-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Apr 24, 2016 at 8:16 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> Note that the json type, unlike jsonb, preserves exactly the white space and
> key order of its input. In fact, the input is exactly what it stores.

That is true, but the json serialization functions (to_json etc)
really out to have the same whitespace strategy is jsonb text out. Of
the two ways it's currently done, the json serialization variant seems
better but a completely compact variant seems like a good idea basis
of efficiency.

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Paul Ramsey 2016-04-26 19:17:27 Re: Parallel Queries and PostGIS
Previous Message Christian Ullrich 2016-04-26 17:39:29 Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013