Re: LATERAL

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, David Fetter <david(at)fetter(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: LATERAL
Date: 2010-02-19 03:34:37
Message-ID: 201002190334.o1J3YbX03486@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> On Sat, Dec 19, 2009 at 11:01 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > On Sat, Dec 19, 2009 at 4:46 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> >>> On Sat, Dec 19, 2009 at 3:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >>>> I believe the correct approach is probably to treat values that need to
> >>>> be propagated into the inner side as executor parameters. ?This could
> >>>> replace the existing, rather crocky, management of values passed into a
> >>>> nestloop inner indexscan.
> >>
> >>> What is the best place to look for the existing, rather crocky code?
> >>
> >> Follow the second argument of ExecReScan from nodeNestloop to
> >> nodeIndexscan.
> >
> > Yeah, this is grotty. ?It appears that the comment introducing
> > ExecReScan() is somewhat incorrect. ?It asserts that exprCtxt is used
> > only
>
> Sigh.
>
> ...is used only for index scans. However, it's actually also used for
> bitmap scans (both heap and index) and TID scans. Also, there appears
> to be an effort by nodes that don't use exprCtxt directly to propagate
> down through the node tree, which doesn't seem to make much sense if
> this is only intended to be used on the inner side of a nestloop.

Does some comment need to be updated?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2010-02-19 03:44:50 Re: SR: "pseudo replication database of the primary" ...
Previous Message David Fetter 2010-02-19 02:40:30 Re: PGXS: REGRESS_OPTS=--load-language=plpgsql