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.96) (envelope-from ) id 1x1QWl-005Bdq-34 for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Sep 2026 15:35:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x1QWk-006wgZ-2p for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Sep 2026 15:35:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x1QWk-006wg3-1s for pgsql-hackers@lists.postgresql.org; Tue, 01 Sep 2026 15:35:58 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x1QWe-00000002OIj-3LoG for pgsql-hackers@lists.postgresql.org; Tue, 01 Sep 2026 15:35:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 681FZjNx1183643; Tue, 1 Sep 2026 11:35:45 -0400 From: Tom Lane To: Richard Guo cc: Tender Wang , Thom Brown , Jacob Brazeal , pgsql-hackers@lists.postgresql.org Subject: Re: remove_useless_joins vs. bug #19560 In-reply-to: References: <1186816.1784573544@sss.pgh.pa.us> <2727652.1784997994@sss.pgh.pa.us> <2746010.1785014587@sss.pgh.pa.us> <2933135.1785032128@sss.pgh.pa.us> <3304318.1785087206@sss.pgh.pa.us> <3304418.1785087314@sss.pgh.pa.us> <3968565.1785170019@sss.pgh.pa.us> <3975112.1785176472@sss.pgh.pa.us> <670538.1786924698@sss.pgh.pa.us> <839346.1787765112@sss.pgh.pa.us> <954541.1787846010@sss.pgh.pa.us> <1147476.1787924590@sss.pgh.pa.us> <495449.1788106841@sss.pgh.pa.us> <1041163.1788191770@sss.pgh.pa.us> Comments: In-reply-to Richard Guo message dated "Tue, 01 Sep 2026 11:07:55 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1183641.1788276945.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 01 Sep 2026 11:35:45 -0400 Message-ID: <1183642.1788276945@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Richard Guo writes: > On Tue, Sep 1, 2026 at 12:56 AM Tom Lane wrote: >> * I feel like the naming of remove_redundant_nullability_quals >> and remove_redundant_nullability_quals_recurse is a bit weird. >> Usually our pattern is that a function named like foo_recurse >> is an inner workhorse for a function named foo. This is the >> other way around, which seems like it'd confuse readers. > I've renamed the jointree walker to remove_redundant_nullability_quals > (it recurses into itself, so there is no wrapper to pair a "_recurse" > with), and the helper that processes one qual list to > strip_redundant_nullability_quals. Not sure if this is the best > naming though. Yeah, naming is always hard. I don't have a better suggestion than this. v2 patch LGTM. I might say "incomplete" rather than "one-sided" in the commit message, but that's getting *really* nit-picky. regards, tom lane