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 1vkEKq-00C69H-25 for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Jan 2026 04:36:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vkEKp-006IE9-2M for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Jan 2026 04:36:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkEKp-006IDy-0f for pgsql-hackers@lists.postgresql.org; Mon, 26 Jan 2026 04:36:19 +0000 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vkEKm-002KZG-1g for pgsql-hackers@lists.postgresql.org; Mon, 26 Jan 2026 04:36:18 +0000 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-661106487f9so4669763eaf.3 for ; Sun, 25 Jan 2026 20:36:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769402176; cv=none; d=google.com; s=arc-20240605; b=QQW90c6Lc2Gapf18/1lLZYJiCRJJtO0u+Bm5XffpKkpb3n9u0jeZNEvn7bDsbmxVfY 9PYZLaHuV10EZjzsRJbDGNLFKswsyxz2Lc9skXtq50GrIaQyWvbgwbEnXCqA9ZKYSJHk O+WBBiR5GJ00OqrSwY3b3cSH01Sunn02jImKzPF7Y0TyIx553X4ase5E0yv0h9aaTHC3 +LNhjnXuLHit4UB5jnwu0f5FhPa5NTlSDCMw9cBzD33bZBJyDTxsJbe4ihwNjpHGY1gn BoCXsfq7/PxtUKsS173hAH4jh7S/gXzO6e0kG+EHLarZrqEuvqKML8K0BKBJaE230dVr WkrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:dkim-signature; bh=HGIAVT/76cvYUIvDg+yHpr5heZLcHc9l+21KFcEX/Ik=; fh=I5K9GI9DJG40fg1WpDnFXnHi3/fvMJcsBUUmnsgnm1E=; b=iNirrB7O8OnPx+pGxRTd7HKyaXwj3JusQn2YquR/drfjAr93WOSQcOkJc6JEwTyLBV X6J3lyhnLzl3oENpit9fxEJ/b09aHuKClKulmm28Oy16jEtS9JEFdHbluurWR/XQIgWm pUEFLS5ZTFWx9Aee0r5PIYwo7Ia4AYU3SlCX4bgt63bpsO3VS4lbeqQUxPPnlfS8RkZn Pig13w5W/hwS1OdufFFWxLhhkUbKvhanZYGJ9OjQf8ZHBcPHjRGwYSR9peuW2zRKCgv0 y4s/4HbjY/czO0+5OdyjvnjvLONJYUp2/cYEXCG6vUoVQFrqm20uKJTwz7kryDYhoDuj zy9A==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769402176; x=1770006976; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=HGIAVT/76cvYUIvDg+yHpr5heZLcHc9l+21KFcEX/Ik=; b=hAz1sCRarUBlqb+EtQ19BiLj/V9C85seeM3dHCl7+J17SS+cMRGMcDV2PlbScZ3j26 3zJWvBs2pZwBlzLRLp41TWnWydQaLWb6Oh4sD6hQ1JfbaVcqy7aGx4TXKX5V7V/DRsa/ ipiH2bknaabNJTwusiHAG+YZ6m/TMsHUMHPbkVM00X4gYXDoEWFjIWaU0T2/O2AqsmBS ldeCJ1GFtp4aBDaFQrHeggPAoei+oa1NQW0u7kNHPrUzqnYXh0fAbML+q2uADbAHTGoN 5OhzqWHn8kC3UDV8zZ9oJHGTGzXkvUjeoPt3ijpQz9QZSsj7mWLkUIMroe9bEcdzf6Gv Z0Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769402176; x=1770006976; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HGIAVT/76cvYUIvDg+yHpr5heZLcHc9l+21KFcEX/Ik=; b=te9pq2IC3usaAE0dOlY3uLruwvZvJfSHGV14AuvZoEmJFM9Mo6DJYi71/YilNWII1v NNMKwAt7d/NSNL+WTr1qV+cFW2AUPMY9jlDhgcQyK36AqdemIHSrn1pWsdUyhKQIZNHs Fps+J303bCb9okFgZ3I80HEPxHKz5U2Q5Dnunq2WbHq/pnWMCkblligtLPG11mpAJlMt hSGiEuFEM7wePqgdYLhbwa+XqUP0racdMy79wLBTQo0lhUqeb53XSIvwhMCj60TSERTo kOP2DA03msxhIcL2kWH45d74vueyX9pxi9wO85cO21helRAnwCoCOJBhJ640A8tNslEM iq3Q== X-Gm-Message-State: AOJu0YwdsLhkLmMD3r8wkPWbg0hSExmmir815nB14pH0guON/LK9fexI aZhZo0g/9E7tQp1lYVZv9ZinyfyjuJVfQYE/XNy5d5Lt0KOZUMOsWbv5GG7uWS4UfyZYrpqIDXW 1qZJCrrdlB0Srj7AzBM77Y1LzRvMbJJQ= X-Gm-Gg: AZuq6aKQhCcPmuCrQk7phX2LZtS8F+Zk1w0itzWZqzc9wfjq4SonpkDiV5vBEv3dUAS e5N9Glb7gs+p0I6ywzOBQ8IXGbq+aKbo3V8BmhJqqw6z+42HkESR7jwAeohU0J4CeHHc90qNjJg XsL8OvXdxyXkLgKwEd7ukDU0z5ufUEXoohSa3YeHoJMOB5LryK71vFJEGYn5fMDux8CIqy6PEi7 JO6UJ3fGia+Q/XOjRsfmFESRBYi4m8/FB8lxjJXfKmDtZin8LLNaNrcCpMRQ5sQuLFUdBUb X-Received: by 2002:a05:6820:1689:b0:661:26:a208 with SMTP id 006d021491bc7-662e03e56bdmr1894556eaf.37.1769402176446; Sun, 25 Jan 2026 20:36:16 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a8a:5ef:0:b0:619:b970:e659 with HTTP; Sun, 25 Jan 2026 20:36:15 -0800 (PST) In-Reply-To: References: <90F9169D-135C-45E5-8221-4F79DAED98E2@gmail.com> <46DA7611-C18D-4782-AEFF-F861ECDEFA5C@gmail.com> <245AA9F3-7577-46D6-990C-C308A9F36E82@gmail.com> From: "David G. Johnston" Date: Sun, 25 Jan 2026 21:36:15 -0700 X-Gm-Features: AZwV_QhPfgzzZRwvcef11iLcXikpx7Ccgp6DD3JsOrF1IC6ffAZALlJ8YI4b3wM Message-ID: Subject: Re: docs: clarify ALTER TABLE behavior on partitioned tables To: Chao Li Cc: Postgres hackers , Zsolt Parragi , Amit Kapila Content-Type: multipart/alternative; boundary="0000000000003123a00649430ca4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003123a00649430ca4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sunday, January 25, 2026, Chao Li wrote: > > > > > When applied to a partitioned table, partition columns and > constraints > > are implicitly renamed. > > Specifying ONLY is not allowed, and this comma= nd > > cannot be used on individual partitions. > > > > But for "Specifying ONLY is not allowed, and this > command, cannot be used on individual partitions.=E2=80=9D, that doesn=E2= =80=99t seem > correct. See my test: > ``` > evantest=3D# create table root (i int, j int) partition by list(i); > CREATE TABLE > evantest=3D# create table p1 partition of root for values in (1); > CREATE TABLE > evantest=3D# alter table p1 rename to pp1; <=3D=3D Rename a partition is = allowed. > ALTER TABLE > evantest=3D# alter table only pp1 rename to p1; <=3D=3D ONLY can be used,= but > just no effect > ALTER TABLE > ``` > I was mentally restricting the second sentence about ONLY to the column and constraints renaming action, which are called out by the first sentence. It makes little sense to talk about renaming the table, parent or child, here in the context of ONLY. It goes without mention that table renaming never cascades. Only is implied for that action, even if only should just be considered valid on a parent in any case. But I=E2=80=99d accept a sentence like: =E2=80=9CTable renames always only = apply to the named table.=E2=80=9D Added to that paragraph; it=E2=80=99s a convoluted co= mmand. David J. --0000000000003123a00649430ca4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sunday, January 25, 2026, Chao Li <li.evan.chao@gmail.com> wrote:

