Re: [GENERAL] How to drop column from interrelated views

2017-07-16 Thread Karsten Hilbert
On Sat, Jul 08, 2017 at 03:18:39PM -0700, Guyren Howe wrote: > I’ve a set of interrelated views. I want to drop a column from a table and > from all the views that cascade from it. > > I’ve gone to the leaf dependencies and removed the field from them. But I > can’t remove the field from the

Re: [GENERAL] How to drop column from interrelated views

2017-07-09 Thread pinker
I've got some functions on my own :) If you prefer to do it from SQL level I've got two functions prepared which first secure then restore all missing views definitions. -- secure all views DO $$ BEGIN --drop schema migration cascade CREATE SCHEMA migration; CREATE TABLE migration.views AS

Re: [GENERAL] How to drop column from interrelated views

2017-07-09 Thread Melvin Davidson
On Sun, Jul 9, 2017 at 9:56 AM, Berend Tober wrote: > Guyren Howe wrote: > >> On Jul 8, 2017, at 16:11 , Berend Tober bto...@computer.org>> >> wrote: >> >>> >>> Guyren Howe wrote: >>> I’ve a set of interrelated views. I want to drop a column from

Re: [GENERAL] How to drop column from interrelated views

2017-07-09 Thread Berend Tober
Guyren Howe wrote: On Jul 8, 2017, at 16:11 , Berend Tober > wrote: Guyren Howe wrote: I’ve a set of interrelated views. I want to drop a column from a table and from all the views that cascade from it. I’ve gone to the leaf dependencies and

Re: [GENERAL] How to drop column from interrelated views

2017-07-08 Thread Berend Tober
Guyren Howe wrote: I’ve a set of interrelated views. I want to drop a column from a table and from all the views that cascade from it. I’ve gone to the leaf dependencies and removed the field from them. But I can’t remove the field from the intermediate views because Postgres doesn’t appear

[GENERAL] How to drop column from interrelated views

2017-07-08 Thread Guyren Howe
I’ve a set of interrelated views. I want to drop a column from a table and from all the views that cascade from it. I’ve gone to the leaf dependencies and removed the field from them. But I can’t remove the field from the intermediate views because Postgres doesn’t appear to be clever enough