Re: Parsing output of EXPLAIN command in PostgreSQL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Parsing output of EXPLAIN command in PostgreSQL
Дата
Msg-id 17247.1320962369@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Parsing output of EXPLAIN command in PostgreSQL  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Parsing output of EXPLAIN command in PostgreSQL  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 11/10/2011 04:29 PM, Robert Haas wrote:
>> 2011/11/10 ���������� ���������<tasosarvanitis@yahoo.gr>:
>>> Is there any other solution I am not aware of?

>> Not that I know of.  I think pgAdmin can parse the EXPLAIN output,
>> too, but that's in C++.

> Pg--Explain is extremely well written, and should be easily translatable 
> to Java if you really need to. The whole thing is less than 2000 lines, 
> and a large part of that is comments.

Nonetheless, it's solving the wrong problem.  Any program that is being
written today to read EXPLAIN output should be written to read one of
the machine-readable formats.  If you insist on reading the text format,
don't be surprised when (not if) it breaks in future releases, and don't
expect any sympathy from these quarters.

It really shouldn't be that difficult to come by pre-fab code to read
at least one of XML, JSON, or YAML into a suitable data structure.

Now, if you're looking for something that "understands" the resulting
data structure in more than a superficial fashion, that's a different
question.  But you'd need to get a lot more specific about what you
need it to do.
        regards, tom lane


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: const correctness
Следующее
От: Tom Lane
Дата:
Сообщение: Re: LOCK_DEBUG is busted