Document partitiong tables ancillary object handling some more
authorAlvaro Herrera
Tue, 21 Apr 2020 21:14:18 +0000 (17:14 -0400)
committerAlvaro Herrera
Tue, 21 Apr 2020 21:14:18 +0000 (17:14 -0400)
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 
Reviewed-by: Justin Pryzby
Discussion: https://postgr.es/m/20200421162038[email protected]

doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/ref/create_table.sgml

index 261d526f0b05d9199f7f923106b9325ba691ce58..b0e341bf202ae263990a584b5ae0aa122d5910df 100644 (file)
@@ -864,7 +864,9 @@ WITH ( MODULUS numeric_literal, 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 UNIQUE indexes on the target table.  (See also
-      .)
+      .)  For each user-defined
+      row-level trigger that exists in the target table, a corresponding one
+      is created in the attached table.
      
 
      
@@ -926,10 +928,11 @@ WITH ( MODULUS numeric_literal, REM
     DETACH PARTITION partition_name
     
      
-      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.
      
     
    
index 0b9c46ce23d99974c3d1b2dc9794895d0f012a71..b9e178834b0d08f3216ffdba58ce888296e9cb45 100644 (file)
@@ -397,7 +397,9 @@ WITH ( MODULUS numeric_literal, REM
       Creates the table as a partition of the specified
       parent table. The table can be created either as a partition for specific
       values using FOR VALUES or as a default partition
-      using DEFAULT.
+      using DEFAULT.  Any indexes, constraints and
+      user-defined row-level triggers that exist in the parent table are cloned
+      on the new partition.