Re: machine-readable explain output v4

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: machine-readable explain output v4
Date: 2009-08-10 01:47:59
Message-ID: 4A7F7C4F.2040305@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-08-10 01:57:31 Re: Issues for named/mixed function notation patch
Previous Message Andres Freund 2009-08-10 01:43:22 Re: machine-readable explain output v4