Re: explain root element for auto-explain - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: explain root element for auto-explain
Date
Msg-id 200908191553.n7JFrnU25985@momjian.us
Whole thread Raw
In response to explain root element for auto-explain  (Andrew Dunstan <andrew.dunstan@pgexperts.com>)
Responses Re: explain root element for auto-explain  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Are we going to publish an XML DTD for EXPLAIN, or have we already?

---------------------------------------------------------------------------

Andrew Dunstan wrote:
> 
> The attached tiny patch sets the <explain> root element for auto-explain 
> XML output, so it looks something like this:
> 
>     <explain xmlns="http://www.postgresql.org/2009/explain">
>       <Plan>
>         <Node-Type>Result</Node-Type>
>         <Startup-Cost>0.00</Startup-Cost>
>         <Total-Cost>0.01</Total-Cost>
>         <Plan-Rows>1</Plan-Rows>
>         <Plan-Width>0</Plan-Width>
>       </Plan>
>     </explain>
> 
> The JSON output looks like this:
> 
>     [
>       "Plan": {
>         "Node Type": "Result",
>         "Startup Cost": 0.00,
>         "Total Cost": 0.01,
>         "Plan Rows": 1,
>         "Plan Width": 0
>       }
>     ]
> 
> This is worth doing in itself in the XML case for reasons previously 
> explained, but it also makes it relatively easy to add a Query-Text node 
> or some such to the structured output, which is very much worth having, 
> and would be my next proposed step.
> 
> cheers
> 
> andrew


> 
> -- 
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: REGRESS_OPTS versus MSVC build scripts
Next
From: Andrew Dunstan
Date:
Subject: Re: explain root element for auto-explain