Re: dropping column prevented due to inherited index
От | Alvaro Herrera |
---|---|
Тема | Re: dropping column prevented due to inherited index |
Дата | |
Msg-id | 20191009093635.GA24368@alvherre.pgsql обсуждение исходный текст |
Ответ на | Re: dropping column prevented due to inherited index (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: dropping column prevented due to inherited index
|
Список | pgsql-hackers |
On 2019-Oct-09, Michael Paquier wrote: > On Tue, Oct 08, 2019 at 06:25:05PM +0900, Amit Langote wrote: > > I thought about doing something like that, but wasn't sure if > > introducing that much complexity is warranted. > > I looked at that. By experience, I think that it would be wiser to do > first the lookup of all the dependencies you would like to delete, and > then let the internal dependency machinery sort things out after > recursing (remember recent fixes related to ON COMMIT actions). In > order to do that, you actually just need to be careful to not trigger > the deletions as long as "recursing" is true because ATExecDropColumn > calls itself. And it is not actually as bad as I assumed, please see > the attached. Right, something like that. Needs a comment to explain what we do and how recursing=true correlates with addrs=NULL, I think. Maybe add an assert. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: