[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: About psql \dt unable display same name table which have different schema
From:       徐 <xuzhiyuster () gmail ! com>
Date:       2022-05-24 16:39:00
Message-ID: CAOCebiL1ycW++wXVJSak2DFqzaKi8Cqf16zOrt_9WL1j3vY3SQ () mail ! gmail ! com
[Download RAW message or body]

Hi Tom.

  Thanks for your explanation. I got it.
  I really appreciate it.


Jack Xu.

Tom Lane <tgl@sss.pgh.pa.us> 于2022年5月25日周三 00:16写道:

> =?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
>

[Attachment #3 (text/html)]

<div dir="ltr"><div>Hi Tom. <br></div><div><br></div><div>   Thanks for your \
explanation. I got it. <br></div><div>   I really appreciate it. \
<br></div><div><br></div><div>                                                        \
Jack Xu.<br></div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">Tom Lane &lt;<a \
href="mailto:tgl@sss.pgh.pa.us">tgl@sss.pgh.pa.us</a>&gt; 于2022年5月25日周三 \
00:16写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">=?UTF-8?B?5b6Q5b+X5a6H5b6Q?= &lt;<a \
href="mailto:xuzhiyuster@gmail.com" target="_blank">xuzhiyuster@gmail.com</a>&gt; \
writes:<br> &gt; I don&#39;t know why this problem exist. Why unable display both \
table &quot;<br> &gt; public.test10 、 new. test10 &quot;<br>
<br>
That&#39;s behaving as designed: \dt will show you tables that are<br>
accessible with an unqualified name, but new.test10 is hidden<br>
behind public.test10, so it&#39;s not accessible except by<br>
qualification.<br>
<br>
You can do &quot;\dt *.*&quot; or &quot;\dt new.*&quot;, etc, to see such tables.<br>
<br>
See here for more info:<br>
<br>
<a href="https://www.postgresql.org/docs/current/app-psql.html#APP-PSQL-PATTERNS" \
rel="noreferrer" target="_blank">https://www.postgresql.org/docs/current/app-psql.html#APP-PSQL-PATTERNS</a><br>
 <br>
                                    regards, tom lane<br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic