aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-07-18 10:42:46 +0900
committerMichael Paquier <michael@paquier.xyz>2020-07-18 10:42:46 +0900
commit580d8ac9b1ef2803f39b1e23d9da68fff9109c42 (patch)
treed4c8199fc278adec157b2b421cc901a38698015b
parent71e8e66f783c143b04d381566d7a2a61e8d7598f (diff)
downloadpostgresql-580d8ac9b1ef2803f39b1e23d9da68fff9109c42.tar.gz
postgresql-580d8ac9b1ef2803f39b1e23d9da68fff9109c42.zip
doc: Fix description of \copy for psql
The WHERE clause introduced by 31f3817 was not described. While on it, split the grammar of \copy FROM and TO into two distinct parts for clarity as they support different set of options. Author: Vignesh C Discussion: https://postgr.es/m/CALDaNm3zWr=OmxeNqOqfT=uZTSdam_j-gkX94CL8eTNfgUtf6A@mail.gmail.com Backpatch-through: 12
-rw-r--r--doc/src/sgml/ref/psql-ref.sgml10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 42e862cf179..13179e845da 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -982,9 +982,15 @@ testdb=&gt;
</varlistentry>
<varlistentry id="app-psql-meta-commands-copy">
+ <term><literal>\copy { <replaceable class="parameter">table</replaceable> [ ( <replaceable class="parameter">column_list</replaceable> ) ] }
+ <literal>from</literal>
+ { <replaceable class="parameter">'filename'</replaceable> | program <replaceable class="parameter">'command'</replaceable> | stdin | pstdin }
+ [ [ with ] ( <replaceable class="parameter">option</replaceable> [, ...] ) ]
+ [ where <replaceable class="parameter">condition</replaceable> ]</literal></term>
+
<term><literal>\copy { <replaceable class="parameter">table</replaceable> [ ( <replaceable class="parameter">column_list</replaceable> ) ] | ( <replaceable class="parameter">query</replaceable> ) }
- { <literal>from</literal> | <literal>to</literal> }
- { <replaceable class="parameter">'filename'</replaceable> | program <replaceable class="parameter">'command'</replaceable> | stdin | stdout | pstdin | pstdout }
+ <literal>to</literal>
+ { <replaceable class="parameter">'filename'</replaceable> | program <replaceable class="parameter">'command'</replaceable> | stdout | pstdout }
[ [ with ] ( <replaceable class="parameter">option</replaceable> [, ...] ) ]</literal></term>
<listitem>