>=C2=A0 =C2=A0 =C2=A0 <para>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0When applied to a partitioned table, partiti= on columns and constraints
>=C2=A0 =C2=A0 =C2=A0 =C2=A0are implicitly renamed.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0Specifying <literal>ONLY</literal&g= t; is not allowed, and this command
>=C2=A0 =C2=A0 =C2=A0 =C2=A0cannot be used on individual partitions.
>=C2=A0 =C2=A0 =C2=A0 </para>

But for "Specifying <literal>ONLY</literal> is not allowed= , and this command, cannot be used on individual partitions.=E2=80=9D, that= doesn=E2=80=99t seem correct. See my test:
```
evantest=3D# create table root (i int, j int) partition by list(i);
CREATE TABLE
evantest=3D# create table p1 partition of root for values in (1);
CREATE TABLE
evantest=3D# alter table p1 rename to pp1; <=3D=3D Rename a partition is= allowed.
ALTER TABLE
evantest=3D# alter table only pp1 rename to p1; <=3D=3D ONLY can be used= , but just no effect
ALTER TABLE
```

I was mentally restricting the second sent= ence about ONLY to the column and constraints renaming action, which are ca= lled out by the first sentence.=C2=A0 It makes little sense to talk about r= enaming the table, parent or child, here in the context of ONLY.=C2=A0 It g= oes without mention that table renaming never cascades.=C2=A0 Only is impli= ed for that action, even if only should just be considered valid on a paren= t in any case.

But I=E2=80=99d accept a sentence l= ike: =E2=80=9CTable renames always only apply to the named table.=E2=80=9D = Added to that paragraph; it=E2=80=99s a convoluted command.

<= /div>
David J.

--0000000000003123a00649430ca4--