Thread: \d for views display query

\d for views display query

From
James Sasitorn
Date:
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

From
Tom Lane
Date:
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