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 1q7t3W-0004Lm-52 for pgsql-hackers@arkaria.postgresql.org; Sat, 10 Jun 2023 07:30:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q7t3U-00075A-4i for pgsql-hackers@arkaria.postgresql.org; Sat, 10 Jun 2023 07:30:36 +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 1q7t3T-000738-R6 for pgsql-hackers@lists.postgresql.org; Sat, 10 Jun 2023 07:30:35 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q7t3R-001NJt-9c for pgsql-hackers@postgresql.org; Sat, 10 Jun 2023 07:30:35 +0000 Received: from [10.5.0.2] (unknown [87.249.138.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 16E1D5465C; Sat, 10 Jun 2023 07:30:30 +0000 (UTC) Message-ID: Date: Sat, 10 Jun 2023 10:30:29 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.1 Subject: Re: Views no longer in rangeTabls? Content-Language: en-US To: Amit Langote Cc: Pg Hackers , Tom Lane References: <3953179e-9540-e5d1-a743-4bef368785b0@pgmasters.net> <462cd5de-3ade-989b-0798-7e1cab562991@pgmasters.net> <470644.1686327286@sss.pgh.pa.us> From: David Steele In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/10/23 09:57, Amit Langote wrote: > On Sat, Jun 10, 2023 at 15:51 David Steele > wrote: > On 6/9/23 19:14, Tom Lane wrote: > > > > If you see "rte->rtekind == RTE_SUBQUERY && OidIsValid(rte->relid)", > > it's dead certain that relid refers to a view, so you could just wire > > in that knowledge. > > Yeah, that's a good trick. Even so, I wonder why relkind is not set > when > relid is set? > > I too have been thinking that setting relkind might be a good idea, even > if only as a crosscheck that only view relations can look like that in > the range table. +1. Even better if we can do it for PG16. Regards, -David