Re: Dropping column silently kills multi-coumn index (was - Mailing list pgsql-general

From Tom Lane
Subject Re: Dropping column silently kills multi-coumn index (was
Date
Msg-id 5302.1045358236@sss.pgh.pa.us
Whole thread Raw
In response to Re: Dropping column silently kills multi-coumn index (was  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Added to TODO:
> * Disallow DROP COLUMN on a column that is part of a multi-column index
>>
>> That's poorly phrased.  What you meant to say is "require CASCADE if ..."

> Actually, no.  Does CASCADE make sense in this case?

Yes, it does.  The multi-key index is a dependent object, and dropping
dependent objects is exactly what CASCADE is for.

> Do we have precedent
> for CASCADE to remove something that is shared by others?

Certainly.  Try dropping a function that is used in several default
expressions, for example.

            regards, tom lane

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Dropping column silently kills multi-coumn index (was
Next
From: Doug McNaught
Date:
Subject: Re: Does postgres have something similiar to the LOAD DATA INFILE