Re: return text from explain - Mailing list pgsql-general

From Tom Lane
Subject Re: return text from explain
Date
Msg-id 25908.1346962502@sss.pgh.pa.us
Whole thread Raw
In response to Re: return text from explain  (Bruce Momjian <bruce@momjian.us>)
Responses Re: return text from explain
List pgsql-general
Bruce Momjian <bruce@momjian.us> writes:
> On Thu, Sep  6, 2012 at 07:18:50PM +0200, Willy-Bas Loos wrote:
>> Is it possible to use the output of explain as text values?

> I think you have to do EXPLAIN in a function and call the function.

Yeah, IIRC you can use EXPLAIN as the source statement in a plpgsql
FOR loop, ie
    FOR text_variable IN EXPLAIN ... LOOP
which gets you the output one line at a time.

            regards, tom lane


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: pivot functions with variable number of columns
Next
From: Kobus Wolvaardt
Date:
Subject: pg_dump slow on windows