Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntXCj-0000hJ-7R for pgsql-general@arkaria.postgresql.org; Tue, 24 May 2022 16:16:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ntXCh-0002ft-9I for pgsql-general@arkaria.postgresql.org; Tue, 24 May 2022 16:16:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntXCg-0002fk-V2 for pgsql-general@lists.postgresql.org; Tue, 24 May 2022 16:16:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntXCd-0001p4-8f for pgsql-general@lists.postgresql.org; Tue, 24 May 2022 16:16:14 +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 24OGG9Fi1652896; Tue, 24 May 2022 12:16:09 -0400 From: Tom Lane To: =?UTF-8?B?5b6Q5b+X5a6H5b6Q?= cc: pgsql-general@lists.postgresql.org Subject: Re: About psql \dt unable display same name table which have different schema In-reply-to: References: Comments: In-reply-to =?UTF-8?B?5b6Q5b+X5a6H5b6Q?= message dated "Tue, 24 May 2022 23:59:51 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1652894.1653408969.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 24 May 2022 12:16:09 -0400 Message-ID: <1652895.1653408969@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk =?UTF-8?B?5b6Q5b+X5a6H5b6Q?= 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