From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my> |
Cc: | 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-15 18:29:55 |
Message-ID: | 200302151829.h1FITtX28683@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Added to TODO:
* Disallow DROP COLUMN on a column that is part of a multi-column index
---------------------------------------------------------------------------
Lincoln Yeoh wrote:
> At 11:36 AM 2/15/03 +1100, Justin Clift wrote:
>
> >Bruce Momjian wrote:
> >>think CASCASE enters into this because of the effect on field1.
> >>Comments?
> >
> >Would it be possible/practical to have PostgreSQL recreate the
> >multi-column index, but without the dropped column?
>
> Wouldn't that take a long time in some cases?
>
> I think it's a good idea to throw an error and refuse to drop the column
> and index and let the DB admin decide what to do next.
>
> If someone designs a system that regularly drops columns from tables AND
> wants indexes on those columns, I'd figure requiring them to drop relevant
> indexes first would be a good idea. Of course if they can optionally
> configure things (triggers etc) to drop the index when dropping/altering a
> column, that would be ok too.
>
> When the admins don't know what they are doing or make a mistake - it'll
> fail safe. When the admins know, as long as they are still able to set
> things up accordingly, I don't think it's a big problem.
>
> Regards,
> Link.
>
>
>
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-02-15 20:59:07 | Re: Dropping column silently kills multi-coumn index (was |
Previous Message | Bruce Momjian | 2003-02-15 18:21:32 | Re: Dropping column silently kills multi-coumn index (was |