Re: [HACKERS] Re: [GENERAL] Views

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: vadim(at)krs(dot)ru (Vadim Mikheev)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: [GENERAL] Views
Date: 1999-01-06 02:21:39
Message-ID: 199901060221.VAA20190@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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_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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Billy G. Allie 1999-01-06 08:18:12 Re: Stale porting list?
Previous Message Vadim Mikheev 1999-01-06 01:58:09 Re: [GENERAL] Views

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1999-01-06 02:29:15 Numeric type
Previous Message Tatsuo Ishii 1999-01-06 02:07:53 Re: [HACKERS] SQLJ