Re: explain.c: why trace PlanState and Plan trees separately?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yeb Havinga <yebhavinga@gmail.com>
Cc: pgsql-hackers@postgreSQL.org
Date: 2010-07-13T18:14:25Z
Lists: pgsql-hackers
Attachments
- explain-params-1.patch (text/x-patch) patch
Yeb Havinga <yebhavinga@gmail.com> writes:
> Will the new referenced expression printing also be used when printing
> subplans?
> If yes, I do not have to submit the latest version of a patch I made for
> subplan argument printing (discussed earlier in this thread
> http://archives.postgresql.org/pgsql-hackers/2010-02/msg01602.php)
Oh, I had forgotten that patch was still in progress. I think it's
unnecessary given what I'm fooling with. The attached patch needs
some more testing, but what I get with it is for example
regression=# explain (verbose) select (select oid from pg_class a where
regression(# a.oid = b.relfilenode) from pg_class b;
QUERY PLAN
--------------------------------------------------------------------------------------------------------
Seq Scan on pg_catalog.pg_class b (cost=0.00..5556.81 rows=669 width=4)
Output: (SubPlan 1)
SubPlan 1
-> Index Scan using pg_class_oid_index on pg_catalog.pg_class a (cost=0.00..8.27 rows=1 width=4)
Output: a.oid
Index Cond: (a.oid = b.relfilenode)
(6 rows)
(this is the first example in the above-referenced thread).
regards, tom lane