Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLfni-0005YV-OR for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Aug 2022 07:06:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oLfng-0007WI-IY for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Aug 2022 07:06:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLfng-0007W9-5M for pgsql-bugs@lists.postgresql.org; Wed, 10 Aug 2022 07:06:44 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oLfnY-0003jj-IJ for pgsql-bugs@lists.postgresql.org; Wed, 10 Aug 2022 07:06:43 +0000 Received: from mail.postgrespro.ru (cyclops.postgrespro.ru [93.174.131.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 28E9321C5815; Wed, 10 Aug 2022 10:06:35 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1660115195; bh=H+/0Q+7Q1ihHPhf6w6taukKf+47TbHnbccqrjQCxs9M=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Wn9JPkapDqoZ3mfPcgyNvhOQ3qPpKxtSA6wfKKksbWTNQdbchWREWAeWRYJpZvPnB ZrodZ9AjNCJRwkQme1D8wJdiN03WgH1zt4L3vBjpGg6hg/Wvbniq6LFBzpMSr7EkKP UUyOVzMoz+Vk9cLJ1HhP39mDiMxCTa+UenOL9EiI= MIME-Version: 1.0 Date: Wed, 10 Aug 2022 10:06:35 +0300 From: Alexander Pyhalov To: Richard Guo Cc: Etsuro Fujita , PostgreSQL mailing lists Subject: Re: foreign join error "variable not found in subplan target list" In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.11 Message-ID: <80d1b0827ea8643e0163cd06b384b9d4@postgrespro.ru> X-Sender: a.pyhalov@postgrespro.ru Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Richard Guo писал 2022-08-10 08:28: > On Wed, Aug 10, 2022 at 10:15 AM Richard Guo > wrote: > >> Currently the outer_plan used in postgresGetForeignPlan() can only >> be >> 'Join' or 'Sort + Join'. I'm wondering whether we can take this >> knowledge into consideration when we fix the outer_plan's tlist, to >> also >> fix the Join's tlist if it is below the Sort node. > > Alternatively, how about we include in the EPQ path's pathtarget > thecolumns required for evaluating the local conditions when we > consider > EPQ paths with pathkeys? Something like attached. > > Thanks > Richard Hi. Why are we sure that epq_path can provide all vars from restrictinfo? -- Best regards, Alexander Pyhalov, Postgres Professional