Re: explain and PARAM_EXEC

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

On Fri, Feb 19, 2010 at 11:58 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.

OK, thanks for the explanation. That makes more sense now. I've got
to go study this some more before I ask my next question...

...Robert

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-02-20 13:10:03 Re: explain and PARAM_EXEC
Previous Message Greg Stark 2010-02-20 12:53:04 Re: explain and PARAM_EXEC