Re: cascading column drop to index predicates

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cascading column drop to index predicates
Date: 2003-12-22 16:02:58
Message-ID: 1072108977.17267.15.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Mon, 2003-12-22 at 10:55, Tom Lane wrote:
> Andreas Pflug <pgadmin(at)pse-consulting(dot)de> writes:
> > In that sample mentioned the index might be used mostly with a,b
> > columns. Dropping the index silently might damage the application
> > because it relies on an (a,b) index to be present. IMHO only Indexes
> > that span that single column should be dropped without CASCADE.
>
> That argument makes no sense to me at all. If you drop the *column*
> a or b, and do not thereby break your application, how is the
> disappearance of the index on it going to break anything? The index
> is meaningless without something to index.

I think Andreas is trying to argue that if you drop column b from index
(a, b) that the index should be converted into index(a) -- assuming of
course there isn't already an index(a).

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-12-22 16:08:06 Re: cascading column drop to index predicates
Previous Message Tom Lane 2003-12-22 15:55:44 Re: cascading column drop to index predicates

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-12-22 16:08:06 Re: cascading column drop to index predicates
Previous Message Tom Lane 2003-12-22 15:55:44 Re: cascading column drop to index predicates