How can I get list of views that are using given column in table?

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How can I get list of views that are using given column in table?
Date: 2012-02-20 12:06:53
Message-ID: 20120220120653.GA21922@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi
I have situation, where I need to change datatype of column.
But when I do:
alter table xx alter column yy type zz;
i get error:
ERROR: cannot alter type of a column used by a view or rule
DETAIL: rule _RETURN on view some_view depends on column "yy"

how can I get a list of all such views (in a sqlish way, so I could make a
query to return all needed objects that need to be dropped/recreated).

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Gould 2012-02-20 12:19:20 Re: Question on Rules
Previous Message Venkat Balaji 2012-02-20 06:56:52 Re: [GENERA]: Postgresql-9.1.1 synchronous replication issue