From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | "Markhof, Ingolf" <ingolf(dot)markhof(at)de(dot)verizon(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: dealing with dependencies |
Date: | 2021-07-16 17:00:23 |
Message-ID: | 73b0340aed9b94a3df5d29c6b323fb39021a196c.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 2021-07-16 at 14:42 +0200, Markhof, Ingolf wrote:
> In Oracle, I can easily delete a table or view that is used by existing views.
> The system marks the affected views. I can then re-define the deleted table or
> view and have all dependent views easily re-compiled. Done.
... or you end up with "invalid views" which give you an error when used.
Sorry, but we don't like inconsistent data, however convenient they might be.
> PostgreSQL instead is preventing inconsistency. It simply refuses to delete a
> view or table that is referenced by other views. Consequently, I need to
> delete all dependent views first, re-define the one I want to change and
> then create all dependent views deleted before... - Which is much more difficult
> to handle.
>
> I wonder how you deal with it in a professional way. Sounds like some type of
> "make" (that UNIX tool dealing with dependencies in the context of e.g.
> programming in C) would be helpful...
You have your view definitions stored in a source control system, and/or
you employ a version management tool like Liquibase.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
From | Date | Subject | |
---|---|---|---|
Next Message | David Gauthier | 2021-07-16 22:26:17 | Getting "ERROR: upper bound of FOR loop cannot be null" when trying to use a stored proc in a check constraint def. |
Previous Message | Tom Dearman | 2021-07-16 16:19:24 | Re: Frequetly updated partial index leads to bloat on index for Postresql 11 |