Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wrEBZ-000DrU-0W for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Aug 2026 12:23:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wrEBX-006RTw-28 for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Aug 2026 12:23:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wrEBX-006RTo-0n for pgsql-hackers@lists.postgresql.org; Tue, 04 Aug 2026 12:23:55 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wrEBU-00000000ByA-42RG for pgsql-hackers@lists.postgresql.org; Tue, 04 Aug 2026 12:23:55 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-495635a85d2so29022455e9.0 for ; Tue, 04 Aug 2026 05:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785846232; x=1786451032; darn=lists.postgresql.org; h=in-reply-to:references:to:from:subject:message-id:date:content-type :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/5SwC1Q1tRllzrpGXid9nOoPttyBRjdZQQxq2COYpn8=; b=otHlKsyyRTculFRSeLafC2erJDAKx4qA0yMF2vyZGKrsyGgCznpP6bMtbCFCG8H7JO taUCp9ZbTaePnLQ+psu7FxRaQyKsj7ehh5D6v88Izm5HoNNNasB+aJsNyDipIoBMwLXU ZcbTaU7GkA1eL5Ey58Or//D6/GMoZDSbwXA/3CgXZhJThOoLUy0bWQPvjzPu4HyqUQD8 G0h56ELFc2AzCaOrUH2pVUT9DrJaorjFKHF1BD452xXwULyzbxTkd20cyv5ALfyuTCGU OFQbjerVKnzLoFvkxVrju0LEE/KK+R75O+FOjg8kFtjabIHTyBjA9s7LpcRVFFFs9aLT tRZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785846232; x=1786451032; h=in-reply-to:references:to:from:subject:message-id:date:content-type :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to:content-type; bh=/5SwC1Q1tRllzrpGXid9nOoPttyBRjdZQQxq2COYpn8=; b=hSjgpwnkOa5z7Lyq34eSANl++0CTj5OPcMj3CPIt7Ca7CvsKgVgPRvA8XjvJRIzMP4 ZpRjPZQswTNHR9R6ujNrZY2iMZ5Mfe1IF3JiituklwvAts5820o+VsWjA/5/f4tHUABh li/7UrHlyd37rJCDT77f8eaUeIBj3xfzMG2fp1tSBub4Ah3QNrhJatCid23deW2SXl6r 8SWTkffnQxETVIo7YR7a/sB/RW+3usjIzRlr2Pr0poADvwc1WI3Jzt6+ll8UnbbCfKwR TI3C7bbljHnYI424Tm1DKy4z9dy1Wqir0Ki7ttZ4IY6S/qQSIfxKW0h2P/z+yZO0ZtKn W1DA== X-Forwarded-Encrypted: i=1; AHgh+Rq5UjX38aKz10IvZX4fs6fki4e/r4yYMGC+qrN2a2yvkjHLulOsurBx7faoCJB4PqxKdIg0FXxe7vomlDp+@lists.postgresql.org X-Gm-Message-State: AOJu0Yyra/yF/JJZrunT+A4XDVk6QYdos2qt/DT8lY3LDSVm/puldKXe iuGt5Xy9aAev1drHGe1JtInjnayZuG82uE9DEV3Cl/mZsKSVkGkNYIfIUyLiFA== X-Gm-Gg: AR+sD13R8KSeG1oJfxlqjCT7jLG+chLGjTxBT5jUx/yA4/WojZVGMDTCz9ZCNdCZs2R zU6yjlx3iCraZk5AWJXAh105h7qyY3Xw05I/DNYa7g5SUmDG+v/2HS6W63pD81CJnu4/equVhoB FOg2L+ilRI723+lkb3qFg1bzKgZO25ge0FhtWhC9M1a1GRIZ//Kt3mZjK0KFWqEpW+Dr+aCD7/3 bdayUATeqodK7r5Mi2eAwOzbPPYCyX9R79FuZp9/6rOATT6DkKWvp3NqcE2GTM6GhuzYeFYnS92 dLkpqCHoDJ70p6aJ3hyXPDY0mwaLSr6kh5W35yMDIA5tfHFlsqsbDyYKcckh33INQVTyMPs3XSz thldqQvwdMN6kR4lzqPM/qEbw6ZBgmYFZeXNY0duQJBI8/0RPVdmwRxeJpwqdPIn5ZOVQ7fEqjK 8Z10+cFdFfmw/glH33SSIkVKxvaZqXsR4K8pC2oCa4s6sEbxlwHtvMK3ovCqMARlWbvh+/OWtj8 DzQWHkaxQcXIUwCD4TmkI6IF+I5 X-Received: by 2002:a05:600c:608e:b0:493:f140:c3fb with SMTP id 5b1f17b1804b1-4980c64a978mr411867505e9.7.1785846231979; Tue, 04 Aug 2026 05:23:51 -0700 (PDT) Received: from localhost ([85.195.242.240]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49949fcb0c5sm76267475e9.4.2026.08.04.05.23.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Aug 2026 05:23:51 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 04 Aug 2026 14:23:51 +0200 Message-Id: Subject: Re: Fix ALTER COLUMN ... DROP EXPRESSSION with subpartitions From: "Alberto Piai" To: =?utf-8?q?=C3=81lvaro_Herrera?= , X-Mailer: aerc 0.21.0 References: In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue Aug 4, 2026 at 9:26 AM CEST, =C3=81lvaro 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. >>=20 >> 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 --=20 Alberto Piai Sensational AG Z=C3=BCrich, Switzerland