From: Richard Huxton <dev@archonet.com>
To: Martin Schäfer <Martin.Schaefer@cadcorp.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Find out whether a view's column is indexed?
Date: Thu, 10 Jun 2004 09:41:55 +0100
Message-ID: <40C81ED3.70709@archonet.com> (raw)
In-Reply-To: <37936EEC582B394A9E1AA951991A551604C3BF@dev001_pdc.Dev.cadcorp.net>
References: <37936EEC582B394A9E1AA951991A551604C3BF@dev001_pdc.Dev.cadcorp.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, Martin.Schaefer@cadcorp.com
Subject: Re: Find out whether a view's column is indexed?
In-Reply-To: <40C81ED3.70709@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox