Re: EXPLAIN via jdbc - Mailing list pgsql-jdbc

From Jochem van Dieten
Subject Re: EXPLAIN via jdbc
Date
Msg-id 3D526F00.1010908@oli.tudelft.nl
Whole thread Raw
In response to EXPLAIN via jdbc  ("Michael Paesold" <mpaesold@gmx.at>)
Responses Re: EXPLAIN via jdbc  (Dave Cramer <Dave@micro-automation.net>)
List pgsql-jdbc
Michael Paesold wrote:
> Hi,
>
> we are currently evaluating postgres for a commercial project. To get a clue
> about how well the jdbc driver works for us, I wrote a simple java app that
> can display query results.
> Then I tried to add EXPLAIN support to it, so I could see the result of
> EXPLAIN SELECT * ... simultaniously. That is when I got stuck.
>
> I can't find a way to get the result from EXPLAIN queries through jdbc. I
> first tried to do it by executeQuery("EXPLAIN ..."), but that would not
> return a result set. Also using execute() helped, not even getWarnings()
> helped..
>
> I there any way to get the result from an EXPLAIN query?

If I read the development documentation correctly, the next version of
PostgreSQL will return EXPLAIN output as a recordset instead of a NOTICE.

HTH,
Jochem


pgsql-jdbc by date:

Previous
From: Daniel.Stoinski@nagler-company.com
Date:
Subject: PL/pgSQL and JDBC, Relation 'Number' does not exist
Next
From: "Michael Paesold"
Date:
Subject: Re: EXPLAIN via jdbc