[ADMIN] behavior of \dt and schemas

Поиск
Список
Период
Сортировка
От John Scalia
Тема [ADMIN] behavior of \dt and schemas
Дата
Msg-id CABzCKRAoMHjwr__4Y6tEmF8HAm2yZhEgPVqwg8=Y8_1-cfDjsg@mail.gmail.com
обсуждение исходный текст
Ответы Re: [ADMIN] behavior of \dt and schemas  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: [ADMIN] behavior of \dt and schemas  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-admin
Hi all,

I've come across some rather non-intuitive behavior with \dt output. Say I have schema A and schema B, both with an identical mytable in them. If I set the search_path to A; and type \dt, I see

             List of relations
 Schema      |  Name   | Type   | Owner
-------------------------------------------------------
 a                | mytable | table   | postgres

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:

               List of relations
Schema      |  Name   | Type    | Owner
-------------------------------------------------------
 a                | mytable | table   | postgres
 b                | mytable | table   | postgres

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.

Flame suit on,
Jay

В списке pgsql-admin по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: [ADMIN] [GENERAL] Moving from 9.5 to 9.6
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [ADMIN] behavior of \dt and schemas