cascading column drop to index predicates

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема cascading column drop to index predicates
Дата
Msg-id 3FE68D87.6040200@familyhealth.com.au
обсуждение исходный текст
Ответы Re: cascading column drop to index predicates  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hey Tom,

With regards to our previous conversation about dropping columns now 
properly dropping indexes that contain predicates that reference that 
column,  I now find it a bit disconcerting that such indexes are 
automatically removed when the column is dropped, instead of requiring a 
CASCADE.

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!

This has already caught me out...

Can we change it to requiring a CASCADE?  Is that a good idea?

Chris



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: What to do with my patch?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: cascading column drop to index predicates