I am Srinivas and have been working inside PostgreSQL (mostly in the
optimizer module and few times in the executor module). I would like to
change PostgreSQL code such that it also returns the cost of the optimizer
chosen plan to the Java program (through JDBC) as part of the result set.
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.
If the above is not possible, also please let me know if there is some
other way I could get the cost of the plan in a single call to engine
through Java program.