Thread: Explain Nodes

Explain Nodes

From
"David E. Wheeler"
Date:
Hackers,

For my [explanation extension](http://pgxn.org/extension/explanation) I wanted to put together a list of node types,
sinceI'm always having to figure them out to decide which nodes I'm interested in. Reading
src/backend/commands/explain.cI assembled this list: 
   + Aggregate   + Append   + Bitmap Heap Scan   + Bitmap Index Scan   + BitmapAnd   + BitmapOr   + CTE Scan   +
ForeignScan   + Function Scan   + Group   + Hash   + Hash Join   + Index Scan   + Limit   + LockRows   + Materialize
+Merge Append   + Merge Join   + ModifyTable   + Nested Loop   + Recursive Union   + Result   + Seq Scan   + SetOp   +
Sort  + Subquery Scan   + Tid Scan   + Unique   + Values Scan   + WindowAgg   + WorkTable Scan 

Is that accurate? I was looking at how `sname` was set, but maybe it can be set other ways?

Should a list like this be added to the EXPLAIN docs?

Thanks,

David



Re: Explain Nodes

From
Peter Geoghegan
Date:
The code for all nodes is in src/backend/executor.

I think that you will find it useful to look at the big switch
statements in ExecInitNode() and friends in execProcnode.c .

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


Re: Explain Nodes

From
"David E. Wheeler"
Date:
On Apr 28, 2011, at 3:02 PM, Peter Geoghegan wrote:

> The code for all nodes is in src/backend/executor.
>
> I think that you will find it useful to look at the big switch
> statements in ExecInitNode() and friends in execProcnode.c .

Yep, same as what I found in src/backend/commands/explain.c. Thanks. I'll keep using what's in
src/backend/commands/explain.cbecause I'm using the XML format in explanation and so the nodes have human-readable
names.

Best,

David




Re: Explain Nodes

From
Andrew Dunstan
Date:

On 04/28/2011 06:07 PM, David E. Wheeler wrote:
> On Apr 28, 2011, at 3:02 PM, Peter Geoghegan wrote:
>
>> The code for all nodes is in src/backend/executor.
>>
>> I think that you will find it useful to look at the big switch
>> statements in ExecInitNode() and friends in execProcnode.c .
> Yep, same as what I found in src/backend/commands/explain.c. Thanks. I'll keep using what's in
src/backend/commands/explain.cbecause I'm using the XML format in explanation and so the nodes have human-readable
names.
>
>

It's been pointed out before that plugins (like FDWs) can invent their 
own explain nodes, so we'll never have a canonical list of such nodes.

cheers

andrew


Re: Explain Nodes

From
"David E. Wheeler"
Date:
On Apr 28, 2011, at 3:40 PM, Andrew Dunstan wrote:

> It's been pointed out before that plugins (like FDWs) can invent their own explain nodes, so we'll never have a
canonicallist of such nodes. 

Oh, interesting. Stil, a list of core nodes is a good 90% solution, IMHO.

Best,

David