Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ege0O-0007qU-Vz for pgsql-general@arkaria.postgresql.org; Tue, 30 Jan 2018 22:03:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ege0N-0005vR-4v for pgsql-general@arkaria.postgresql.org; Tue, 30 Jan 2018 22:03:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ege0M-0005vH-T8 for pgsql-general@lists.postgresql.org; Tue, 30 Jan 2018 22:03:50 +0000 Received: from [195.159.176.226] (helo=blaine.gmane.org) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ege0G-0004AK-8q for pgsql-general@postgresql.org; Tue, 30 Jan 2018 22:03:50 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1egdxy-0002ri-Ul for pgsql-general@postgresql.org; Tue, 30 Jan 2018 23:01:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-general@postgresql.org From: Thomas Kellerer Subject: Re: Alter view with dependence without drop view! Date: Tue, 30 Jan 2018 23:03:18 +0100 Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@blaine.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: Content-Language: de-DE X-Host-Lookup-Failed: Reverse DNS lookup failed for 195.159.176.226 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Elson Vaz schrieb am 30.01.2018 um 14:40: > Hello! > > I want make change in one view that have dependence view's, so when i try to make change i'm block because of this, what is the best solution?? > This can easily be dealt with when using a schema management tool. We use Liquibase for this and the main migration script simply drops all views before running any migration (so that table columns can be removed or renamed without having to think about view dependencies). Once the table migrations are done, all views are re-created automatically. The Liquibase migration script and the SQL source for the views are stored together in Git. Thomas