Explain Nodes
Hackers,
For my [explanation extension](http://pgxn.org/extension/explanation) I wanted to put together a list of node types, since I'm always having to figure them out to decide which nodes I'm interested in. Reading src/backend/commands/explain.c I assembled this list:
+ Aggregate
+ Append
+ Bitmap Heap Scan
+ Bitmap Index Scan
+ BitmapAnd
+ BitmapOr
+ CTE Scan
+ Foreign Scan
+ 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
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
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.c because I'm using the XML format in explanation and so the nodes have human-readable names.
Best,
David
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.c because 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