From 19f0a7ec08bf6a95dd3af6742f7be7bf000acde1 Mon Sep 17 00:00:00 2001
From: "David G. Johnston" <David.G.Johnston@Gmail.com>
Date: Wed, 7 Jan 2026 14:53:50 -0700
Subject: [PATCH 2/2] doc Clarify ALTER TABLE edits

---
 doc/src/sgml/ref/alter_table.sgml | 144 +++++++++++++-----------------
 1 file changed, 62 insertions(+), 82 deletions(-)

diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index b1190fae968..75a26087eb6 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -173,7 +173,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       When applied to a partitioned table, the column is added to the
-      partitioned table definition and is implicitly present in all
+      partitioned table definition and is implicitly added to all
       partitions. Specifying <literal>ONLY</literal> is not allowed, and
       this command cannot be used on individual partitions.
      </para>
@@ -232,9 +232,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       When applied to a partitioned table, the data type change is applied
-      to the partitioned table definition and affects all partitions.
-      Specifying <literal>ONLY</literal> is not allowed, and this command
-      cannot be used on individual partitions.
+      to the partitioned table definition and is implicitly applied to all
+      partitions. Specifying <literal>ONLY</literal> is not allowed,
+      and this command cannot be used on individual partitions.
      </para>
     </listitem>
    </varlistentry>
@@ -251,10 +251,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       When applied to a partitioned table, the default value is propagated
-      to all existing partitions unless <literal>ONLY</literal> is specified.
-      New partitions created afterwards inherit the default from the
-      partitioned table, but individual partitions may define a different
-      default.
+      to all partitions unless <literal>ONLY</literal> is specified.
+      Newly created partitions inherit the default from the partitioned table
+      unless they define a different default.
      </para>
     </listitem>
    </varlistentry>
@@ -289,8 +288,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       children can disallow nulls even if the parent allows them, but not
       the other way around. It is also possible to apply
       <literal>SET NOT NULL</literal> or <literal>DROP NOT NULL</literal> to
-      <literal>ONLY</literal> the parent table, which does not affect the
-      children.
+      <literal>ONLY</literal> the parent table.
      </para>
     </listitem>
    </varlistentry>
@@ -313,10 +311,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       When applied to a partitioned table, the generation expression is
-      propagated to all existing partitions unless <literal>ONLY</literal>
-      is specified. New partitions created afterwards inherit the
-      expression from the partitioned table, while individual partitions
-      may define a different expression.
+      propagated to all partitions unless <literal>ONLY</literal>
+      is specified. Newly created partitions inherit the expression from the
+      partitioned table unless they define a different expression.
      </para>
     </listitem>
    </varlistentry>
@@ -368,7 +365,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       When applied to a partitioned table, the identity property is defined
-      on the partitioned table definition and applies to all partitions.
+      on the partitioned table and is applied to all partitions.
       Specifying <literal>ONLY</literal> is not allowed, and these forms
       cannot be used on individual partitions.
      </para>
@@ -388,7 +385,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      <para>
       When applied to a partitioned table, these forms alter the sequence
       associated with the identity column on the partitioned table
-      definition and affect all partitions. Specifying <literal>ONLY</literal>
+      and all individual partitions. Specifying <literal>ONLY</literal>
       is not allowed, and these forms cannot be used on individual
       partitions.
      </para>
@@ -456,11 +453,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       <literal>SHARE UPDATE EXCLUSIVE</literal> lock.
      </para>
      <para>
-      For partitioned tables, these forms can be applied independently to
-      the partitioned table and to individual partitions. Changes made to
-      the partitioned table do not propagate to existing partitions, and
-      partitions created afterwards do not inherit the setting.
-      Specifying <literal>ONLY</literal> is allowed but has no effect.
+      For partitioned tables, these forms must be applied separately to
+      the partitioned table and/or to individual partitions.
+      Newly created partitions do not inherit their attribute options from the
+      partitioned table.
      </para>
     </listitem>
    </varlistentry>
@@ -499,9 +495,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      <para>
       When applied to a partitioned table, the storage setting is propagated
       to all existing partitions unless <literal>ONLY</literal> is specified.
