Re: machine-readable explain output v4

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: machine-readable explain output v4
Дата
Msg-id 4A7F7C4F.2040305@dunslane.net
обсуждение исходный текст
Ответ на Re: machine-readable explain output v4  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers

Robert Haas wrote:
> One subtle point that isn't documented and probably should be is that
> JSON can't support a container that behaves partly like a list and
> partly like a hash, as XML can.  So for example in XML a <Plan> tag
> could have children like <Startup-Cost> (one each) and could also have
> its inner, outer, and sub-plans in there as <Plan> tags right under
> the parent <Plan>.  I'm not sure this would be good design anyway, but
> it COULD be done.  In JSON, this will crash and burn, because the
> container is either an array (which precludes labelling the elements)
> or a hash (which precludes duplicates).
>
>
>   

Right, this is fairly well known, I think. There are methods to map XML 
to JSON, and it can even be done in such a way that you can make a 
complete round trip, but in the schemes I've seen the JSON doesn't 
really look like what you would use if you designed the JSON document 
from scratch, or if it does then you're losing something.

cheers

andrew


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: machine-readable explain output v4
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Issues for named/mixed function notation patch