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 1pAniK-0001cB-SD for pgsql-performance@arkaria.postgresql.org; Thu, 29 Dec 2022 07:52:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pAniJ-0008MC-Aa for pgsql-performance@arkaria.postgresql.org; Thu, 29 Dec 2022 07:52:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pAniJ-0008M2-14 for pgsql-performance@lists.postgresql.org; Thu, 29 Dec 2022 07:52:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pAniC-0008Jx-Dy for pgsql-performance@lists.postgresql.org; Thu, 29 Dec 2022 07:52:30 +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 2BT7qA4n492413; Thu, 29 Dec 2022 02:52:10 -0500 From: Tom Lane To: Gunther Schadow cc: Justin Pryzby , pgsql-performance@lists.postgresql.org Subject: Re: When you really want to force a certain join type? In-reply-to: References: <70b2ee7b-8e8b-d884-8ca2-590a242308b8@gusw.net> <20221228154837.GX1153@telsasoft.com> Comments: In-reply-to Gunther Schadow message dated "Thu, 29 Dec 2022 02:31:59 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <492411.1672300330.1@sss.pgh.pa.us> Date: Thu, 29 Dec 2022 02:52:10 -0500 Message-ID: <492412.1672300330@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Gunther Schadow writes: > Also, why even use the RECURSIVE keyword, DB2 didn't need it, and the > query analyzer should immediately see the recursion, so no need to have > that keyword. Our reading of the SQL spec is that it's required. The scope of visibility of CTE names is different depending on whether you write RECURSIVE or not, so it's not a question of "the query analyzer should see it": the analyzer is required NOT to see it. DB2 generally has a reputation for agreeing with the spec, so I'm surprised to hear that they're not doing this per spec. regards, tom lane