Re: Using the EXPLAIN results - Mailing list pgsql-general

From Neil Conway
Subject Re: Using the EXPLAIN results
Date
Msg-id 20020524144248.32aaa382.nconway@klamath.dyndns.org
Whole thread Raw
In response to Using the EXPLAIN results  (Braud Agnes <Agnes.Braud@lifo.univ-orleans.fr>)
List pgsql-general
On Fri, 24 May 2002 20:26:39 +0200
"Braud Agnes" <Agnes.Braud@lifo.univ-orleans.fr> wrote:

> Hi
>
> I am using the libpq library, and I would like to get the plan
> returned by the explain command for a given query to decide
> if I execute the query or not. I want to get the time predicted
> by the optimizer for the execution of the query.
> Is it possible to get the plan as a string in a C or C++ program ?

In 7.3, EXPLAIN results are returned as a result set -- so then it
should be easy to use within a program.

Prior to that, you can use PQsetNoticeProcessor().

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

pgsql-general by date:

Previous
From: Braud Agnes
Date:
Subject: Using the EXPLAIN results
Next
From: Neil Conway
Date:
Subject: Re: Question on crypt password