From: | Andreas Pflug <pgadmin(at)pse-consulting(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 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 15:46:00 |
Message-ID: | 3FE711B8.9020008@pse-consulting.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
>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.
>
>
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.
Regards,
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-12-22 15:48:06 | Re: [HACKERS] Current Win32 port status |
Previous Message | scott.marlowe | 2003-12-22 15:45:32 | Re: Project status pages |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-12-22 15:48:06 | Re: [HACKERS] Current Win32 port status |
Previous Message | Andrew Dunstan | 2003-12-22 15:20:13 | Re: [HACKERS] Current Win32 port status |