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 1rdXKm-00660m-6J for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Feb 2024 15:19:32 +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 1rdXKk-001rtX-PM for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Feb 2024 15:19:31 +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.94.2) (envelope-from ) id 1rdXKk-001rtP-Fj for pgsql-hackers@lists.postgresql.org; Fri, 23 Feb 2024 15:19:30 +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.94.2) (envelope-from ) id 1rdXKi-000XOq-Gc for pgsql-hackers@postgresql.org; Fri, 23 Feb 2024 15:19: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 41NFJPdO814830; Fri, 23 Feb 2024 10:19:25 -0500 From: Tom Lane To: Dean Rasheed cc: Peter Eisentraut , pgsql-hackers Subject: Re: RangeTblEntry.inh vs. RTE_SUBQUERY In-reply-to: References: <6c1fbccc-85c8-40d3-b08b-4f47f2093711@eisentraut.org> Comments: In-reply-to Dean Rasheed message dated "Fri, 23 Feb 2024 14:52:20 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <814828.1708701565.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 23 Feb 2024 10:19:25 -0500 Message-ID: <814829.1708701565@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dean Rasheed writes: > On Fri, 23 Feb 2024 at 14:35, Peter Eisentraut wr= ote: >> Various code comments say that the RangeTblEntry field inh may only be >> set for entries of kind RTE_RELATION. > Yes, it's explained a bit more clearly/accurately in expand_inherited_rt= entry(): > * "inh" is only allowed in two cases: RELATION and SUBQUERY RTEs. Yes. The latter has been accurate for a very long time, so I'm surprised that there are any places that think otherwise. We need to fix them --- where did you see this exactly? (Note that RELATION-only is accurate within the parser and rewriter, so maybe clarifications about context are in order.) regards, tom lane