Stephen Frost <sfr...@snowman.net> writes:
> * Stephen Frost (sfr...@snowman.net) wrote:
>> Would be nice if there was a CTE ID or similar to link between
>> the pieces of the InitPlan and the CTE nodes.

> Erm, of course, the CTE *has* an ID already, since you name them.  Could
> we get that ID/name up into the piece of the InitPlan that is handling
> that CTE?

I'm not sure but will be glad to take a look.  Assuming it's not
unreasonably difficult, does anyone object to a format like this:

 Nested Loop  (cost=1266.59..1001458.19 rows=35936310 width=52)
   InitPlan
     CTE abc
       ->  Seq Scan on foo  (cost=0.00..34.25 rows=647 width=12)
             Filter: (id < 200)
     CTE wumpus
       ->  Seq Scan on tab1  (cost=0.00..27.70 rows=1770 width=16)
   ->  CTE Scan on abc x  (cost=0.00..35.40 rows=1770 width=16)
   ->  Materialize  (cost=1204.64..1566.67 rows=20303 width=36)
         ->  Hash Join  (cost=42.05..1025.34 rows=20303 width=36)
   ...

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to