pg_depend query

From: "Sim Zacks" <sim(at)nospam(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: pg_depend query
Date: 2005-02-15 13:49:02
Message-ID: cusunk$1lhq$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am trying to write a query on the pg_depend table and it is confusing the
hell out of me. Hopefully someone could help.
I would like to know which views depend on another view.

When I try to drop a view it gives me a list of all the views that need to
be dropped in order for my view to be dropped/modified.
I would like to write a query to get that list, store all the dependent
views in an array, drop them all, change my view and then recreate all the
other ones.

I am spending way too much time going through and picking out the views
based on that list, dropping them and recreating them.

I will post my function to the list as soon as it is completed because I am
sure there are plenty of other people who would benefit from it, but I'm
having a very hard time getting started.

Thank You
Sim

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2005-02-15 14:29:08 Re: Lost rows/data corruption?
Previous Message John Sidney-Woollett 2005-02-15 13:47:48 Re: [Slony1-general] Re: Slony uninstall info/warning