Re: [HACKERS] Re: [GENERAL] Views
Bruce Momjian <maillist@candle.pha.pa.us>
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: vadim@krs.ru (Vadim Mikheev)
Cc: hackers@postgreSQL.org
Date: 1999-01-06T02:21:39Z
Lists: pgsql-hackers, pgsql-general
> 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_views
WHERE 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, Pennsylvania 19026