X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D72E4D1B461 for ; Sat, 10 Jan 2004 16:49:26 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 18483-10 for ; Sat, 10 Jan 2004 12:48:56 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id E4207D1B46A for ; Sat, 10 Jan 2004 12:48:50 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id i0AGmj19009811; Sat, 10 Jan 2004 11:48:45 -0500 (EST) To: Rajesh Kumar Mallah Cc: pgsql-sql@postgresql.org Subject: Re: Adding a column to a VIEW which has dependent objects. In-reply-to: <3FFFAFCE.50005@trade-india.com> References: <3FFFAFCE.50005@trade-india.com> Comments: In-reply-to Rajesh Kumar Mallah message dated "Sat, 10 Jan 2004 13:24:54 +0530" Date: Sat, 10 Jan 2004 11:48:45 -0500 Message-ID: <9810.1073753325@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/80 X-Sequence-Number: 16473 Rajesh Kumar Mallah 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