postgres.git / summary / log / commit / refs
commit aee67299306e717986f054d149f6cb2f1c447656
Author: Michael Paquier <michael@paquier.xyz>
Date: Sat Jul 18 01:42:50 2020 +0000
First released in: 14.0, 12.4, 13.0
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
doc/src/sgml/ref/psql-ref.sgml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index cfd0918751f..b0335b9592b 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -983,9 +983,15 @@ testdb=>
</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>
[parent: 66232220ee6e]