doc: Reword ALTER TABLE ATTACH restriction on NO INHERIT constraints
authorÁlvaro Herrera
Thu, 7 Nov 2024 13:06:24 +0000 (14:06 +0100)
committerÁlvaro Herrera
Thu, 7 Nov 2024 13:06:24 +0000 (14:06 +0100)
The previous wording is easy to read incorrectly; this change makes it
simpler, less ambiguous, and less prominent.

Backpatch to all live branches.

Reviewed-by: Amit Langote
Discussion: https://postgr.es/m/202411051201[email protected]

doc/src/sgml/ref/alter_table.sgml

index 906a4dd3e948c83c808e98e84282149f2e81e710..b224cab0c70acc639c1cdd4bf8e9af47f16f7e37 100644 (file)
@@ -948,20 +948,18 @@ WITH ( MODULUS numeric_literal, REM
      
       A partition using FOR VALUES uses same syntax for
       partition_bound_spec as
-      CREATE TABLE.  The partition bound specification
+      CREATE TABLE.
+      The partition bound specification
       must correspond to the partitioning strategy and partition key of the
       target table.  The table to be attached must have all the same columns
       as the target table and no more; moreover, the column types must also
       match.  Also, it must have all the NOT NULL and
-      CHECK constraints of the target table.  Currently
+      CHECK constraints of the target table, not marked
+      NO INHERIT.  Currently
       FOREIGN KEY constraints are not considered.
       UNIQUE and PRIMARY KEY constraints
       from the parent table will be created in the partition, if they don't
       already exist.
-      If any of the CHECK constraints of the table being
-      attached are marked NO INHERIT, the command will fail;
-      such constraints must be recreated without the
-      NO INHERIT clause.