Re: cascading column drop to index predicates

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cascading column drop to index predicates
Date: 2003-12-22 06:28:34
Message-ID: 9558.1072074514@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> The thing is, if you drop a column that is used in a normal index, yes
> the index is now useless - drop it.
> However, since you can have (and I have) indexes like this:
> CREATE INDEX asdf ON table (a, b, c) WHERE d IS NOT NULL;
> If I drop column d, there is no way I want that index to just disappear!

Uh, why not? I don't quite see the argument why d stands in a different
relationship to this index than a,b,c do. The index is equally
meaningless without any of them.

> Can we change it to requiring a CASCADE?

It'd likely be a simple code change, but first let's have the argument
why it's a good idea.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-12-22 07:02:37 Re: [GENERAL] Temporary tables and miscellaneous schemas
Previous Message Christopher Kings-Lynne 2003-12-22 06:21:59 cascading column drop to index predicates

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-12-22 07:02:37 Re: [GENERAL] Temporary tables and miscellaneous schemas
Previous Message Christopher Kings-Lynne 2003-12-22 06:21:59 cascading column drop to index predicates