Re: machine-readable explain output v2 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: machine-readable explain output v2
Date
Msg-id 200907190429.42448.andres@anarazel.de
Whole thread Raw
In response to machine-readable explain output v2  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: machine-readable explain output v2  (Andres Freund <andres@anarazel.de>)
Re: machine-readable explain output v2  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi Robert, Hi all,

explain_format_infrastructure-v2.patch:
Applies cleanly, code changes look sensible, no behaviour changes.

explain_format-v2.patch
Applies after trivial conflicts (updated version attached). Once more the code 
changes look sensible to me, except maybe that I don't like the codeflow at 
some parts. That's partially related due to having to generate xml/json output 
by hand...

One part where I find the code flow ugly is 'did_boilerplate' in 
report_triggers/its callsites.
I can see why it is done that way, but its not exactly obvious to read when 
you want to find out how the format looks.

Another, minor, issue is that the patch changes the FORMAT TEXT/default output 
if VERBOSE is specified (schema is added). I don't see that as a real problem 
because the format for VERBOSE is new anyway, but I thought I would mention 
it.

XML Format:
As discussed previously I would like the format to look a bit different - but 
everyone wants it to look different anyway, so I think its ok as one of 
multiple possible lowest common determinators... With the big advantage of 
already being implemented.

I think it would be nice in the future to add some sort of 
'category={planner,timing,..}' attribute, but I think that should be 
discussed/implemented separately.

Documentation:
I think it would be nice to add some more documentation about the xml format 
for application writers, but I think this should be a separate patch anyway.

I did not yet look at the contrib/autoexplain portions. Will do that on Monday 
or so.


Andres

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: explain refactoring v4 - RR Review
Next
From: Tom Lane
Date:
Subject: Re: Using results from INSERT ... RETURNING