Re: machine-readable explain output

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: machine-readable explain output
Дата
Msg-id 603c8f070906131623l5394f7bdv3ef8cc619bb319dc@mail.gmail.com
обсуждение исходный текст
Ответ на Re: machine-readable explain output  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: machine-readable explain output  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: machine-readable explain output  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, Jun 13, 2009 at 6:40 PM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
> Bernd Helmle <mailings@oopsware.de> writes:
>> --On 13. Juni 2009 15:01:43 -0400 Robert Haas <robertmhaas@gmail.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: machine-readable explain output
Следующее
От: Tom Lane
Дата:
Сообщение: Re: machine-readable explain output