1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-17 17:02:08 +03:00

postgres_fdw: Teach IMPORT FOREIGN SCHEMA about partitioning.

Don't import partitions.  Do import partitioned tables which are
not themselves partitions.

Report by Stephen Frost.  Design and patch by Michael Paquier,
reviewed by Amit Langote.  Documentation revised by me.

Discussion: http://postgr.es/m/20170309141531.GD9812@tamriel.snowman.net
This commit is contained in:
Robert Haas
2017-03-31 15:01:35 -04:00
parent e306df7f9c
commit f49bcd4ef3
4 changed files with 55 additions and 5 deletions

View File

@ -425,6 +425,16 @@
For more detail about the treatment of <literal>CHECK</> constraints on
foreign tables, see <xref linkend="sql-createforeigntable">.
</para>
<para>
Tables or foreign tables which are partitions of some other table are
automatically excluded. Partitioned tables are imported, unless they
are a partition of some other table. Since all data can be accessed
through the partitioned table which is the root of the partitioning
hierarchy, this approach should allow access to all the data without
creating extra objects.
</para>
</sect3>
</sect2>