diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-04-21 17:14:18 -0400 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-04-21 17:14:18 -0400 |
commit | cda02408f20dda90dfe4eb8b6a1adf053afe7446 (patch) | |
tree | 01c12bf2202d768b72008473bd7d844e2750f90a | |
parent | 5a4efd100ad48d7fd876ce1bc283ad56560039e0 (diff) | |
download | postgresql-cda02408f20dda90dfe4eb8b6a1adf053afe7446.tar.gz postgresql-cda02408f20dda90dfe4eb8b6a1adf053afe7446.zip |
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
-rw-r--r-- | doc/src/sgml/ref/alter_table.sgml | 9 | ||||
-rw-r--r-- | doc/src/sgml/ref/create_table.sgml | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 606e0be8a90..8dfed4f557b 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -849,7 +849,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM Note that if the existing table is a foreign table, it is currently not allowed to attach the table as a partition of the target table if there are <literal>UNIQUE</literal> indexes on the target table. (See also - <xref linkend="sql-createforeigntable"/>.) + <xref linkend="sql-createforeigntable"/>.) For each user-defined + row-level trigger that exists in the target table, a corresponding one + is created in the attached table. </para> <para> @@ -918,10 +920,11 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM <term><literal>DETACH PARTITION</literal> <replaceable class="parameter">partition_name</replaceable></term> <listitem> <para> - This form detaches specified partition of the target table. The detached + This form detaches the specified partition of the target table. The detached partition continues to exist as a standalone table, but no longer has any ties to the table from which it was detached. Any indexes that were - attached to the target table's indexes are detached. + attached to the target table's indexes are detached. Any triggers that + were created as clones of those in the target table are removed. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 8b0dd50d365..d6f9f21c2bf 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -399,7 +399,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM Creates the table as a <firstterm>partition</firstterm> of the specified parent table. The table can be created either as a partition for specific values using <literal>FOR VALUES</literal> or as a default partition - using <literal>DEFAULT</literal>. + using <literal>DEFAULT</literal>. Any indexes, constraints and + user-defined row-level triggers that exist in the parent table are cloned + on the new partition. </para> <para> |