-      New partitions created afterwards inherit the setting from the
-      partitioned table, while individual partitions may use a different
-      storage setting.
+      Newly created partitions inherit the setting from the partitioned table
+      unless they define a different storage setting.
      </para>
     </listitem>
    </varlistentry>
@@ -534,12 +529,11 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       at the time of data insertion to determine the method to use.
      </para>
      <para>
-      When applied to a partitioned table, the compression setting is applied
-      to the partitioned table definition and does not propagate to existing
-      partitions. New partitions created afterwards inherit the setting from
-      the partitioned table, while individual partitions may use a different
-      compression method. Specifying <literal>ONLY</literal> is allowed but has
-      no effect.
+      When applied to a partitioned table, the compression method must be
+      applied separately to the partitioned table and/or to individual partitions.
+      Specifying <literal>ONLY</literal> is allowed but has no effect.
+      However, newly created partitions inherit the compression method from the
+      partitioned table unless they define a different compression method.
      </para>
     </listitem>
    </varlistentry>
@@ -584,9 +578,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       When applied to a partitioned table, the constraint is added to the
-      partitioned table and is automatically applied to all partitions.
-      Specifying <literal>ONLY</literal> is not allowed. New partitions
-      created afterwards inherit the constraint from the partitioned table.
+      partitioned table and is implicitly added to all partitions.
+      Specifying <literal>ONLY</literal> is not allowed.
+      Newly created partitions inherit constraints from the partitioned table.
      </para>
     </listitem>
    </varlistentry>
@@ -627,7 +621,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       This form is not supported on partitioned tables, but can be used on
-      individual (leaf) partitions.
+      individual partitions.
      </para>
      <note>
       <para>
@@ -651,7 +645,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       When applied to a partitioned table, the constraint is altered on the
-      partitioned table definition and the change applies to all partitions.
+      partitioned table definition is implicitly applied to all partitions.
       Specifying <literal>ONLY</literal> is not allowed, and this command
       cannot be used on individual partitions.
      </para>
@@ -676,7 +670,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       These forms are not supported on partitioned tables, but can be used
-      on individual (leaf) partitions.
+      on individual partitions.
      </para>
      </listitem>
     </varlistentry>
@@ -717,9 +711,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      <para>
       When applied to a partitioned table, the constraint is dropped from
       all existing partitions unless <literal>ONLY</literal> is specified.
-      New partitions created afterwards do not include the dropped
-      constraint, while individual partitions may drop the constraint
-      independently of the partitioned table.
+      Individual partitions may drop constraints independently of the
+      partitioned table.
      </para>
     </listitem>
    </varlistentry>
@@ -793,11 +786,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       described above.
      </para>
      <para>
-      For partitioned tables, these forms can be applied independently to
-      the partitioned table and to individual partitions. Changes made to
-      the partitioned table do not propagate to existing partitions, and
-      partitions created afterwards do not inherit the setting.
-      Specifying <literal>ONLY</literal> is allowed but has no effect.
+      For partitioned tables, these forms must be applied separately to
+      the partitioned table and/or to individual partitions.
+      Newly created partitions do not inherit the setting from the
+      partitioned table.
      </para>
     </listitem>
    </varlistentry>
@@ -815,11 +807,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       <link linkend="sql-createpolicy"><command>CREATE POLICY</command></link>.
      </para>
      <para>
-      For partitioned tables, these forms can be applied independently to
-      the partitioned table and to individual partitions. Changes made to
-      the partitioned table do not propagate to existing partitions, and
-      partitions created afterwards do not inherit the setting.
-      Specifying <literal>ONLY</literal> is allowed but has no effect.
+      For partitioned tables, these forms must be applied separately to
+      the partitioned table and/or to individual partitions.
+      Newly created partitions do not inherit the setting from the
+      partitioned table.
      </para>
     </listitem>
    </varlistentry>
@@ -837,11 +828,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       <link linkend="sql-createpolicy"><command>CREATE POLICY</command></link>.
      </para>
      <para>
