Skip to content

Commit 344ac14

Browse files
committed
doc: Reword ALTER TABLE ATTACH restriction on NO INHERIT constraints
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 <amitlangote09@gmail.com> Discussion: https://postgr.es/m/202411051201.zody6mld7vkw@alvherre.pgsql
1 parent 0b022dd commit 344ac14

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

doc/src/sgml/ref/alter_table.sgml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -948,20 +948,18 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
948948
<para>
949949
A partition using <literal>FOR VALUES</literal> uses same syntax for
950950
<replaceable class="parameter">partition_bound_spec</replaceable> as
951-
<link linkend="sql-createtable"><command>CREATE TABLE</command></link>. The partition bound specification
951+
<link linkend="sql-createtable"><command>CREATE TABLE</command></link>.
952+
The partition bound specification
952953
must correspond to the partitioning strategy and partition key of the
953954
target table. The table to be attached must have all the same columns
954955
as the target table and no more; moreover, the column types must also
955956
match. Also, it must have all the <literal>NOT NULL</literal> and
956-
<literal>CHECK</literal> constraints of the target table. Currently
957+
<literal>CHECK</literal> constraints of the target table, not marked
958+
<literal>NO INHERIT</literal>. Currently
957959
<literal>FOREIGN KEY</literal> constraints are not considered.
958960
<literal>UNIQUE</literal> and <literal>PRIMARY KEY</literal> constraints
959961
from the parent table will be created in the partition, if they don't
960962
already exist.
961-
If any of the <literal>CHECK</literal> constraints of the table being
962-
attached are marked <literal>NO INHERIT</literal>, the command will fail;
963-
such constraints must be recreated without the
964-
<literal>NO INHERIT</literal> clause.
965963
</para>
966964

967965
<para>

0 commit comments

Comments
 (0)