Skip to content

Commit f56a01e

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 d7a2b5b commit f56a01e

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
@@ -1016,20 +1016,18 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
10161016
<para>
10171017
A partition using <literal>FOR VALUES</literal> uses same syntax for
10181018
<replaceable class="parameter">partition_bound_spec</replaceable> as
1019-
<link linkend="sql-createtable"><command>CREATE TABLE</command></link>. The partition bound specification
1019+
<link linkend="sql-createtable"><command>CREATE TABLE</command></link>.
1020+
The partition bound specification
10201021
must correspond to the partitioning strategy and partition key of the
10211022
target table. The table to be attached must have all the same columns
10221023
as the target table and no more; moreover, the column types must also
10231024
match. Also, it must have all the <literal>NOT NULL</literal> and
1024-
<literal>CHECK</literal> constraints of the target table. Currently
1025+
<literal>CHECK</literal> constraints of the target table, not marked
1026+
<literal>NO INHERIT</literal>. Currently
10251027
<literal>FOREIGN KEY</literal> constraints are not considered.
10261028
<literal>UNIQUE</literal> and <literal>PRIMARY KEY</literal> constraints
10271029
from the parent table will be created in the partition, if they don't
10281030
already exist.
1029-
If any of the <literal>CHECK</literal> constraints of the table being
1030-
attached are marked <literal>NO INHERIT</literal>, the command will fail;
1031-
such constraints must be recreated without the
1032-
<literal>NO INHERIT</literal> clause.
10331031
</para>
10341032

10351033
<para>

0 commit comments

Comments
 (0)