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 1pQ9HF-00074F-Kw for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Feb 2023 15:56:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pQ9HE-0000MH-H6 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Feb 2023 15:56:00 +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 1pQ9HE-0000M8-7w for pgsql-hackers@lists.postgresql.org; Thu, 09 Feb 2023 15:56:00 +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 1pQ9HC-0003hl-3t for pgsql-hackers@postgresql.org; Thu, 09 Feb 2023 15:55:59 +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 319FtuLO3907974; Thu, 9 Feb 2023 10:55:56 -0500 From: Tom Lane To: Richard Guo cc: PostgreSQL-development Subject: Re: Inconsistent nullingrels due to oversight in deconstruct_distribute_oj_quals In-reply-to: References: Comments: In-reply-to Richard Guo message dated "Thu, 09 Feb 2023 17:16:15 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3907972.1675958156.1@sss.pgh.pa.us> Date: Thu, 09 Feb 2023 10:55:56 -0500 Message-ID: <3907973.1675958156@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Richard Guo writes: > It seems to me there is oversight here. Actually in next level up this > othersj would null all the relids in its syn_righthand, not only the > relids in its min_righthand. Good point. I think this code originated before it was clear to me that nullingrels would need to follow the syntactic structure. > This query would trigger the Assert() in search_indexed_tlist_for_var. > So I wonder that we should use othersj->syn_righthand here. There are two such calls in deconstruct_distribute_oj_quals ... don't they both need this change? regards, tom lane