Re: explain root element for auto-explain - Mailing list pgsql-hackers

From Tom Lane
Subject Re: explain root element for auto-explain
Date
Msg-id 16022.1250786959@sss.pgh.pa.us
Whole thread Raw
In response to Re: explain root element for auto-explain  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.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 likeCREATE 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


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: explain root element for auto-explain
Next
From: Robert Haas
Date:
Subject: Re: explain root element for auto-explain