Re: Dropping column silently kills multi-coumn index (was

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>, Justin Clift <justin(at)postgresql(dot)org>, Glen Parker <glenebob(at)nwlink(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Dropping column silently kills multi-coumn index (was
Date: 2003-02-16 00:29:35
Message-ID: 200302160029.h1G0TZ121802@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-02-16 01:17:16 Re: Dropping column silently kills multi-coumn index (was
Previous Message Tom Lane 2003-02-15 21:18:54 Re: Aggregates with non-commutative transition functions