Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 251E06339C2 for ; Mon, 12 Oct 2009 10:57:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 12240-09-2 for ; Mon, 12 Oct 2009 13:57:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 2B636633C3F for ; Mon, 12 Oct 2009 10:57:14 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n9CDv9MN007084; Mon, 12 Oct 2009 09:57:09 -0400 (EDT) To: Maximilian Tyrtania cc: "pgsql-sql@postgresql.org" Subject: Re: maintaining nested views In-reply-to: References: Comments: In-reply-to Maximilian Tyrtania message dated "Mon, 12 Oct 2009 08:35:18 +0200" Date: Mon, 12 Oct 2009 09:57:09 -0400 Message-ID: <7083.1255355829@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.655 tagged_above=-10 required=5 tests=AWL=-0.915, BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 200910/54 X-Sequence-Number: 33253 Maximilian Tyrtania writes: > Quite often i find myself reluctant to nest views, because of the > maintenance issues this usually involves. As you know, you can't easily > alter the "lower level" views, because the higher level ones depend on them. > So, to add a field to a lower level view one has to: > drop view vw_lowlevel CASCADE; As of 8.4 you can add a column via CREATE OR REPLACE VIEW without that. regards, tom lane