Re: machine-readable explain output v4 - Mailing list pgsql-hackers
From | Andrew Dunstan |
---|---|
Subject | Re: machine-readable explain output v4 |
Date | |
Msg-id | 4A82DBA8.7020603@dunslane.net Whole thread Raw |
In response to | Re: machine-readable explain output v4 (Csaba Nagy <nagy@ecircle-ag.com>) |
Responses |
Re: machine-readable explain output v4
|
List | pgsql-hackers |
Csaba Nagy wrote: > On Wed, 2009-08-12 at 15:42 +0200, Andrew Dunstan wrote: > >> Have you actually looked at a logfile with this in it? A simple >> stylesheet won't do at all. What you get is not an XML document but a >> text document with little bits of XML embedded in it. So you would need >> a program to parse that file and either turn it into a single legal XML >> document or pass each piece of XML individually to your XSLT processor. >> Bleah. >> > > I'm pretty sure you will never find a human readable format which is > easily extracted from the logs by a program. But if you format the XML > in a (very human unreadable) one-line-without-breaks format then it will > be a lot easier extracted by a program and formatted at your will. > That will just make things worse. And it will break if the XML includes any expression that contains a line break. > >> And all this because you pose a false dichotomy between correctness and >> completeness on one hand and human readability on the other. I don't >> accept that at all. I think we can and should improve human readability >> without sacrificing anything on the correctness and completeness front. >> In fact, that also needs improving, and we can do them both at the same >> time. >> > > I really really doubt that. I would go here on the UNIX approach of > piping the things through the right tools, each one doing a simple and > good job for it's single and well defined purpose. So let the explain > spit out a line of XML without much thought about formatting but > focusing on completeness, making it easy for tools to get that line, and > then let the tools do the formatting depending on what you want to do > with the information. Each part will be simpler than you would put in a > directly human readable XML (if that's possible at all) approach, which > will anyway not cover all the uses and tastes. > I think we're going to have to agree to disagree on this. I think you're going in precisely the wrong direction. I repeat, I want to be able to have a log file that is both machine processable and not utterly unreadable by a human. And I do not accept at all that this is impossible. Nor do I accept I should need some extra processing tool to read the machine processable output without suffering brain damage. If we were to adopt your approach I bet you would find that nobody in their right mind would use the machine readable formats. I sure wouldn't. cheers andrew
pgsql-hackers by date: