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