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 1rRxlh-00ATNi-S3 for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jan 2024 17:07:30 +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 1rRxlg-005Vtg-Ql for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jan 2024 17:07:28 +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 1rRxlg-005VtV-Gf for pgsql-hackers@lists.postgresql.org; Mon, 22 Jan 2024 17:07:28 +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 1rRxle-0039eW-2T for pgsql-hackers@lists.postgresql.org; Mon, 22 Jan 2024 17:07:27 +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 40MH7NX73791431; Mon, 22 Jan 2024 12:07:23 -0500 From: Tom Lane To: Aleksander Alekseev cc: pgsql-hackers@lists.postgresql.org, Chantal Keller Subject: Re: Improving EXPLAIN's display of SubPlan nodes In-reply-to: References: <2838538.1705692747@sss.pgh.pa.us> Comments: In-reply-to Aleksander Alekseev message dated "Mon, 22 Jan 2024 15:35:33 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3791429.1705943243.1@sss.pgh.pa.us> Date: Mon, 22 Jan 2024 12:07:23 -0500 Message-ID: <3791430.1705943243@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Aleksander Alekseev writes: > Although something like: > ``` > + Filter: (ANY (base_tbl.a = $1) FROM SubPlan 1 (returns $1)) > + SubPlan 1 (returns $1) > ``` > ... arguably doesn't give much more information to the user comparing > to what we have now: > ``` > - Filter: (SubPlan 1) > - SubPlan 1 > ``` Yeah, I would probably not have thought to do this on my own; but we had an actual user request for it. I think arguably the main benefit is to confirm "yes, this is the sub-select you think it is". The main thing that's still missing compared to what is in the plan data structure is information about which Param is which. I think we have the subplan output Params relatively well covered through the expedient of listing them in the generated plan_name, but it's still not apparent to me how we could shoehorn subplan input Params into this (or whether it's worth doing). regards, tom lane