Re: Changing the result set to contain the cost of the optimizer's chosen plan - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Changing the result set to contain the cost of the optimizer's chosen plan
Date
Msg-id 8421.1468250946@sss.pgh.pa.us
Whole thread Raw
In response to Changing the result set to contain the cost of the optimizer's chosen plan  (Srinivas Karthik V <skarthikv.iitb@gmail.com>)
Responses Re: Changing the result set to contain the cost of the optimizer's chosen plan  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
Srinivas Karthik V <skarthikv.iitb@gmail.com> writes:
> Specifically, I have a Java program which calls
> ResultSet rs = statement.executeQuery("explain select * from table");
> I would like to change PostgreSQL such that ResultSet rs should contain a
> field that contains also the cost of the optimizer chosen plan.

Why do you need to change anything?  The cost is right there in the
first line of the result text.  It might be easier to parse out if
you use one of EXPLAIN's intended-to-be-machine-readable output
formats, though.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [CF2016-9] Allow spaces in working path on tap-tests
Next
From: Stephen Frost
Date:
Subject: Re: Showing parallel status in \df+