Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)
Дата
Msg-id AANLkTikfOWsO=KeCxGqHxbFvGM-67H4aRGhKJ8q4ic=f@mail.gmail.com
обсуждение исходный текст
Ответ на Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)  (Joseph Adams <joeyadams3.14159@gmail.com>)
Список pgsql-hackers
On Sat, Sep 18, 2010 at 11:48 PM, Joseph Adams
<joeyadams3.14159@gmail.com> wrote:
> As for whitespace preservation, I don't think we should go out of our
> way to keep it intact.  Sure, preserving formatting for input and
> output makes some sense because we'd have to go out of our way to
> normalize it, but preserving whitespace in JSONPath tree selections
> (json_get) and updates (json_set) is a lot of work (that I shouldn't
> have done), and it doesn't really help anybody.  Consider json_get on
> a node under 5 levels of indentation.

That seems reasonable to me.  I don't mind messing up the whitespace
when someone pulls a value out using a jsonpath, but I don't think we
should mess with it when they just ask us to store a value.  Users
will tend to format their JSON in a way that they find readable, and
while you'd need artificial intelligence to preserve their preferred
formatting in all cases, changing it to what we think is best when
there's no intrinsic necessity doesn't seem helpful.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


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

Предыдущее
От: Joseph Adams
Дата:
Сообщение: Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Postgres 9.0.0 release scheduled