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

From Bruce Momjian
Subject Re: Dropping column silently kills multi-coumn index (was
Date
Msg-id 200302160029.h1G0TZ121802@candle.pha.pa.us
Whole thread Raw
In response to Re: Dropping column silently kills multi-coumn index (was  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Dropping column silently kills multi-coumn index (was  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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?  In the multi-key
index, the index is _shared_ by several columns?  Do we have precedent
for CASCADE to remove something that is shared by others?  I don't
think so.

However, I now see in the ALTER TABLE manual page:

       CASCADE
              Automatically  drop  objects  that  depend  on  the
              dropped column or constraint  (for  example,  views
              referencing the column).

which does indicate that CASCADE delete things, like views, that are
shared.

TODO wording updated:

    * Require DROP COLUMN CASCADE for a column that is part of a
    multi-column index

--
  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, Pennsylvania 19073

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Aggregates with non-commutative transition functions
Next
From: Tom Lane
Date:
Subject: Re: Dropping column silently kills multi-coumn index (was