Re: explain root element for auto-explain

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

On Thu, Aug 20, 2009 at 12:40 PM, Andrew Dunstan<andrew(at)dunslane(dot)net> wrote:
>
>
> Tom Lane wrote:
>>
>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>
>>>
>>> Updated version with more complete information (regression crash was due
>>> to my bad script).
>>>
>>
>> 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? Here's how I mangled the regression tests to
> produce the output that this analysis was taken from:
>
>   perl -spi.bak -e 's/^(insert|update|select|delete|declare|execute|create
> table .* as) /explain (analyse true, verbose true, format xml) $1 /i;' *.sql

CREATE RULE foo_notify AS ON UPDATE TO foo DO ALSO NOTIFY bob;

I am not sure that there's any way to get any other kind of utility
statement in there; I think that's just a safety valve in case someone
changes the rule mechanism and forgets to update EXPLAIN.

...Robert

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2009-08-20 16:55:54 Re: Multi-pass planner
Previous Message Tom Lane 2009-08-20 16:49:19 Re: explain root element for auto-explain