Documentation updates for direct foreign table modification
Hi,
* Commit 7086be6e3 should have documented the limitation that the
direct modification is disabled when WCO constraints are present, but
didn't, which is definitely my fault.
* Commit fc22b6623 should have documented the limitation that the
direct modification is disabled when generated columns are defined,
but didn't.
Attached is a patch for updating the documentation.
Best regards,
Etsuro Fujita
Attachments:
Update-fdw-documetation.patchapplication/octet-stream; name=Update-fdw-documetation.patchDownload
diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml
index 27b94fb611..fee434491f 100644
--- a/doc/src/sgml/fdwhandler.sgml
+++ b/doc/src/sgml/fdwhandler.sgml
@@ -820,9 +820,11 @@ IsForeignRelUpdatable(Relation rel);
row-by-row approach is necessary, but it can be inefficient. If it is
possible for the foreign server to determine which rows should be
modified without actually retrieving them, and if there are no local
- triggers which would affect the operation, then it is possible to
- arrange things so that the entire operation is performed on the remote
- server. The interfaces described below make this possible.
+ structures which would affect the operation (row-level local triggers,
+ stored generated columns, or <literal>WITH CHECK OPTION</literal>
+ constraints from parent views), then it is possible to arrange things so
+ that the entire operation is performed on the remote server. The
+ interfaces described below make this possible.
</para>
<para>
diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index e9ce39af64..634a7141ef 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -504,9 +504,9 @@
sending the whole query to the remote server if there are no query
<literal>WHERE</literal> clauses that cannot be sent to the remote server,
no local joins for the query, no row-level local <literal>BEFORE</literal> or
- <literal>AFTER</literal> triggers on the target table, and no
- <literal>CHECK OPTION</literal> constraints from parent views.
- In <command>UPDATE</command>,
+ <literal>AFTER</literal> triggers or stored generated columns on the target
+ table, and no <literal>CHECK OPTION</literal> constraints from parent
+ views. In <command>UPDATE</command>,
expressions to assign to target columns must use only built-in data types,
<literal>IMMUTABLE</literal> operators, or <literal>IMMUTABLE</literal> functions,
to reduce the risk of misexecution of the query.
On Tue, Sep 17, 2019 at 3:45 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
* Commit 7086be6e3 should have documented the limitation that the
direct modification is disabled when WCO constraints are present, but
didn't, which is definitely my fault.* Commit fc22b6623 should have documented the limitation that the
direct modification is disabled when generated columns are defined,
but didn't.Attached is a patch for updating the documentation.
Committed.
Best regards,
Etsuro Fujita