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 235DBD1C981 for ; Mon, 12 Jan 2004 16:54:17 +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 07279-01 for ; Mon, 12 Jan 2004 12:53:43 -0400 (AST) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id 41C6CD1B44F for ; Mon, 12 Jan 2004 12:53:39 -0400 (AST) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.10/8.12.10) with ESMTP id i0CGqUlu005257; Mon, 12 Jan 2004 09:52:30 -0700 (MST) Date: Mon, 12 Jan 2004 09:34:33 -0700 (MST) From: "scott.marlowe" To: Tom Lane Cc: Rajesh Kumar Mallah , Subject: Re: Adding a column to a VIEW which has dependent objects. In-Reply-To: <9810.1073753325@sss.pgh.pa.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IHS-MailScanner: Found to be clean X-IHS-MailScanner-SpamCheck: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/97 X-Sequence-Number: 16490 On Sat, 10 Jan 2004, Tom Lane wrote: > 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 ... Note that the definitions for views are stored in pg_views as well.