pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: yongtaoh2022@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18290: \di+ can not show the same name indexes
Date: Sun, 14 Jan 2024 10:57:43 -0500
Message-ID: <1240720.1705247863@sss.pgh.pa.us> (raw)
In-Reply-To: <18290-d645a814cc36cc06@postgresql.org>
References: <18290-d645a814cc36cc06@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> gpadmin=# \di+
>                                           List of relations
>   Schema   | Name | Type  |  Owner  | Table | Persistence | Access method | 
>   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





view thread (3+ messages)  latest in thread

Message-ID: <1240720.1705247863@sss.pgh.pa.us>
Permalink:  ../1240720.1705247863@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1240720.1705247863@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, yongtaoh2022@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18290: \di+ can not show the same name indexes
  In-Reply-To: <1240720.1705247863@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox