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
+ \copy { table [ ( column_list ) ] }
+ from
+ { 'filename' | program 'command' | stdin | pstdin }
+ [ [ with ] ( option [, ...] ) ]
+ [ where condition ]
+
\copy { table [ ( column_list ) ] | ( query ) }
- { from | to }
- { 'filename' | program 'command' | stdin | stdout | pstdin | pstdout }
+ to
+ { 'filename' | program 'command' | stdout | pstdout }
[ [ with ] ( option [, ...] ) ]