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 1twjvw-00H9BO-SO for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Mar 2025 15:41:48 +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 1twjvv-00551j-JX for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Mar 2025 15:41:47 +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 1twjvv-0054xb-9h for pgsql-hackers@lists.postgresql.org; Mon, 24 Mar 2025 15:41:47 +0000 Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1twjvs-000sho-2H for pgsql-hackers@lists.postgresql.org; Mon, 24 Mar 2025 15:41:46 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4ZLy2n1S1Fz9tCw; Mon, 24 Mar 2025 16:41:37 +0100 (CET) Date: Mon, 24 Mar 2025 16:41:35 +0100 From: Christoph Berg To: Michael Paquier Cc: Tom Lane , PostgreSQL Hackers , ma lz Subject: Re: query_id: jumble names of temp tables for better pg_stat_statement UX Message-ID: References: <1831838.1742656359@sss.pgh.pa.us> <80506.1742660683@sss.pgh.pa.us> <461405.1742691859@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4ZLy2n1S1Fz9tCw List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Michael Paquier > So your idea to use the relation name in eref while skipping the > column list looks kind of promising. Per se the attached. Thoughts? Makes sense to me, thanks for digging into it. > +++ b/src/backend/nodes/queryjumblefuncs.c > @@ -33,6 +33,7 @@ > #include "postgres.h" > > #include "access/transam.h" > +#include "catalog/namespace.h" No longer needed. > +++ b/contrib/pg_stat_statements/sql/select.sql > +SET search_path = 'pgss_schema_1'; > +SELECT count(*) FROM tab_search_same; > +SELECT a, b FROM tab_search_same; > +SELECT count(*) FROM tab_search_diff_1; > +SELECT count(*) FROM tab_search_diff_2; > +SELECT a FROM tab_search_diff_2; > +SET search_path = 'pgss_schema_1'; Should this be pgss_schema_2 ? Christoph