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 1pXkq7-0005rc-9G for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Mar 2023 15:27:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pXkq5-0001fF-3d for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Mar 2023 15:27:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXkq4-0001f6-Rf for pgsql-bugs@lists.postgresql.org; Thu, 02 Mar 2023 15:27:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXkq0-0002Ql-Nc for pgsql-bugs@lists.postgresql.org; Thu, 02 Mar 2023 15:27:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 322FRIxo1903667; Thu, 2 Mar 2023 10:27:18 -0500 From: Tom Lane To: Richard Guo cc: Andrey Lepikhov , PostgreSQL mailing lists Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware) In-reply-to: References: <0b819232-4b50-f245-1c7d-c8c61bf41827@postgrespro.ru> <402433.1677524538@sss.pgh.pa.us> <2663884e-769a-b298-55b0-014c5a1ee55c@postgrespro.ru> <524303.1677538463@sss.pgh.pa.us> <999171.1677611407@sss.pgh.pa.us> Comments: In-reply-to Richard Guo message dated "Thu, 02 Mar 2023 17:57:35 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1903665.1677770838.1@sss.pgh.pa.us> Date: Thu, 02 Mar 2023 10:27:18 -0500 Message-ID: <1903666.1677770838@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Richard Guo writes: > Hmm. Doing this complicates matters even more. Maybe we can just loosen > the cross-check for nullingrels to cope with this change by using > NRM_SUBSET matches for joinquals (including mergeclauses, hashclauses > and hashkeys) in set_join_references()? That would be sad ... it'd basically be conceding defeat at the task of knowing that we've accurately placed joinquals, which is one of the most fundamental things I wanted to get out of this rewrite. I might accept weakening those assertions as a stopgap that we plan to work on more later, except that I'm afraid that this is telling us there are still bugs in the area. What's feeling like it might be the best thing is to go ahead and syntactically convert to the second form of identity 3 as soon as we've determined it's applicable, so that upper C Vars are always marked with both OJ relids. Not sure how much work is involved there. regards, tom lane