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 Bruce Momjian <pgman@candle.pha.pa.us>
Re: Dropping column silently kills multi-coumn index (was Justin Clift <justin@postgresql.org>
Re: Dropping column silently kills multi-coumn index (was Bruce Momjian <pgman@candle.pha.pa.us>
Re: Dropping column silently kills multi-coumn index Lincoln Yeoh <lyeoh@pop.jaring.my>
Re: Dropping column silently kills multi-coumn index (was Bruce Momjian <pgman@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 Bruce Momjian <pgman@candle.pha.pa.us>
Re: Dropping column silently kills multi-coumn index (was Tom Lane <tgl@sss.pgh.pa.us>
Tom Lane wrote:
> Bruce Momjian  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
Дата:
От: Tom Lane
Дата:
FAQ