Re: explain root element for auto-explain

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: explain root element for auto-explain
Date: 2009-08-20 16:49:19
Message-ID: 16022.1250786959@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Tom Lane wrote:
>> I took a look through the source code to match it against this. I found
>> that you missed a couple of possibilities: we have <Notify /> and
>> <Utility-Statement /> as alternatives to <Query> just below <explain>.

> What causes those to happen?

You can get a <Notify> via explaining a command that's been affected
by a rule like
CREATE RULE foo ... DO ALSO NOTIFY foo;

I think the <Utility-Statement> case is not actually reachable code at
present. NOTIFY is the only utility command that's allowed in CREATE
RULE, and auto-explain is hooked in in a place where it can't see
utility statements at all. I suppose we could make EXPLAIN throw error
there, instead of printing a node type we'd have to document.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-08-20 16:49:33 Re: explain root element for auto-explain
Previous Message Andrew Dunstan 2009-08-20 16:40:53 Re: explain root element for auto-explain