Skip to content

Commit e2b5693

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 8148e71 commit e2b5693

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
@@ -1010,20 +1010,18 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
10101010
<para>
10111011
A partition using <literal>FOR VALUES</literal> uses same syntax for
10121012
<replaceable class="parameter">partition_bound_spec</replaceable> as
1013-
<link linkend="sql-createtable"><command>CREATE TABLE</command></link>. The partition bound specification
1013+
<link linkend="sql-createtable"><command>CREATE TABLE</command></link>.
1014+
The partition bound specification
10141015
must correspond to the partitioning strategy and partition key of the
10151016
target table. The table to be attached must have all the same columns
10161017
as the target table and no more; moreover, the column types must also
10171018
match. Also, it must have all the <literal>NOT NULL</literal> and
1018-
<literal>CHECK</literal> constraints of the target table. Currently
1019+
<literal>CHECK</literal> constraints of the target table, not marked
1020+
<literal>NO INHERIT</literal>. Currently
10191021
<literal>FOREIGN KEY</literal> constraints are not considered.
10201022
<literal>UNIQUE</literal> and <literal>PRIMARY KEY</literal> constraints
10211023
from the parent table will be created in the partition, if they don't
10221024
already exist.
1023-
If any of the <literal>CHECK</literal> constraints of the table being
1024-
attached are marked <literal>NO INHERIT</literal>, the command will fail;
1025-
such constraints must be recreated without the
1026-
<literal>NO INHERIT</literal> clause.
10271025
</para>
10281026

10291027
<para>

0 commit comments

Comments
 (0)