summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorRobert Haas2017-07-24 19:57:24 +0000
committerRobert Haas2017-07-24 20:24:42 +0000
commit971faefc240bf214076e529773c7ca690c5e053d (patch)
treeb57f7f48946c2753aa7027f86028eb2dfec9e740 /doc/src
parent3a07ba128581dac2f5e6b3eb0b568e2cb09dba33 (diff)
When WCOs are present, disable direct foreign table modification.
If the user modifies a view that has CHECK OPTIONs and this gets translated into a modification to an underlying relation which happens to be a foreign table, the check options should be enforced. In the normal code path, that was happening properly, but it was not working properly for "direct" modification because the whole operation gets pushed to the remote side in that case and we never have an option to enforce the constraint against individual tuples. Fix by disabling direct modification when there is a need to enforce CHECK OPTIONs. Etsuro Fujita, reviewed by Kyotaro Horiguchi and by me. Discussion: http://postgr.es/m/f8a48f54-6f02-9c8a-5250-9791603171ee@lab.ntt.co.jp
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/postgres-fdw.sgml6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index b31f3731e49..a6c56d1f634 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -488,8 +488,10 @@
<filename>postgres_fdw</> attempts to optimize the query execution by
sending the whole query to the remote server if there are no query
<literal>WHERE</> clauses that cannot be sent to the remote server,
- no local joins for the query, and no row-level local <literal>BEFORE</> or
- <literal>AFTER</> triggers on the target table. In <command>UPDATE</>,
+ no local joins for the query, no row-level local <literal>BEFORE</> or
+ <literal>AFTER</> triggers on the target table, and no
+ <literal>CHECK OPTION</> constraints from parent views.
+ In <command>UPDATE</>,
expressions to assign to target columns must use only built-in data types,
<literal>IMMUTABLE</> operators, or <literal>IMMUTABLE</> functions,
to reduce the risk of misexecution of the query.