Re: Fix ALTER COLUMN ... DROP EXPRESSSION with subpartitions

From: "Alberto Piai" <alberto(dot)piai(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix ALTER COLUMN ... DROP EXPRESSSION with subpartitions
Date: 2026-08-04 12:23:51
Message-ID: DKG5NKRFZ4JS.35CSGGZ53YKYU@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue Aug 4, 2026 at 9:26 AM CEST, Álvaro Herrera wrote:
> Hello Alberto,
>
> On 2026-Apr-07, Alberto Piai wrote:
>
>> While working on [0], I noticed that DROP EXPRESSION currently refuses
>> to be applied to inheritance trees of depth > 2, e.g. when there are
>> subpartitions.
>
> Yep, confirmed.
>
>> PFA a fix for this and a test case.
>>
>> I added the test case to generated_stored.sql,
>
> Looks good. I pushed your fix, with two minor changes:

Thanks for pushing this, and for taking the time to explain your
improvements. Much appreciated!

>
> I think you didn't add a commitfest entry for this.

I created one a while back, for some reason it didn't pick up your
latest mail. But that's maybe because it's assigned to PG20-1 which is
closed now. Anyway I updated it, so that's wrapped up now :)

Alberto

--
Alberto Piai
Sensational AG
Zürich, Switzerland

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-08-04 12:53:50 Re: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc.
Previous Message Gleb Kashkin 2026-08-04 12:20:35 Re: Bug in asynchronous Append