Doc: Update documentation on partitioning vs. foreign tables.
authorEtsuro Fujita
Fri, 5 Apr 2019 11:55:07 +0000 (20:55 +0900)
committerEtsuro Fujita
Fri, 5 Apr 2019 11:55:07 +0000 (20:55 +0900)
The limitations that it is not allowed to create/attach a foreign table
as a partition of an indexed partitioned table were not documented.

Reported-By: Stepan Yankevych
Author: Etsuro Fujita
Reviewed-By: Amit Langote
Backpatch-through: 11 where partitioned index was introduced
Discussion: https://postgr.es/m/1553869152.858391073[email protected]

doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/ref/create_foreign_table.sgml

index f13a6cd944df57278fc289fa79425a649675f032..51b5bf91d8ee5236f6f6f234283b8cfc69a04aa9 100644 (file)
@@ -859,6 +859,10 @@ WITH ( MODULUS numeric_literal, REM
       one will be created in the attached table; or, if an equivalent
       index already exists, will be attached to the target table's index,
       as if ALTER INDEX ATTACH PARTITION had been executed.
+      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 indexes on the target table.  (See also
+      .)
      
 
      
index 19eb5341e7da94b1c0bb10d8ee7e189fe1cb6fd6..53f86f96f9c3e1234aaf889846642fe874ee6863 100644 (file)
@@ -168,6 +168,10 @@ CHECK ( expression ) [ NO INHERIT ]
       the given parent table with specified partition bound values.
       See the similar form of
        for more details.
+      Note that it is currently not allowed to create the foreign table as a
+      partition of the parent table if there are indexes on the parent table.
+      (See also
+      ALTER TABLE ATTACH PARTITION.)