@@ -743,18 +743,25 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable>
743
743
</para>
744
744
745
745
<para>
746
- A full table scan is performed on the table being attached to check that
747
- no existing row in the table violates the partition constraint. It is
748
- possible to avoid this scan by adding a valid <literal>CHECK</literal>
749
- constraint to the table that would allow only the rows satisfying the
750
- desired partition constraint before running this command. It will be
751
- determined using such a constraint that the table need not be scanned
752
- to validate the partition constraint. This does not work, however, if
753
- any of the partition keys is an expression and the partition does not
754
- accept <literal>NULL</literal> values. If attaching a list partition
755
- that will not accept <literal>NULL</literal> values, also add
756
- <literal>NOT NULL</literal> constraint to the partition key column,
757
- unless it's an expression.
746
+ If the new partition is a regular table, a full table scan is performed
747
+ to check that no existing row in the table violates the partition
748
+ constraint. It is possible to avoid this scan by adding a valid
749
+ <literal>CHECK</literal> constraint to the table that would allow only
750
+ the rows satisfying the desired partition constraint before running this
751
+ command. It will be determined using such a constraint that the table
752
+ need not be scanned to validate the partition constraint. This does not
753
+ work, however, if any of the partition keys is an expression and the
754
+ partition does not accept <literal>NULL</literal> values. If attaching
755
+ a list partition that will not accept <literal>NULL</literal> values,
756
+ also add <literal>NOT NULL</literal> constraint to the partition key
757
+ column, unless it's an expression.
758
+ </para>
759
+
760
+ <para>
761
+ If the new partition is a foreign table, nothing is done to verify
762
+ that all the rows in the foreign table obey the partition constraint.
763
+ (See the discussion in <xref linkend="SQL-CREATEFOREIGNTABLE"> about
764
+ constraints on the foreign table.)
758
765
</para>
759
766
</listitem>
760
767
</varlistentry>
0 commit comments