Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNhJ7-0008Ab-JK for pgsql-bugs@arkaria.postgresql.org; Thu, 14 Jul 2016 14:08:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bNhJ7-0006lv-6g for pgsql-bugs@arkaria.postgresql.org; Thu, 14 Jul 2016 14:08:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bNhJ6-0006lR-CL for pgsql-bugs@postgresql.org; Thu, 14 Jul 2016 14:08:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bNhJ2-0005qC-W5 for pgsql-bugs@postgresql.org; Thu, 14 Jul 2016 14:08:03 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u6EE7uL8001217; Thu, 14 Jul 2016 10:07:56 -0400 From: Tom Lane To: wayne.warren@multiscalehn.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14249: In FDW, variable not found in subplan target list In-reply-to: <20160714132744.1416.84821@wrigleys.postgresql.org> References: <20160714132744.1416.84821@wrigleys.postgresql.org> Comments: In-reply-to wayne.warren@multiscalehn.com message dated "Thu, 14 Jul 2016 13:27:44 -0000" Date: Thu, 14 Jul 2016 10:07:56 -0400 Message-ID: <1216.1468505276@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org wayne.warren@multiscalehn.com writes: > I have written a foreign data wrapper that works with version 9.5.2. Now > with 9.6beta2 I receive "ERROR: variable not found in subplan target list" > when I refer to a column in the WHERE clause that is not also listed as a > target column: > mydb=# select record_id, addr_chg_user_id from si_ept_470 > where addr_chg_instant='5441342125'; > ERROR: variable not found in subplan target list No such misbehavior is visible in file_fdw or postgres_fdw, so presumably your FDW is doing something wrong. There's not enough information here to say what; though a likely guess is that you're building a custom fdw_scan_tlist and forgetting to include Vars from restriction clauses in it. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs