Re: foreign join error "variable not found in subplan target list"

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
Cc: Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: foreign join error "variable not found in subplan target list"
Date: 2022-09-13 02:28:42
Message-ID: CAMbWs49+6WV5VLuZVeW4SJazbZ9nOU3OyD_XMS1MO4cQtCvY4A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Sep 12, 2022 at 12:19 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
wrote:

> On Wed, Aug 31, 2022 at 6:52 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
> wrote:
> > On Wed, Aug 31, 2022 at 6:27 PM Richard Guo <guofenglinux(at)gmail(dot)com>
> wrote:
> > > Hmm, yes, the EPQ path does not need to compete with others in
> add_path,
> > > so its cost does not matter too much. And the comment just above
> > > GetExistingLocalJoinPath says:
> > >
> > > * Since the plan created using this path will presumably only be used
> to
> > > * execute EPQ checks, efficiency of the path is not a concern.
> > >
> > > But still I feel it's not a good practice to not update the cost and
> > > width fields after calling add_new_columns_to_pathtarget(). How about
> we
> > > add some comments here explaining why we do not need to adjust the
> > > estimates for the EPQ path?
> >
> > I agree with you on that point. I’ll update the patch as such in the
> > next version.
>
> Here is an updated patch for that. Other changes:
>
> * I modified the patch so that we adjust the tlist of the EPQ path if
> necessary, using the idea discussed upthread.
> * I tweaked other comments a little bit.

+1. The new patch looks good to me.

Thanks
Richard

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-09-13 03:47:44 Re: BUG #17611: SJIS conversion rule about duplicated characters differ from Windows
Previous Message yanliang lei 2022-09-12 15:17:46 Re:Re: BUG #17613: in the postgresql 15beta4,there are lack of many extensions