Re: [GENERAL] drop view with out cascading the dependents

2010-10-20 Thread Grzegorz Jaśkiewicz
2010/10/20 Merlin Moncure : > In recent versions of postgres (I think 8.4+?) you can add columns to > the view via create/replace (not drop of course).  This greatly > reduces the practical annoyances of dropping view dependencies, at > least for me... Ok, We're still on 8.3 here, and management re

Re: [GENERAL] drop view with out cascading the dependents

2010-10-20 Thread Merlin Moncure
2010/10/19 Grzegorz Jaśkiewicz : > On Tue, Oct 19, 2010 at 3:12 PM, Tom Lane wrote: >> Ravi Katkar writes: >>> Is there any feature to drop the view with out cascading the dependents. >> >> No.  But why don't you use CREATE OR REPLACE VIEW? >> > only caveat is, it won't work if he adds/removes an

Re: [GENERAL] drop view with out cascading the dependents

2010-10-19 Thread Ben Carbery
You can always recreate the dependent views in the same process, since you won't lose any data. If there are also linked tables you could use COPY before deleting and recreating, it's fairly fast. But..does the structure of your data really need to change? Just guessing, but it just sounds a littl

Re: [GENERAL] drop view with out cascading the dependents

2010-10-19 Thread Ravi Katkar
pgsql-general@postgresql.org Subject: Re: [GENERAL] drop view with out cascading the dependents On Tue, Oct 19, 2010 at 3:12 PM, Tom Lane wrote: > Ravi Katkar writes: >> Is there any feature to drop the view with out cascading the dependents. > > No.  But why don't you use CREAT

Re: [GENERAL] drop view with out cascading the dependents

2010-10-19 Thread Grzegorz Jaśkiewicz
On Tue, Oct 19, 2010 at 3:12 PM, Tom Lane wrote: > Ravi Katkar writes: >> Is there any feature to drop the view with out cascading the dependents. > > No.  But why don't you use CREATE OR REPLACE VIEW? > only caveat is, it won't work if he adds/removes any columns. CREATE OR REPLACE VIEW is rathe

Re: [GENERAL] drop view with out cascading the dependents

2010-10-19 Thread Tom Lane
Ravi Katkar writes: > Is there any feature to drop the view with out cascading the dependents. No. But why don't you use CREATE OR REPLACE VIEW? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription

[GENERAL] drop view with out cascading the dependents

2010-10-18 Thread Ravi Katkar
Hi List, Is there any feature to drop the view with out cascading the dependents. Below is my requirement. I have a view which is dependent on the other view/table. I wanted to drop the view dynamically and recreate the view with same name ( definition of view will differ ) with out cascading