Re: Find out whether a view's column is indexed?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Find out whether a view's column is indexed?
Date: 2004-06-10 08:41:55
Message-ID: 40C81ED3.70709@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Martin Schäfer wrote:
> Is there any way to find out whether a column that's used in a view is indexed?
>
> The following query:
>
> SELECT ic.relname AS index_name
[snip]
> lets me find out whether a table column is indexed, but it doesn't work for views. Is there anything that can be done for views? At least for simple views of the kind 'CREATE VIEW v AS SELECT a,b,c FROM t'?

If you're running 7.4 you can look in the information schema, in
view_column_usage - that will tell you which table-columns a view uses.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Gamache 2004-06-10 13:20:50 Re: Schema + User-Defined Data Type Indexing problems...
Previous Message Martin Schäfer 2004-06-10 07:56:05 Find out whether a view's column is indexed?