1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-25 12:03:53 +03:00

Fix documentation on partitioning vs. foreign tables

1. The PARTITION OF clause of CREATE FOREIGN TABLE was not explained in
   the CREATE FOREIGN TABLE reference page.  Add it.
   (Postgres 10 onwards)

2. The limitation that tuple routing cannot target partitions that are
   foreign tables was not documented clearly enough.  Improve wording.
   (Postgres 10 onwards)

3. The UPDATE tuple re-routing concurrency behavior was explained in
   the DDL chapter, which doesn't seem the right place.  Move it to the
   UPDATE reference page instead.  (Postgres 11 onwards).

Authors: Amit Langote, David Rowley.
Reviewed-by: Etsuro Fujita.
Reported-by: Derek Hans
Discussion: https://postgr.es/m/CAGrP7a3Xc1Qy_B2WJcgAD8uQTS_NDcJn06O5mtS_Ne1nYhBsyw@mail.gmail.com
This commit is contained in:
Alvaro Herrera
2019-03-10 19:45:29 -03:00
parent bc2232f2f5
commit b16f8a2905
3 changed files with 42 additions and 28 deletions

View File

@@ -160,6 +160,18 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ]
</listitem>
</varlistentry>
<varlistentry>
<term><literal>PARTITION OF <replaceable>parent_table</replaceable> FOR VALUES <replaceable class="parameter">partition_bound_spec</replaceable></literal></term>
<listitem>
<para>
This form can be used to create the foreign table as partition of
the given parent table with specified partition bound values.
See the similar form of
<xref linkend="sql-createtable"/> for more details.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>CONSTRAINT <replaceable class="parameter">constraint_name</replaceable></literal></term>
<listitem>
@@ -308,6 +320,12 @@ CHECK ( <replaceable class="parameter">expression</replaceable> ) [ NO INHERIT ]
responsibility to ensure that the constraint definition matches
reality.
</para>
<para>
While rows can be moved from local partitions to a foreign-table partition
(provided the foreign data wrapper supports tuple routing), they cannot be
moved from a foreign-table partition to another partition.
</para>
</refsect1>
<refsect1 id="sql-createforeigntable-examples">