Skip to content

Commit 97dcd5c

Browse files
committed
Document partitiong tables ancillary object handling some more
Add a couple of lines to make it explicit that indexes, constraints, triggers are added, removed, or left alone. Backpatch to pg11. Author: Álvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/20200421162038.GA18628@alvherre.pgsql
1 parent 56259c3 commit 97dcd5c

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

doc/src/sgml/ref/alter_table.sgml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
864864
Note that if the existing table is a foreign table, it is currently not
865865
allowed to attach the table as a partition of the target table if there
866866
are <literal>UNIQUE</literal> indexes on the target table. (See also
867-
<xref linkend="sql-createforeigntable"/>.)
867+
<xref linkend="sql-createforeigntable"/>.) For each user-defined
868+
row-level trigger that exists in the target table, a corresponding one
869+
is created in the attached table.
868870
</para>
869871

870872
<para>
@@ -926,10 +928,11 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
926928
<term><literal>DETACH PARTITION</literal> <replaceable class="parameter">partition_name</replaceable></term>
927929
<listitem>
928930
<para>
929-
This form detaches specified partition of the target table. The detached
931+
This form detaches the specified partition of the target table. The detached
930932
partition continues to exist as a standalone table, but no longer has any
931933
ties to the table from which it was detached. Any indexes that were
932-
attached to the target table's indexes are detached.
934+
attached to the target table's indexes are detached. Any triggers that
935+
were created as clones of those in the target table are removed.
933936
</para>
934937
</listitem>
935938
</varlistentry>

doc/src/sgml/ref/create_table.sgml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
397397
Creates the table as a <firstterm>partition</firstterm> of the specified
398398
parent table. The table can be created either as a partition for specific
399399
values using <literal>FOR VALUES</literal> or as a default partition
400-
using <literal>DEFAULT</literal>.
400+
using <literal>DEFAULT</literal>. Any indexes, constraints and
401+
user-defined row-level triggers that exist in the parent table are cloned
402+
on the new partition.
401403
</para>
402404

403405
<para>

0 commit comments

Comments
 (0)