Re: Explain - Mailing list pgsql-general

From Tom Lane
Subject Re: Explain
Date
Msg-id 10245.978713004@sss.pgh.pa.us
Whole thread Raw
In response to Explain  (Jeff Davis <jdavis@wasabimg.com>)
List pgsql-general
Jeff Davis <jdavis@wasabimg.com> writes:
> How can I conveniently handle output from an EXPLAIN query inside an
> application? It appears to just immediately send the output to the stdout of
> whatever program uses it. Is there a way to get the output inside a program,
> with libpq or otherwise?

The EXPLAIN result is sent as a NOTICE message, so you can trap it by
setting libpq's notice processor function --- see PQsetNoticeProcessor.

            regards, tom lane

pgsql-general by date:

Previous
From: nelson@radix.com.br
Date:
Subject: Re: Max connections
Next
From: Tom Lane
Date:
Subject: Re: select distinct null