From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bernd Helmle <mailings(at)oopsware(dot)de>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>, Josh Berkus <josh(at)agliodbs(dot)com> |
Subject: | Re: machine-readable explain output |
Date: | 2009-06-13 23:23:40 |
Message-ID: | 603c8f070906131623l5394f7bdv3ef8cc619bb319dc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Jun 13, 2009 at 6:40 PM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Bernd Helmle <mailings(at)oopsware(dot)de> writes:
>> --On 13. Juni 2009 15:01:43 -0400 Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>>> Also, the result type of an EXPLAIN (format xml) should be type xml, not
>>>> text.
>>>
>>> Seems reasonable. I'll see if I can figure out how to do that.
>
>> I suppose it's okay then, that the format is not available when the server
>> isn't build with --with-libxml ?
>
> I believe we have things set up so that you can still print "xml" data
> without libxml configured in. We'd need to be sure casting to text
> works too, but other than that I don't see an issue here.
Hmm, I just tried to do this by modifying ExplainResultDesc to use
XMLOID rather than TEXTOID when stmt->format == EXPLAIN_FORMAT_XML,
and sure enough, explain (format xml) ... fails when --with-libxml is
not specified. But maybe that's not the right way to do it - now that
I think about it, using that in combination with
do_text_output_multiline() seems totally wrong even if we end up
deciding not to worry about the output type, since while there are
multiple rows when the output is considered as text, there is surely
only one row when you look at the whole thing as an XML document. I'm
not too sure how to do this though. Help?
In any event, considering that EXPLAIN is a utility statement and
can't be embedded within a query, I'm not sure what benefit we get out
of returning the data as XML rather than text. This doesn't seem
likely to change either, based on Tom's comments here.
http://archives.postgresql.org/pgsql-hackers/2009-05/msg00969.php
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-06-13 23:42:42 | Re: machine-readable explain output |
Previous Message | Tom Lane | 2009-06-13 22:40:56 | Re: machine-readable explain output |