From: | "btober(at)computer(dot)org" <btober(at)broadstripe(dot)net> |
---|---|
To: | Elson Vaz <elsonlei(at)gmail(dot)com> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Alter view with dependence without drop view! |
Date: | 2018-01-30 15:34:12 |
Message-ID: | 304712374.47914912.1517326452605.JavaMail.zimbra@broadstripe.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
One way I have approached this problem is:
1) Use PgAdmin attempt the change.
2) Examine the error report PgAdmin displays that identifies which dependent views are preventing your progress.
3) Wrap your original DDL from step 1 within the DROP and CREATE DDL associated with the closest dependent view.
4) Return to step 1 and repeat until step 1 succeeds.
With multiple iterations of this procedure, you will incrementally grow a DDL script that drops dependent views in the correct order, eliminating dependencies, and then recreate them in the proper order, respecting dependencies.
When this procedure got old, I started using a script created using pg_dump and pg_restore, as initially outlined here:
https://www.postgresql.org/message-id/55C3F0B4.5010600@computer.org
and with a correction noted here:
https://www.postgresql.org/message-id/0456dfda-4623-1331-7dca-e3cff914357b%40computer.org
-- B
----- Original Message -----
From: "Elson Vaz" <elsonlei(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Sent: Tuesday, January 30, 2018 8:40:45 AM
Subject: Alter view with dependence without drop view!
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??
thank you!!
best regard
Elson Vaz
From | Date | Subject | |
---|---|---|---|
Next Message | HIRTZ Jorge Alberto TENARIS | 2018-01-30 16:13:47 | PostgreSQL Kerberos Authentication |
Previous Message | David G. Johnston | 2018-01-30 15:29:40 | Re: Information on savepoint requirement within transctions |