Commit 0275ecf3 authored by Robert Haas's avatar Robert Haas

Update FDW docs to reflect existence of CHECK constraints.

Generalize the remarks previously made about NOT NULL constraints to
CHECK constraints.

Etsuro Fujita
parent 060a1224
...@@ -242,13 +242,13 @@ IterateForeignScan (ForeignScanState *node); ...@@ -242,13 +242,13 @@ IterateForeignScan (ForeignScanState *node);
<para> <para>
Note that <productname>PostgreSQL</productname>'s executor doesn't care Note that <productname>PostgreSQL</productname>'s executor doesn't care
whether the rows returned violate any <literal>NOT NULL</literal> whether the rows returned violate any constraints that were defined on
constraints that were defined on the foreign table columns &mdash; but the foreign table &mdash; but the planner does care, and may optimize
the planner does care, and may optimize queries incorrectly if queries incorrectly if there are rows visible in the foreign table that
<literal>NULL</> values are present in a column declared not to contain do not satisfy a declared constraint. If a constraint is violated when
them. If a <literal>NULL</> value is encountered when the user has the user has declared that the constraint should hold true, it may be
declared that none should be present, it may be appropriate to raise an appropriate to raise an error (just as you would need to do in the case
error (just as you would need to do in the case of a data type mismatch). of a data type mismatch).
</para> </para>
<para> <para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment