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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>, 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-08-30 02:04:39
Message-ID: 3481973.1661825079@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> To be concrete, I mean something like this:

> + /* Update the cost and width fields if we have added any
> new columns. */
> + if (!equal(epq_path->pathtarget->exprs, target->exprs))
> + set_pathtarget_cost_width(root, target);

Wouldn't a list_length() comparison be sufficient? equal() seems
like overkill.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-08-30 02:17:50 Re: BUG #17601: Problem running the post-install step. Installation may not complete correctly.
Previous Message Richard Guo 2022-08-30 01:18:54 Re: foreign join error "variable not found in subplan target list"