Re: [ADMIN] behavior of \dt and schemas
От | Tom Lane |
---|---|
Тема | Re: [ADMIN] behavior of \dt and schemas |
Дата | |
Msg-id | 10797.1484926655@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [ADMIN] behavior of \dt and schemas ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: [ADMIN] behavior of \dt and schemas
|
Список | pgsql-admin |
"David G. Johnston" <david.g.johnston@gmail.com> writes: > On Friday, January 20, 2017, John Scalia <jayknowsunix@gmail.com> 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
В списке pgsql-admin по дате отправления: