pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: Alexander Pyhalov <a.pyhalov@postgrespro.ru>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: foreign join error "variable not found in subplan target list"
Date: Mon, 29 Aug 2022 22:04:39 -0400
Message-ID: <3481973.1661825079@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMbWs4_8WjxO1XUN+PsW1ukfSrVfOrCHS5rbJM6dr0qPhBogkg@mail.gmail.com>
References: <cfb17bf6dfdf876467bd5ef533852d18@postgrespro.ru>
	<CAPmGK16mosKq6h=TbQP8wKJu4HFdCBjrxAV+TLYfovuNmfNhHA@mail.gmail.com>
	<CAMbWs4_k4yFmOJ+U-Ap7BvQTbdUYhKmVchV=yJFHdtw_10nQZg@mail.gmail.com>
	<fcc74118ee33ca5e213fa855ba70ff22@postgrespro.ru>
	<CAMbWs4_xn7drbNBDSLKGD7nDLxM3aMOSTXz6CbWugPJ-7JzZbg@mail.gmail.com>
	<CAMbWs49bW4i06Daf8eb1+tsbJVymA4U-3v6rRoNvqKaJSm459Q@mail.gmail.com>
	<CAPmGK15Ay2BPYzyyCowP8bpNBDucnpLDGoMLEHvp2b7Z4EtZDA@mail.gmail.com>
	<CAMbWs4-8Sm25gQMqA71e0J1Zpx7Cgr8odYV_0u-i24mfFVxyJw@mail.gmail.com>
	<CAPmGK15Z3G-MLSqmS5sz=X7=g3DzReWiRwprc4UW-kTDw6oOZg@mail.gmail.com>
	<CAMbWs4-c8yC-4bfWt0HPgocUNwg7f_ZMSMYgMjm6bSV=PDNX8Q@mail.gmail.com>
	<CAMbWs4_8WjxO1XUN+PsW1ukfSrVfOrCHS5rbJM6dr0qPhBogkg@mail.gmail.com>

Richard Guo <guofenglinux@gmail.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





view thread (23+ messages)  latest in thread

Message-ID: <3481973.1661825079@sss.pgh.pa.us>
Permalink:  ../3481973.1661825079@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3481973.1661825079@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, guofenglinux@gmail.com, etsuro.fujita@gmail.com, a.pyhalov@postgrespro.ru, pgsql-bugs@lists.postgresql.org
  Subject: Re: foreign join error "variable not found in subplan target list"
  In-Reply-To: <3481973.1661825079@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox