Re: Parsing output of EXPLAIN command in PostgreSQL - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Parsing output of EXPLAIN command in PostgreSQL
Date
Msg-id 4EBC5CD5.2050109@dunslane.net
Whole thread Raw
In response to Re: Parsing output of EXPLAIN command in PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Parsing output of EXPLAIN command in PostgreSQL
List pgsql-hackers

On 11/10/2011 04:59 PM, Tom Lane wrote:
> Andrew Dunstan<andrew@dunslane.net>  writes:
>
>> 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.
>             


Umm, it *does* handle all the formats:
   $ wc -l ../Pg--Explain/lib/Pg/Explain.pm ../Pg--Explain/lib/Pg/Explain/*      248 ../Pg--Explain/lib/Pg/Explain.pm
   75 ../Pg--Explain/lib/Pg/Explain/FromJSON.pm      182 ../Pg--Explain/lib/Pg/Explain/From.pm      202
../Pg--Explain/lib/Pg/Explain/FromText.pm     109 ../Pg--Explain/lib/Pg/Explain/FromXML.pm       77
../Pg--Explain/lib/Pg/Explain/FromYAML.pm     785 ../Pg--Explain/lib/Pg/Explain/Node.pm      292
../Pg--Explain/lib/Pg/Explain/StringAnonymizer.pm    1970 total
 


One of the obvious reasons for handling text is to deal with old servers 
before we had machine readable output.

cheers

andrew


pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: proposal : backend startup hook / after logon trigger
Next
From: Andrew Dunstan
Date:
Subject: Re: Parsing output of EXPLAIN command in PostgreSQL