Re: [HACKERS] Re: [GENERAL] Views - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Re: [GENERAL] Views
Date
Msg-id 199901060221.VAA20190@candle.pha.pa.us
Whole thread Raw
In response to Re: [GENERAL] Views  (Vadim Mikheev <vadim@krs.ru>)
List pgsql-hackers
> Kaare Rasmussen wrote:
> > 
> > How can I see a view in psql after having created it? If I enter
> > \d <viewname> I can see the fields, but how can I see what makes up the
> > view? Best if the original CREATE statement could be listed somehow.
> 
> We could use EXPLAIN VIEW for this...
> New item for TODO?
> 
> EXPLAIN TABLE, EXPLAIN INDEX, etc

How about:
SELECT * from pg_viewsWHERE viewname = 'fred';

OR
SELECT pg_get_viewdef('fred');

I have added this to the TODO list:
* have psql \d on a view show the view definition.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] SQLJ
Next
From: "Thomas G. Lockhart"
Date:
Subject: Numeric type