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 1rP2rw-008wS3-87 for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Jan 2024 15:57:52 +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 1rP2rt-00CChc-P8 for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Jan 2024 15:57:49 +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 1rP2rt-00CChD-Gz for pgsql-bugs@lists.postgresql.org; Sun, 14 Jan 2024 15:57:49 +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 1rP2rq-001kG7-DN for pgsql-bugs@lists.postgresql.org; Sun, 14 Jan 2024 15:57:48 +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 40EFvhfU1240721; Sun, 14 Jan 2024 10:57:43 -0500 From: Tom Lane To: yongtaoh2022@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18290: \di+ can not show the same name indexes In-reply-to: <18290-d645a814cc36cc06@postgresql.org> References: <18290-d645a814cc36cc06@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Sun, 14 Jan 2024 06:57:15 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1240719.1705247863.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 14 Jan 2024 10:57:43 -0500 Message-ID: <1240720.1705247863@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > gpadmin=3D# \di+ > List of relations > Schema | Name | Type | Owner | Table | Persistence | Access metho= d | = > Size | Description > -----------+------+-------+---------+-------+-------------+-------------= --+------------+------------- > pg_temp_3 | idx1 | index | gpadmin | t2 | temporary | btree = | > 8192 bytes | > (1 row) > Both table `t1` and temp table `t2` have index idx, but `\di` only shows= the > index of table `t2`. This is not a bug: \di is operating as documented, namely showing you the indexes that are visible in your current search_path. The temp index masks the similarly-named one in public. You could see both of them with "\di+ *.*", "\di+ *.idx1", or other forms. For more info see https://www.postgresql.org/docs/current/app-psql.html#APP-PSQL-PATTERNS regards, tom lane