aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁlvaro Herrera <alvherre@alvh.no-ip.org>2024-11-07 14:06:24 +0100
committerÁlvaro Herrera <alvherre@alvh.no-ip.org>2024-11-07 14:06:24 +0100
commit344ac149cfdfc1efe1608f46f40f05f4af91c8eb (patch)
tree7aab2fbdfbfec6e1ba4c093610d0d80ed6b7f417
parent0b022ddf3e30c292a5246150492af15590e7f477 (diff)
downloadpostgresql-344ac149cfdfc1efe1608f46f40f05f4af91c8eb.tar.gz
postgresql-344ac149cfdfc1efe1608f46f40f05f4af91c8eb.zip
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
-rw-r--r--doc/src/sgml/ref/alter_table.sgml10
1 files changed, 4 insertions, 6 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 906a4dd3e94..b224cab0c70 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -948,20 +948,18 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
<para>
A partition using <literal>FOR VALUES</literal> uses same syntax for
<replaceable class="parameter">partition_bound_spec</replaceable> as
- <link linkend="sql-createtable"><command>CREATE TABLE</command></link>. The partition bound specification
+ <link linkend="sql-createtable"><command>CREATE TABLE</command></link>.
+ 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 <literal>NOT NULL</literal> and
- <literal>CHECK</literal> constraints of the target table. Currently
+ <literal>CHECK</literal> constraints of the target table, not marked
+ <literal>NO INHERIT</literal>. Currently
<literal>FOREIGN KEY</literal> constraints are not considered.
<literal>UNIQUE</literal> and <literal>PRIMARY KEY</literal> constraints
from the parent table will be created in the partition, if they don't
already exist.
- If any of the <literal>CHECK</literal> constraints of the table being
- attached are marked <literal>NO INHERIT</literal>, the command will fail;
- such constraints must be recreated without the
- <literal>NO INHERIT</literal> clause.
</para>
<para>