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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to