Re: bug in 7.4 SET WITHOUT OIDs - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: bug in 7.4 SET WITHOUT OIDs
Date
Msg-id 200403231722.i2NHMQl16668@candle.pha.pa.us
Whole thread Raw
In response to Re: bug in 7.4 SET WITHOUT OIDs  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: bug in 7.4 SET WITHOUT OIDs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Christopher Kings-Lynne wrote:
> >>Maybe it needs CASCADE/RESTRICT added?
> > 
> > Seems like overkill, considering that this is a very marginal feature.
> > I'm happy to decree that it works in whichever way is the easiest to
> > implement.
> 
> In that case, it seems to me that it has to be default RESTRICT.  If 
> anything depend on it, it must fail.  Otherwise when you do it, it could 
> drop views, functions, everything.

Seems it should behave just like dropping a column of a table that
already has an index on it:
test=> CREATE TABLE test(x int, y int);CREATE TABLEtest=> CREATE INDEX ii ON test(y);CREATE INDEXtest=> ALTER TABLE
testDROP COLUMN y;ALTER TABLEtest=> \d test     Table "public.test" Column |  Type   |
Modifiers--------+---------+-----------x      | integer |
 

which I think means drop the index automatically.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Dustin Sallings
Date:
Subject: Re: linked list rewrite
Next
From: Tom Lane
Date:
Subject: Re: bug in 7.4 SET WITHOUT OIDs