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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Add jsonb_compact(...) for whitespace-free jsonb to text
Дата
Msg-id 20160428202910.GA113461@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Add jsonb_compact(...) for whitespace-free jsonb to text  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Add jsonb_compact(...) for whitespace-free jsonb to text  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
David G. Johnston wrote:
> On Thu, Apr 28, 2016 at 10:00 AM, Ryan Pedela <rpedela@datalanche.com>
> wrote:

> > In addition, every JSON implementation I have ever seen fully minimizes
> > JSON by default. PG appears to deviate from standard practice for no
> > apparent reason.
> 
> Sorry to nit-pick but that's called convention - the standard is likely
> silent on this point.  And its not like this was done in a vacuum - why is
> this only coming up now and not, say, during the beta?  Is it surprising
> that this seemingly easy-to-overlook dynamic was not explicitly addressed
> by the author and reviewer of the patch, especially when implementation of
> said feature consisted of a lot more things of greater import and impact?

Actually we did have someone come up with a patch to "normalize" how
JSON stuff was output, because our code seems to do it in three
different, inconsistent ways.  And our response was for them to get the
heck outta here, because we're so much in love with our current
practice that we don't need to refactor the three implementations into a
single one.

Personally I don't see any reason we need to care one bit about how the
irrelevant whitespace is laid out, in other words why shouldn't we just
strip them all out?  Surely there's no backwards compatibility argument
there.  If somebody wants to see a nicely laid out structure they can
use the prettification function.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: [BUGS] Breakage with VACUUM ANALYSE + partitions
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: 9.6 and fsync=off