From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-general@postgresql.org
Subject: Re: Alter view with dependence without drop view!
Date: Tue, 30 Jan 2018 23:03:18 +0100
Message-ID: <p4qpv8$b1p$1@blaine.gmane.org> (raw)
In-Reply-To: <CAJJTqWTgeDfWhLTAXSdyvz6t08jON_OT7UOAJPHtZ+hTYnkQRA@mail.gmail.com>
References: <CAJJTqWTgeDfWhLTAXSdyvz6t08jON_OT7UOAJPHtZ+hTYnkQRA@mail.gmail.com>
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: spam_eater@gmx.net
Subject: Re: Alter view with dependence without drop view!
In-Reply-To: <p4qpv8$b1p$1@blaine.gmane.org>
References: <CAJJTqWTgeDfWhLTAXSdyvz6t08jON_OT7UOAJPHtZ+hTYnkQRA@mail.gmail.com> <p4qpv8$b1p$1@blaine.gmane.org>
* 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