Re: behavior of \dt and schemas

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: John Scalia <jayknowsunix(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: behavior of \dt and schemas
Date: 2017-01-20 15:11:26
Message-ID: 20170120151126.GQ18360@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

John,

* John Scalia (jayknowsunix(at)gmail(dot)com) wrote:
> So far so good, and I get a similar output If I just set the search_path to
> B, only now it properly shows the schema as b. However, if I set the
> search_path to a, b; and enter \dt, I only see the tables from the first
> schema "a", like the above. and not the second schema. I would have
> expected:

That's intentional as an unqualified object reference would pick up the
object from the schema which shows up first in your search_path.

> 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's not changed.

Thanks!

Stephen

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2017-01-20 15:11:58 Re: behavior of \dt and schemas
Previous Message John Scalia 2017-01-20 14:53:04 behavior of \dt and schemas