Andrew Dunstan wrote:
Bruce Momjian wrote:
Are we going to publish an XML DTD for EXPLAIN, or have we already?
Not a DTD, but I am working on an XML Schema (DTDs are a bit yesterday).
Here is a RelaxNG spec which people might find a bit easier to read. It
has been autocreated by a little tool called trang, that I used on a
very large body of explain output that I produced by mangling the
regression tests (and, incidentally, crashing the server in the result -
I still have to chase that up).
I have a couple of questions, however. First, in that long list of
alternatives for a Plan node, can any of them occur more than once?
Second, we are using Item as a child of both Output and Sort-Key nodes.
Are they really describing the same thing? And in any case, Item is a
wonderfully non-informative name, as is Output, for that matter.
BTW - I know this requires tweaking - those xsd:NCName values will
probably just become text, for example.
cheers
andrew
default namespace = "http://www.postgresql.org/2009/explain"
start =
element explain {
element Query {
Plan,
element Triggers { empty },
element Total-Runtime { xsd:decimal }
}
}
Plan =
element Plan {
(element Actual-Loops { xsd:integer }
| element Actual-Rows { xsd:integer }
| element Actual-Startup-Time { xsd:decimal }
| element Actual-Total-Time { xsd:decimal }
| element Alias { text }
| element Filter { text }
| element Function-Name { xsd:NCName }
| element Hash-Cond { text }
| element Index-Name { xsd:NCName }
| element Join-Filter { text }
| element Join-Type { xsd:NCName }
| element Merge-Cond { text }
| element Node-Type { text }
| element One-Time-Filter { text }
| element Output { Item+ }
| element Parent-Relationship { xsd:NCName }
| element Plan-Rows { xsd:integer }
| element Plan-Width { xsd:integer }
| element Plans { Plan* }
| element Recheck-Cond { text }
| element Relation-Name { xsd:NCName }
| element Scan-Direction { xsd:NCName }
| element Schema { xsd:NCName }
| element Sort-Key { Item+ }
| element Sort-Method { text }
| element Sort-Space-Type { xsd:NCName }
| element Sort-Space-Used { xsd:integer }
| element Startup-Cost { xsd:decimal }
| element Strategy { xsd:NCName }
| element Subplan-Name { text }
| element Total-Cost { xsd:decimal })*,
element Index-Cond { text }?
}
Item = element Item { text }
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers