Re: machine-readable explain output - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: machine-readable explain output
Date
Msg-id 200906131608.45689.peter_e@gmx.net
Whole thread Raw
In response to Re: machine-readable explain output  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: machine-readable explain output
List pgsql-hackers
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.



pgsql-hackers by date:

Previous
From: Stefan Kaltenbrunner
Date:
Subject: char() overhead on read-only workloads not so insignifcant as the docs claim it is...
Next
From: Peter Eisentraut
Date:
Subject: Re: pgindent run coming