diff options
author | Robert Haas <rhaas@postgresql.org> | 2016-03-18 13:48:58 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2016-03-18 13:55:52 -0400 |
commit | 0bf3ae88af330496517722e391e7c975e6bad219 (patch) | |
tree | 46220c3ebfc9616af8d683c74395b18045c59a8a /doc/src/sgml/postgres-fdw.sgml | |
parent | 3422fecccadb021b7b4cdbc73b2c29f66f031761 (diff) |
Directly modify foreign tables.
postgres_fdw can now sent an UPDATE or DELETE statement directly to
the foreign server in simple cases, rather than sending a SELECT FOR
UPDATE statement and then updating or deleting rows one-by-one.
Etsuro Fujita, reviewed by Rushabh Lathia, Shigeru Hanada, Kyotaro
Horiguchi, Albe Laurenz, Thom Brown, and me.
Diffstat (limited to 'doc/src/sgml/postgres-fdw.sgml')
-rw-r--r-- | doc/src/sgml/postgres-fdw.sgml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml index c408ba659bc..31547b55323 100644 --- a/doc/src/sgml/postgres-fdw.sgml +++ b/doc/src/sgml/postgres-fdw.sgml @@ -484,6 +484,15 @@ extension that's listed in the foreign server's <literal>extensions</> option. Operators and functions in such clauses must be <literal>IMMUTABLE</> as well. + For an <command>UPDATE</> or <command>DELETE</> query, + <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</>, + 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. </para> <para> |