Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uDmQI-00FoMw-ON for pgsql-general@arkaria.postgresql.org; Sat, 10 May 2025 15:47:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uDmQF-003wMR-3V for pgsql-general@arkaria.postgresql.org; Sat, 10 May 2025 15:47:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uDmQE-003wMI-Nf for pgsql-general@lists.postgresql.org; Sat, 10 May 2025 15:47:30 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uDmQB-0018PD-2o for pgsql-general@postgresql.org; Sat, 10 May 2025 15:47:29 +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 54AFlOSK667604; Sat, 10 May 2025 11:47:24 -0400 From: Tom Lane To: g l cc: "pgsql-general@postgresql.org" Subject: Re: are the 2 if-statements in join_is_legal() removable? In-reply-to: References: Comments: In-reply-to g l message dated "Sat, 10 May 2025 02:14:28 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <667602.1746892044.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 10 May 2025 11:47:24 -0400 Message-ID: <667603.1746892044@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk g l writes: > In join_is_legal(), there are 2 decision-making statements based on matc= h_sjinfo. I wonder wether their conditions can ever test possitive. The code coverage report says yes. https://coverage.postgresql.org/src/backend/optimizer/path/joinrels.c.gcov= .html#350 regards, tom lane