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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Dropping column silently kills multi-coumn index (was
Дата
Msg-id 200302160029.h1G0TZ121802@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Dropping column silently kills multi-coumn index (was  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Dropping column silently kills multi-coumn index (was
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Aggregates with non-commutative transition functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Dropping column silently kills multi-coumn index (was