Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxyjp-0008Lu-SH for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Apr 2017 16:33:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cxyjp-0003L1-Fc for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Apr 2017 16:33:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cxyiK-0000go-TF for pgsql-hackers@postgresql.org; Tue, 11 Apr 2017 16:32:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cxyiI-0006Vi-Ag for pgsql-hackers@postgresql.org; Tue, 11 Apr 2017 16:32:19 +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 v3BGWCt0015198; Tue, 11 Apr 2017 12:32:12 -0400 From: Tom Lane To: Ashutosh Bapat cc: Andreas Seltenreich , pgsql-hackers Subject: Re: [sqlsmith] ERROR: badly formatted node string "RESTRICTINFO... In-reply-to: References: <87tw5x4vcu.fsf@credativ.de> <11668.1491753112@sss.pgh.pa.us> <9631.1491863013@sss.pgh.pa.us> <7025.1491921708@sss.pgh.pa.us> Comments: In-reply-to Ashutosh Bapat message dated "Tue, 11 Apr 2017 21:48:38 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15196.1491928332.1@sss.pgh.pa.us> Date: Tue, 11 Apr 2017 12:32:12 -0400 Message-ID: <15197.1491928332@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Ashutosh Bapat writes: > On Tue, Apr 11, 2017 at 8:11 PM, Tom Lane wrote: >> OK. I was trying to be noninvasive, but this does look more sensible. >> I think this might read better if we inverted the test (so that >> the outer-join-joinclause-must-be-pushable case would come first). > Ok. In fact, thinking more about it, we should probably test > JOIN_INNER explicitly instead of !IS_OUTER_JOIN() since SEMI_JOINS are > not considered as outer joins and I am not sure how would we be > treating the quals for those. No, that's correct as-is --- or at least, if it's not correct, there are a bunch of other places that are also not correct. Thinking about this further, though, it seems like a more straightforward solution to the original problem is to not store quals in a Plan's fdw_private list in the first place. Putting them there is at best useless overhead that the finished plan will have to drag around; and it's not terribly hard to imagine future changes that would make having never-processed-by-setrefs.c qual trees in a plan be broken in other ways. Can't we use a field in the rel's PgFdwRelationInfo to carry the remote_exprs forward from postgresGetForeignPlan to postgresPlanDirectModify? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers