aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtsuro Fujita <efujita@postgresql.org>2019-04-05 20:55:07 +0900
committerEtsuro Fujita <efujita@postgresql.org>2019-04-05 20:55:07 +0900
commit7338ed28e2ecaf9c8cb73e7721838cd8f07ad149 (patch)
tree5d9cf8eb35066aa6ae3272e923c0ae109d2239ff
parent392ea22e9b322d790801740f4c7540c53dddf78b (diff)
downloadpostgresql-7338ed28e2ecaf9c8cb73e7721838cd8f07ad149.tar.gz
postgresql-7338ed28e2ecaf9c8cb73e7721838cd8f07ad149.zip
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
-rw-r--r--doc/src/sgml/ref/alter_table.sgml4
-rw-r--r--doc/src/sgml/ref/create_foreign_table.sgml4
2 files changed, 8 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index f13a6cd944d..51b5bf91d8e 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -859,6 +859,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, 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 <command>ALTER INDEX ATTACH PARTITION</command> 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
+ <xref linkend="sql-createforeigntable"/>.)
</para>
<para>
diff --git a/doc/src/sgml/ref/create_foreign_table.sgml b/doc/src/sgml/ref/create_foreign_table.sgml
index 19eb5341e7d..53f86f96f9c 100644
--- a/doc/src/sgml/ref/create_foreign_table.sgml
+++ b/doc/src/sgml/ref/create_foreign_table.sgml
@@ -168,6 +168,10 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ]
the given parent table with specified partition bound values.
See the similar form of
<xref linkend="sql-createtable"/> 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
+ <link linkend="sql-altertable"><command>ALTER TABLE ATTACH PARTITION</command></link>.)
</para>
</listitem>
</varlistentry>