From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Geoghegan <pg(at)heroku(dot)com> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: More WITH |
Date: | 2015-08-17 17:41:06 |
Message-ID: | 26180.1439833266@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Geoghegan <pg(at)heroku(dot)com> writes:
> On Mon, Aug 17, 2015 at 10:22 AM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>> Would be tricky. We don't currently have any way to wrap an EXPLAIN in
>> any larger statement, do we? Would be very useful for automated query
>> analysis, though.
> No. In the grammar, ExplainStmt expects the EXPLAIN to be at the
> top-level. Having it work any other way would require significant
> refactoring.
You can use EXPLAIN as the source of rows in a plpgsql FOR-over-query
loop, so there's a workaround available that way when you need to read
EXPLAIN output programmatically. I'm not convinced there's sufficient
value in trying to make EXPLAIN a full-fledged subquery otherwise.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2015-08-17 17:44:14 | Re: More WITH |
Previous Message | Andres Freund | 2015-08-17 17:40:20 | Re: Configure with thread sanitizer fails the thread test |