Re: explain.c: why trace PlanState and Plan trees separately?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yeb Havinga <yebhavinga(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: explain.c: why trace PlanState and Plan trees separately?
Date: 2010-07-13 14:10:03
Message-ID: 27963.1279030203@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yeb Havinga <yebhavinga(at)gmail(dot)com> writes:
> Tom Lane wrote:
>> The reason I'm on about this at the moment is that I think I see how to
>> get ruleutils to print PARAM_EXEC Params as the referenced expression
>> rather than $N ...

> Wouldn't this obfuscate the plan more than printing subplan arguments at
> the call site?

It would if subplans could have more than one call site, but they can't.

I do intend to force qualification of Vars that are printed as a result
of param expansion; for example consider a standard nestloop-with-
inner-indexscan plan:

NestLoop
Seq Scan on a
Index Scan on b
Index Cond: x = a.y

If y weren't qualified to show that it's not a variable of b, this could
be confusing. But as long as we do that, it pretty much matches our
historical behavior. Note that CVS HEAD is printing this case as

NestLoop
Seq Scan on a
Index Scan on b
Index Cond: x = $0

which is definitely not very helpful.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2010-07-13 14:15:00 Last call for patches for the July CommitFest
Previous Message Andrew Dunstan 2010-07-13 13:29:16 Re: dblink regression failure in HEAD