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 1qwO1m-00BOTG-DM for pgsql-bugs@arkaria.postgresql.org; Fri, 27 Oct 2023 14:41:34 +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 1qwO1l-00GHRA-0F for pgsql-bugs@arkaria.postgresql.org; Fri, 27 Oct 2023 14:41:33 +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 1qwO1k-00GHR2-Ns for pgsql-bugs@lists.postgresql.org; Fri, 27 Oct 2023 14:41:32 +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.94.2) (envelope-from ) id 1qwO1i-002aLk-A5 for pgsql-bugs@lists.postgresql.org; Fri, 27 Oct 2023 14:41:31 +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 39REfQtb1551958; Fri, 27 Oct 2023 10:41:26 -0400 From: Tom Lane To: Richard Guo cc: Andrei Lepikhov , Alexander Korotkov , Vik Fearing , zuming.jiang@inf.ethz.ch, pgsql-bugs@lists.postgresql.org, Alexander Korotkov Subject: Re: BUG #18170: Unexpected error: no relation entry for relid 3 In-reply-to: References: <18170-f1d17bf9a0d58b24@postgresql.org> <4ecab120-6be3-4cf6-a2a0-249c73ae91d4@postgresfriends.org> <1189851.1698340331@sss.pgh.pa.us> <011bcae5-7840-42c7-a50c-b406189e2e78@postgrespro.ru> <721542ce-79df-469e-93e9-811fadb5bd0c@postgrespro.ru> <2eb87c2e-7e6f-4002-8df3-8fac3aa6a037@postgrespro.ru> Comments: In-reply-to Richard Guo message dated "Fri, 27 Oct 2023 22:10:31 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1551956.1698417686.1@sss.pgh.pa.us> Date: Fri, 27 Oct 2023 10:41:26 -0400 Message-ID: <1551957.1698417686@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Richard Guo writes: > Alternatively, can we look at subroot->parse->targetList instead of > subquery->targetList where we call estimate_num_groups on the output of > the subquery? Please read the comment just above that. regards, tom lane