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

From Willy-Bas Loos
Subject Re: return text from explain
Date
Msg-id CAHnozTjpWd+xvdo5vtEweNQGJq6ArLCq56C16jmAkC1cqwuBrQ@mail.gmail.com
Whole thread Raw
In response to Re: return text from explain  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: return text from explain  (Виктор Егоров <vyegorov@gmail.com>)
List pgsql-general
On Thu, Sep 6, 2012 at 10:15 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
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.


nope,
ERROR:  syntax error at or near "explain"

that's postgres 9.1

WBL
--
"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth

pgsql-general by date:

Previous
From: Stuart Bishop
Date:
Subject: Re: pg_dump on hot standby canceled despite hot_standby_feedback=on
Next
From: Виктор Егоров
Date:
Subject: Re: return text from explain