Peter Eisentraut wrote:
Am Mittwoch, 2. Juli 2008 schrieb Tom Raney:
This is an update to my EXPLAIN XML patch submitted a few days ago.

Could you explain how you came up with the XML schema design? I suppose you just made something up that went along with the existing XML output.
Yes, it is based on the existing output.
I would like to see more integration with the spirit of the existing XML functionality. For example, instead of things like

"<runtime ms=\"%.3f\" />\n"

we ought to be using XML Schema data types for time intervals and so on.
The DTD provides only rudimentary document validation but it has no support for type checking. So, it may make sense to move to the more rigorous XML Schema. There is a 'duration' data type that could be used for the instance listed above. Or, we could define our own.
We might also want to use an XML namespace.
Taking the 'ms' field listed above: xmlns=""; or something like this?
Table and index names should be escaped using the existing escape mechanism for identifiers. There might also be encoding issues.
That's a good point.  Or, wrap them with CDATA.
It would also be interesting if EXPLAIN could optionally be a function that returns a datum of type XML, to allow further processing.

Any thoughts on these issues?
I am in the process of writing a parser of this XML output for the Red Hat Visual Explain tool. I want to see what surprises come up during implementation.

Sent via pgsql-patches mailing list (
To make changes to your subscription:

Reply via email to