From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rajesh Kumar Mallah <mallah@trade-india.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Adding a column to a VIEW which has dependent objects.
Date: Sat, 10 Jan 2004 11:48:45 -0500
Message-ID: <9810.1073753325@sss.pgh.pa.us> (raw)
In-Reply-To: <3FFFAFCE.50005@trade-india.com>
References: <3FFFAFCE.50005@trade-india.com>
Rajesh Kumar Mallah <mallah@trade-india.com> writes:
> How do people extend a parent view which has
> lot of dependent views?
> The parent view cannot be dropped because that will
> require recreating a dozen of dependent views.
You're out of luck, you'll have to drop and remake them all.
In future we could think about some kind of ALTER VIEW ADD COLUMN
operation, but it ain't there now.
(I suppose if you were really desperate you could think about manually
hacking the system catalogs, but this would be pretty risky on a
production database.)
> Also is there an easy way of dumping the definitions
> of all the dependent views of a given object.
You can chase the links in pg_depend to see what the dependent objects
are, but extracting their definitions would be a tad harder ...
regards, tom lane
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: tgl@sss.pgh.pa.us, mallah@trade-india.com
Subject: Re: Adding a column to a VIEW which has dependent objects.
In-Reply-To: <9810.1073753325@sss.pgh.pa.us>
* 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