Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUbHj-00046P-Jk for pgsql-admin@arkaria.postgresql.org; Fri, 20 Jan 2017 15:39:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cUbHj-0003hF-6w for pgsql-admin@arkaria.postgresql.org; Fri, 20 Jan 2017 15:39:27 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cUbG1-0001JN-Lr for pgsql-admin@postgresql.org; Fri, 20 Jan 2017 15:37:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cUbFy-0002I0-KC for pgsql-admin@postgresql.org; Fri, 20 Jan 2017 15:37:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v0KFbZOr010798; Fri, 20 Jan 2017 10:37:35 -0500 From: Tom Lane To: "David G. Johnston" cc: John Scalia , "pgsql-admin@postgresql.org" Subject: Re: behavior of \dt and schemas In-reply-to: References: Comments: In-reply-to "David G. Johnston" message dated "Fri, 20 Jan 2017 08:11:58 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10796.1484926655.1@sss.pgh.pa.us> Date: Fri, 20 Jan 2017 10:37:35 -0500 Message-ID: <10797.1484926655@sss.pgh.pa.us> X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org "David G. Johnston" writes: > On Friday, January 20, 2017, John Scalia wrote: >> So, to me this is somewhat non-intuitive behavior, but maybe I'm all wet >> here. Shouldn't \dt report all the tables it can see with the search_path >> set to some value? And btw, this is was the behavior on 9.4.10, so if it's >> changed in more recent versions, I haven't tested there yet. > It shows the definition of the table you would be referencing if you used > that name in a query. This seems like a useful behavior. Right --- according to our normal terminology, b.mytable is *not* visible, because it is masked by a.mytable being ahead of it in the search path. You'd have to write a qualified name to get at b.mytable. You can write, eg, "\dt *.mytable" or "\dt *.*" if you would like it to show tables that are not visible according to this rule. Without a dot in the pattern, \dt shows only visible tables, ie only the ones you could name without putting a dot in the name. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin