Обсуждение: \d for views display query

Поиск
Список
Период
Сортировка

\d for views display query

От
James Sasitorn
Дата:
The default behavior for \d (at least in my installations) changed when used against views.

if I do
#\d myview

It shows the view structure only. Older versions of psql used to also show what the view represented (the select
statementsand supporting tables it corresponded to). 

How do I display the select command/supporting tables backing a view in the interactive psql?


Thanks for the help,
James

Re: \d for views display query

От
Tom Lane
Дата:
James Sasitorn <james@sasitorn.com> writes:
> The default behavior for \d (at least in my installations) changed when used against views.
> if I do
> #\d myview

> It shows the view structure only. Older versions of psql used to also show what the view represented (the select
statementsand supporting tables it corresponded to). 

Yes.  Use \d+ to see the definition too in recent versions of psql.

            regards, tom lane