-      For partitioned tables, these forms can be applied independently to
-      the partitioned table and to individual partitions. Changes made to
-      the partitioned table do not propagate to existing partitions, and
-      partitions created afterwards do not inherit the setting.
-      Specifying <literal>ONLY</literal> is allowed but has no effect.
+      For partitioned tables, these forms must be applied separately to
+      the partitioned table and/or to individual partitions.
+      Newly created partitions do not inherit the setting from the
+      partitioned table.
      </para>
     </listitem>
    </varlistentry>
@@ -859,7 +849,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       This form is not supported on partitioned tables, but can be used on
-      individual (leaf) partitions.
+      individual partitions.
      </para>
     </listitem>
    </varlistentry>
@@ -878,7 +868,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       This form is not supported on partitioned tables, but can be used on
-      individual (leaf) partitions.
+      individual partitions.
      </para>
     </listitem>
    </varlistentry>
@@ -891,12 +881,6 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       system column.  As <literal>oid</literal> system columns cannot be
       added anymore, this never has an effect.
      </para>
-     <para>
-      For partitioned tables, this form behaves the same as for regular
-      tables; it has no effect on either the partitioned table or its
-      partitions. Specifying <literal>ONLY</literal> is allowed but has no
-      effect.
-     </para>
     </listitem>
    </varlistentry>
 
@@ -972,7 +956,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       This form is not supported on partitioned tables, but can be used on
-      individual (leaf) partitions.
+      individual partitions.
      </para>
     </listitem>
    </varlistentry>
@@ -1001,7 +985,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       This form is not supported on partitioned tables, but can be used on
-      individual (leaf) partitions.
+      individual partitions.
      </para>
     </listitem>
    </varlistentry>
@@ -1016,7 +1000,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </para>
      <para>
       When applied to a partitioned table, this form is accepted but has no
-      effect. It can be used on individual (leaf) partitions, where it
+      effect.  It can be used on individual partitions, where it
       behaves as for a regular table.
      </para>
     </listitem>
@@ -1109,11 +1093,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       or foreign table to the specified user.
      </para>
      <para>
-      For partitioned tables, this form can be applied independently to the
-      partitioned table and to individual partitions. Changing the owner of
-      the partitioned table does not affect existing partitions, and
-      partitions created afterwards do not inherit the new owner.
-      Specifying <literal>ONLY</literal> is allowed but has no effect.
+      For partitioned tables, this form must be applied separately to
+      the partitioned table and/or to individual partitions.
+      Newly created partitions do not inherit their owner from the
+      partitioned table.
      </para>
     </listitem>
    </varlistentry>
@@ -1173,11 +1156,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      </variablelist></para>
 
      <para>
-      For partitioned tables, this form can be applied independently to the
-      partitioned table and to individual partitions. Changing the replica
-      identity of the partitioned table does not affect existing partitions,
-      and partitions created afterwards do not inherit the setting.
-      Specifying <literal>ONLY</literal> is allowed but has no effect.
+      For partitioned tables, this form must be applied independently to the
+      partitioned table and/or to individual partitions.
+      Newly created partitions do not inherit the setting from the
+      partitioned table.
      </para>
     </listitem>
    </varlistentry>
@@ -1196,8 +1178,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      <para>
       For partitioned tables, this form behaves the same as for regular
       tables. Renaming a partitioned table, column, or constraint does not
-      propagate to partitions, and <literal>ONLY</literal> can be specified
-      but has no effect.
+      propagate to partitions.
      </para>
     </listitem>
    </varlistentry>
@@ -1210,11 +1191,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       constraints, and sequences owned by table columns are moved as well.
      </para>
      <para>
-      For partitioned tables, this form can be applied independently to the
-      partitioned table and to individual partitions. Moving the partitioned
-      table to another schema does not affect existing partitions, and
-      partitions created afterwards do not inherit the new schema.
-      Specifying <literal>ONLY</literal> is allowed but has no effect.
+      For partitioned tables, this form must be applied independently to the
+      partitioned table and/or to individual partitions.
+      Newly created partitions do not inherit their schema from the
+      partitioned table.
      </para>
     </listitem>
    </varlistentry>
-- 
2.34.1

