Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 580d8ac

Browse files
committed
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
1 parent 71e8e66 commit 580d8ac

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/src/sgml/ref/psql-ref.sgml

+8-2
Original file line numberDiff line numberDiff line change
@@ -982,9 +982,15 @@ testdb=>
982982
</varlistentry>
983983

984984
<varlistentry id="app-psql-meta-commands-copy">
985+
<term><literal>\copy { <replaceable class="parameter">table</replaceable> [ ( <replaceable class="parameter">column_list</replaceable> ) ] }
986+
<literal>from</literal>
987+
{ <replaceable class="parameter">'filename'</replaceable> | program <replaceable class="parameter">'command'</replaceable> | stdin | pstdin }
988+
[ [ with ] ( <replaceable class="parameter">option</replaceable> [, ...] ) ]
989+
[ where <replaceable class="parameter">condition</replaceable> ]</literal></term>
990+
985991
<term><literal>\copy { <replaceable class="parameter">table</replaceable> [ ( <replaceable class="parameter">column_list</replaceable> ) ] | ( <replaceable class="parameter">query</replaceable> ) }
986-
{ <literal>from</literal> | <literal>to</literal> }
987-
{ <replaceable class="parameter">'filename'</replaceable> | program <replaceable class="parameter">'command'</replaceable> | stdin | stdout | pstdin | pstdout }
992+
<literal>to</literal>
993+
{ <replaceable class="parameter">'filename'</replaceable> | program <replaceable class="parameter">'command'</replaceable> | stdout | pstdout }
988994
[ [ with ] ( <replaceable class="parameter">option</replaceable> [, ...] ) ]</literal></term>
989995

990996
<listitem>

0 commit comments

Comments
 (0)