Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Tom Lane
Andrew Dunstan writes: > On 11/10/2011 04:59 PM, Tom Lane wrote: >> 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: The point

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Andrew Dunstan
On 11/10/2011 05:26 PM, Greg Smith wrote: I know some of the earlier versions of XML EXPLAIN included a "DTD" option to output that, but I don't see that in the committed code. I'm not sure where that is at actually; it's a good question. The only reference to doing this I found was Andre

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

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

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Andreas Karlsson
On 2011-11-10 23:42, Andreas Karlsson wrote: Hi, I recommend using the XML, JSON or YAML version of the plan, whichever is easiest in your programming language to parse. I do not think anyone has written a formal schema yet for the XML but it still should be much easier to parse than rolling you

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Andreas Karlsson
On 2011-11-10 17:23, Αναστάσιος Αρβανίτης wrote: Also another option I am considering is to use EXPLAIN [query] FORMAT XML which is available in PostgreSQL 9.1. However, in that case it would better to have the XML Schema of the generated plans available. Is there any other solution I am not aw

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Greg Smith
On 11/10/2011 11:10 AM, Αναστάσιος Αρβανίτης wrote: I'm developing an application that requires parsing of execution plans (those produced as output by issuing an EXPLAIN [query] command). Are you aware of any Java library that I could use for this purpose? I found https://github.com/depesz/Pg--E

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Tom Lane
Andrew Dunstan writes: > On 11/10/2011 04:29 PM, Robert Haas wrote: >> 2011/11/10 ÁíáóôÜóéïò Áñâáíßôçò: >>> 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

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Andrew Dunstan
On 11/10/2011 04:29 PM, Robert Haas wrote: 2011/11/10 Αναστάσιος Αρβανίτης: I'm developing an application that requires parsing of execution plans (those produced as output by issuing an EXPLAIN [query] command). Are you aware of any Java library that I could use for this purpose? I found http

Re: [HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Robert Haas
2011/11/10 Αναστάσιος Αρβανίτης : > I'm developing an application that requires parsing of > execution plans (those produced as output by issuing an EXPLAIN [query] > command). Are you aware of any Java library that I could use for this > purpose? I found https://github.com/depesz/Pg--Explain but i

[HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Αναστάσιος Αρβανίτης
I'm developing an application that requires parsing of execution plans (those produced as output by issuing an EXPLAIN [query] command). Are you aware of any Java library that I could use for this purpose? I found https://github.com/depesz/Pg--Explain but it is built in Perl. Also another opt

[HACKERS] Parsing output of EXPLAIN command in PostgreSQL

2011-11-10 Thread Αναστάσιος Αρβανίτης
I'm developing an application that requires parsing of execution plans (those produced as output by issuing an EXPLAIN [query] command). Are you aware of any Java library that I could use for this purpose? I found https://github.com/depesz/Pg--Explain but it is built in Perl. Also another opt