Re: dropping column prevented due to inherited index - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: dropping column prevented due to inherited index
Date
Msg-id 20191009071812.GC21379@paquier.xyz
Whole thread Raw
In response to Re: dropping column prevented due to inherited index  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: dropping column prevented due to inherited index
List pgsql-hackers
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.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: Transparent Data Encryption (TDE) and encrypted files
Next
From: Christoph Berg
Date:
Subject: Re: pgsql: Remove pqsignal() from libpq's official exports list.