Re: [HACKERS] Re: Apparent bug in _make_subplan - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] Re: Apparent bug in _make_subplan
Date
Msg-id 3769E70E.7E1616CF@krs.ru
Whole thread Raw
In response to Re: [HACKERS] Re: Apparent bug in _make_subplan  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Re: Apparent bug in _make_subplan
Re: [HACKERS] Re: Apparent bug in _make_subplan
List pgsql-hackers
Bruce Momjian wrote:
> 
> > subselect.c uses varlevelsup as absolute level number only
> > for correlation vars <--> params mapping, so why should it be
> > source of bugs? SS_replace_correlation_vars replaces all
> > correlation vars with parameters. Vars with absolute varlevelsup
> > are in PlannerParamVar only. To identify correlation vars and
> > to know is parameter already assigned to a var we obviously
> > need in absolute level number.
> 
> But the varlevelsup I pass in from the parser are relative to the
> current level, not absolute.

subselect.c takes it into account, computes absolute numbers
and stores them in PlannerParamVar only...

Vadim


pgsql-hackers by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: RE: [HACKERS] tables > 1 gig
Next
From: Dmitry Samersoff
Date:
Subject: Re: [HACKERS] Installation procedure wishes