Re: explain and PARAM_EXEC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: explain and PARAM_EXEC
Date: 2010-02-20 04:58:28
Message-ID: 19557.1266641908@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Feb 19, 2010 at 11:33 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> We can also fetch that tuple's
>> relfilenode and pass it to the subplan, which we do by setting the $0
>> Param value before invoking the subplan.

> Are the same tuples in scope when evaluating the expression that sets
> $0 as were in scope when evaluating ((b.oid)::integer + 1)?

Yes, exactly the same. The parameter-value expression is just like any
other scalar expression that could appear where the SubPlan reference
is. It doesn't know anything about the subplan, really.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shane Ambler 2010-02-20 10:28:09 Re: alpha4 bundled -- please verify
Previous Message Robert Haas 2010-02-20 04:49:21 Re: explain and PARAM_EXEC