On Saturday 13 June 2009 01:10:06 Robert Haas wrote:
> <pgexplain>, as it happens... I could post some samples of the
> output, but it seems like it might be just as well to let those who
> are curious try it for themselves. I'd rather get opinions from
> people who care enough to download & test than from those who are just
> bikeshedding. :-)
I recommend, however, that you think about writing a regression test for this,
so the interfaces are explicit, and those tweaking them in the future know
what they are dealing with.
A couple of comments on the specifics of the output:
For the JSON format:
* Numbers should not be quoted.
For the XML format:
* Instead of <pgexplain>, use <explain> with an XML namespace declaration.
The schema name is missing in either output format. I think that was supposed
to be one of the features of this that the objects are unambiguously
qualified.
I'm not sure I like element names such as <Node-Type>, instead of say
<nodetype>, which is more like HTML and DocBook. (Your way might be more like
SOAP, I guess.)
Also, the result type of an EXPLAIN (format xml) should be type xml, not text.
In general, I like this direction very much. There will probably be more
tweaks on the output format over time. It's not like the plain EXPLAIN hasn't
been tweaked countless times.