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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to