From 3e6b0c472942e9a73e0fc10659dce2cba56959a7 Mon Sep 17 00:00:00 2001 From: Etsuro Fujita Date: Fri, 5 Apr 2019 20:55:06 +0900 Subject: [PATCH] Doc: Update documentation on partitioning vs. foreign tables. 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.5f8m3n0x@frv53.fwdcdn.com --- doc/src/sgml/ref/alter_table.sgml | 4 ++++ doc/src/sgml/ref/create_foreign_table.sgml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index e360728c025..49b081aad29 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -842,6 +842,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 + .) diff --git a/doc/src/sgml/ref/create_foreign_table.sgml b/doc/src/sgml/ref/create_foreign_table.sgml index 65ba3e3d373..6b15726517e 100644 --- a/doc/src/sgml/ref/create_foreign_table.sgml +++ b/doc/src/sgml/ref/create_foreign_table.sgml @@ -169,6 +169,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.)