diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2015-11-27 19:11:22 +0300 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2015-11-27 19:11:22 +0300 |
commit | 92e38182d7c8947a4ebbc1123b44f1245e232e85 (patch) | |
tree | f01ec11404a9b554cd9dc108409701e0fc86e001 /doc/src/sgml/ref/copy.sgml | |
parent | 0da3a9bef7ad36dc640aebf2d0482e18f21561f6 (diff) |
COPY (INSERT/UPDATE/DELETE .. RETURNING ..)
Attached is a patch for being able to do COPY (query) without a CTE.
Author: Marko Tiikkaja
Review: Michael Paquier
Diffstat (limited to 'doc/src/sgml/ref/copy.sgml')
-rw-r--r-- | doc/src/sgml/ref/copy.sgml | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 2850b4763f2..07e2f45196f 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -112,10 +112,17 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable <term><replaceable class="parameter">query</replaceable></term> <listitem> <para> - A <xref linkend="sql-select"> or - <xref linkend="sql-values"> command - whose results are to be copied. - Note that parentheses are required around the query. + A <xref linkend="sql-select">, <xref linkend="sql-values">, + <xref linkend="sql-insert">, <xref linkend="sql-update"> or + <xref linkend="sql-delete"> command whose results are to be + copied. Note that parentheses are required around the query. + </para> + <para> + For <command>INSERT</>, <command>UPDATE</> and + <command>DELETE</> queries a RETURNING clause must be provided, + and the target relation must not have a conditional rule, nor + an <literal>ALSO</> rule, nor an <literal>INSTEAD</> rule + that expands to multiple statements. </para> </listitem> </varlistentry> |