From: Tom Lane <tgl@sss.pgh.pa.us>
To: 徐志宇徐 <xuzhiyuster@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: About psql \dt unable display same name table which have different schema
Date: Tue, 24 May 2022 12:16:09 -0400
Message-ID: <1652895.1653408969@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOCebiKq7fmsGr36ON5_Fru2dQJBB6NY3m_NnLs94CbUek=AZg@mail.gmail.com>
References: <CAOCebiKq7fmsGr36ON5_Fru2dQJBB6NY3m_NnLs94CbUek=AZg@mail.gmail.com>
=?UTF-8?B?5b6Q5b+X5a6H5b6Q?= <xuzhiyuster@gmail.com> writes:
> I don't know why this problem exist. Why unable display both table "
> public.test10 、 new. test10 "
That's behaving as designed: \dt will show you tables that are
accessible with an unqualified name, but new.test10 is hidden
behind public.test10, so it's not accessible except by
qualification.
You can do "\dt *.*" or "\dt new.*", etc, to see such tables.
See here for more info:
https://www.postgresql.org/docs/current/app-psql.html#APP-PSQL-PATTERNS
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, xuzhiyuster@gmail.com
Subject: Re: About psql \dt unable display same name table which have different schema
In-Reply-To: <1652895.1653408969@sss.pgh.pa.us>
References: <CAOCebiKq7fmsGr36ON5_Fru2dQJBB6NY3m_NnLs94CbUek=AZg@mail.gmail.com> <1652895.1653408969@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